DSH / Atlas
2026-09-14implementedtesting

Preserve installed Desktop update evidence across restarts

跨重启保留已安装 Desktop 的更新证据

An installed update replaces application files and exits the process that observed the download. Terminal output alone cannot connect a failed transfer, explicit retry, installation authorization, and the next version's startup. Raw updater diagnostics can contain private URLs or credentials.

English

Problem

An installed update replaces application files and exits the process that observed the download. Terminal output alone cannot connect a failed transfer, explicit retry, installation authorization, and the next version's startup. Raw updater diagnostics can contain private URLs or credentials.

Decision

The Desktop main entry accepts an opt-in absolute DSH_DESKTOP_UPDATE_JOURNAL_DIR. Qualification packages must retain the same external directory across versions. Each process exclusively creates a separate JSONL file and flushes whitelisted state and action records before continuing. The installed version, PID, sequence, and UTC time identify records. Integer progress changes limit repeated writes; raw errors, URLs, request headers, and chat content are omitted. Known error tokens produce fixed classifications instead of copied diagnostics.

Without the variable, the journal is disabled. Explicit qualification storage failures propagate rather than silently claiming complete evidence. Startup and workspace readiness are observations, not proof of installer success or preserved user data. The local qualification decision remains active: this journal does not supersede its isolation, intercepted-installation limits, or hardware restrictions.

Alternatives considered

Keep only terminal output or installation-directory files. Installation replaces application files, and the new process can outlive the terminal. The evidence directory remains outside the installation tree.

Persist arbitrary logs and redact known secrets. Unknown authentication values and private paths cannot be exhaustively enumerated. Field whitelisting retains less detail but excludes those strings.

Consequences

Journal and main-entry tests cover persistence, retry milestones, separate version files, omitted private fields, and unavailable storage. Even a complete recorded sequence across restarts retains independent operator checks for publication timing, network recovery, installer completion, and preserved user data; logs have no automatic deletion, and the journal never clears signing locks or authorizes installation.

中文

问题

已安装应用的更新会替换应用文件,并退出观测下载的进程。仅有终端输出无法串联传输失败、显式重试、安装授权与下一版本启动。原始 updater 诊断可能包含私有 URL 或凭据。

决策

Desktop 主入口接受显式启用的绝对路径 DSH_DESKTOP_UPDATE_JOURNAL_DIR。验收包必须在不同版本间保留同一个外部目录。每个进程独占创建单独的 JSONL 文件,并在继续执行前刷新白名单内的状态与操作记录。已安装版本、PID、序号和 UTC 时间标识记录。整数进度变化限制重复写入;原始错误、URL、请求头和聊天内容均被省略。已知错误标记产生固定分类,不复制诊断文本。

未设置该变量时不启用日志。显式启用的验收存储失败会向上传播,不会静默声称证据完整。启动和工作区就绪只是观测结果,不能证明安装成功或用户数据保留。本地验收决策继续有效:本日志不取代其隔离要求、安装拦截的局限或硬件限制。

考虑过的替代方案

仅保留终端输出或安装目录内的文件。 安装会替换应用文件,新进程也可能在终端结束后继续运行。证据目录保留在安装目录树之外。

保存任意日志并对已知秘密脱敏。 未知认证值和私有路径无法穷尽枚举。字段白名单保留的细节较少,但排除了这些字符串。

结果

日志与主入口测试覆盖持久化、重试标记、不同版本的独立文件、私有字段省略和存储不可用。即使跨重启记录了完整序列,发布时间、网络恢复、安装器完成与用户数据保留仍需独立人工检查;日志不会自动删除,也不会清除签名锁定或授权安装。