feat(runtime): unify outcome diagnostics on top of bootstrap policy#5
Merged
Merged
Conversation
Release-Sync: yes Release-Version: 2026-04-02.130950 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.
概要
基于
feature/plan-b1-bootstrap-policy,继续把 installer / runtime 的诊断输出收口成一套统一 contract。如果说前一个 PR 解决的是“什么时候允许 bootstrap、什么时候必须拦住”,这个 PR 解决的就是“这些判断产出的结果,如何以一致、稳定、可机器消费的方式暴露出
来”。
核心是把 runtime/install outcome 统一到一组最小字段:
primary_codeaction_levelevidencehintCLI 渲染层也收口到这组稳定字段,不再依赖分散的 legacy reason/message 分支。
相对 policy 分支的增量
installer/outcome_contract.pyruntime/gate_output.pyprimary_code与action_level的映射,减少不同入口各自定义结果语义的情况status/doctor/ 迁移路径的诊断说明为什么要做
在 policy 层把 bootstrap 边界收紧之后,下一步问题就变成:不同入口是否仍然在用不同方式表达“同一个结果”。
之前同一个场景,可能会在:
里分别表现成不同的 reason code、提示文案和继续策略。这样虽然逻辑本身接近,但宿主侧行为、CLI 展示和测试断言都更难稳定。
这个 PR 的作用,就是把这些结果统一成一层稳定诊断面:
验证情况
tests.test_runtime_gatetests.test_installer_status_doctortests.test_distributioncodex:zh-CNclaude:zh-CN