feat(installer): tighten workspace bootstrap policy#4
Merged
Conversation
Release-Sync: yes Release-Version: 2026-04-01.110138 Release-Date: 2026-04-01
Release-Sync: yes Release-Version: 2026-04-02.094312 Release-Date: 2026-04-02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
这个分支收紧了 workspace bootstrap 的策略边界,把“什么时候允许首次写入
.sopify-runtime/、什么时候必须停下来确认、什么时候应该直接 fail closed” 明确下来,并让 installer 与 runtime gate 对这些规则保持一致。
目标不是增加流程,而是避免在根路径选择、host/payload 归属不明确、以及 first-write 场景下发生静默写入或错误 bootstrap。
变更内容
~go、~go plan、~go init)才允许触发首次 bootstrap~go init建立显式确认语义,不再和普通执行命令混在一起.gitignore/ ignore policy,而不是只写 stub 不维护忽略策略--workspace仅保留给 maintainer / internal prewarm,默认用户路径是先完成全局安装,再在首次项目触发时由 runtimegate 完成 bootstrap
为什么要做
此前 bootstrap 相关行为在几个边界上还不够硬:
这些问题本质上都会导致同一种风险:系统在“上下文还不够确定”的情况下,过早写入或选错 bootstrap 目标。
这次改动把这些边界显式化,优先保证 bootstrap 的可解释性和可恢复性。
验证情况
tests.test_installer已补充并通过相关策略覆盖tests.test_runtime_gate已补充并通过 root confirm、host/payload 选择、legacy helper 边界等场景tests.test_installer_status_doctor已覆盖 workspace / payload 诊断结果tests.test_distribution已覆盖分发与输出面相关回归scripts/check-prompt-runtime-gate-smoke.py已补上 root confirm checkpoint smokescripts/check-runtime-smoke.sh已补上 thin stub 与 selected bundle helper contract 的 smoke 校验