Skip to content

Explain source-preserving recovery from ambiguous runtime defaults - #8866

Merged
loopx-agent merged 1 commit into
mainfrom
codex/default-runtime-source-guidance-20261116
Nov 16, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/default-runtime-source-guidance-20261116

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

When both default runtime roots contain state, the CLI tells the caller to select both --registry and --runtime-root. An explicit runtime override also pins per-Goal authority lookup. Following that advice for a global registry can therefore report canonical_authority_required for a Goal whose canonical store is available through its registered source.

The conflict guidance now explains the registry-only route and the purpose of an explicit single-runtime override. The thrown error and route diagnostic share the same guidance. The global manager source-read contract documents that choice.

Author Declaration

  • Written by a model agent using OpenAI Codex.
  • Implemented against the existing resolver behavior at cac86bbad92ba99c3430b3f7eaa9632727573821. Goal source runtime resolver
Criterion Disposition Evidence
Keep implicit selection refused when both roots contain state Implemented The source and packaged CLI both refuse the ambiguous route.
Make the recovery guidance follow registered Goal sources Implemented Registry-only status reads the Goal's existing store through its source registry.
Explain the explicit override's effect Implemented Selecting the machine root explicitly reports the missing canonical store in that directory.
Keep source data intact Implemented The real CLI rehearsal verifies the original registry and state bytes after the reads.

Scope And Continuation

This repairs the existing CLI and diagnostic guidance for a demonstrated routing failure. Independent review and hosted CI are pending.

Validation

  • Tested revision a4a82666b1edce9ad2e9e1f65ecd593af273964a
  • Run state finished for the local checks below
  • Input classes synthetic and public_fixture
Check kind Result Evidence
regression_parity passed The focused regression fails on the base's guidance. It passes with the candidate while exercising both registered-source and explicit-override status reads.
real_entrypoint passed The built wheel refuses ambiguous selection, reads registry-only status and complete global Todos, and reports the explicit override's missing authority.
integration passed 100 routing, migration and doctor cases.
integration not_run Three existing Windows-junction cases are skipped on macOS.
static passed Ruff and standard premerge with six direct and seventeen selected checks.

Frontend / Visual Evidence

The changed result is the text-based CLI conflict message and route diagnostic.

Type of Change

  • Bug fix
  • Test update
  • Documentation update

LoopX Area

  • Control plane
  • Host or runtime integration

Boundary Checklist

  • Public-safe diff, body and synthetic validation
  • Checked RFC pairing against the PR base
  • DCO sign-off

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max

Exact head: 8866@a4a82666b1edce9ad2e9e1f65ecd593af273964a

动机 / Motivation

升级后同时保留新旧运行目录、需要继续读取既有 Goal 的 CLI 使用者会遇到这个问题。旧提示要求同时指定 registry 和 runtime-root,照做会把跨来源 Goal 锁到单个目录并报无权威来源;新提示让声明了 runtime 的具体 registry 单独恢复来源路由。已验证照提示可读取两个不同来源的 Goal,显式单目录操作和来源缺失仍拒绝,恢复来源后能继续。本 PR 只修正恢复指引及文档,不自动合并目录、迁移状态或改变来源优先级。

改动思路 / Approach

恢复建议应由已有 default_runtime_route 统一生成,异常复用同一文本;实际 Goal 来源选择继续属于原有 route owner。当前边界是含 runtime 的具体 registry 恢复、显式单目录诊断和迁移前检查提示。

路由决策与提示展示分开:默认根冲突仍在同一位置停止;给出声明 runtime 的具体 registry 后,原 resolver 逐 Goal 找回 source_registry。显式 runtime-root 仍是有意固定单个运行目录的操作。异常从 route 的 recommended_action 取同一提示,避免两份恢复说明再次漂移。用户不需新增确认,迁移仍应先检查两个目录。

具体改动 / Changes

关键代码讲解

  • default_runtime_route:生成默认路由与恢复建议。要求registry alone且declares runtime;显式runtime仅单目录;冲突保持,先检查再迁移。

  • select_default_runtime_root:拒绝模糊默认根。异常复用route建议,选择算法不变;不默选任何已有state根。

  • resolve_goal_source_runtime_route:未改的Goal source权威边界。registry-only跟随source;explicit runtime固定single-runtime;来源缺失拒绝;不使用local copy兜底。

规格依据:docs/reference/protocols/global-manager-command-v0.md,不可变修订 cac86bb。按变更前文本判断,以下名称仅标记协议条款映射,不是新增要求。

  • SourceReads:implemented。先读取显式 registry 的注册 Goal 来源;读取失败不得用运行目录副本冒充完整权威。 对应 default_runtime_route / resolve_goal_source_runtime_route,由 independent-route-probe.py baseline/head/wheel 验证。

对主干的风险 / Risks

PASS:现有 routing、candidate roots、Todo source、migration、doctor 共 118 passed,3 个既有 Windows skip;标准 premerge(6 direct、17 selected)通过。独立真实 CLI 对照在 main 02cc 和本 head 用同一隔离场景跑 8 例:旧提示的双 flag 路径 exit 1,新提示 registry-only exit 0,两个不同来源 Goal 均可读。显式单目录仍报 canonical_authority_required;移除注册来源仍以 canonical_todo_contract_diagnostics_unavailable 拒绝,恢复来源后成功。

PASS:独立安装的本 head 合格 wheel 重跑这 8 例成功,机器状态与来源文件字节不变。global-todos 证明两个 source 均读取且 coverage complete,fixture 的 Todo 列表为空,未据此声称验证了大量任务展示。首次猜错测试路径、复用别的 head bundle 因 source_inputs 不符失败均留存;最终使用真实已有测试和本 head 自建合格 bundle。

语义与 CI 对齐

复用既有词汇和 owner,没有新增共享枚举或授权。已逐句核对诊断的触发、来源、范围、先后和停止条件;文本是有意纠正并经真实任务验证,未声称模型理解已验证。按当前策略不查询、不轮询 CI,本结论基于本地必需验证;审查结论与平台合并条件分开。

我的整体评价 / Verdict

long_horizon:来源读取和缺失拒绝不变,修正文案避免无效重复恢复;未测长程执行效果。 user_experience:旧提示要求同时指定 registry 和 runtime-root,照做会把跨来源 Goal 锁到单个目录并报无权威来源;新提示让声明了 runtime 的具体 registry 单独恢复来源路由。 没有新增必需确认轮次。

检查了 paths.py、来源解析 caller 与文档;变更是 CLI 诊断文字,没有渲染页面变化。未声称执行浏览器视觉审查;此变更没有受影响的渲染布局。

恢复建议应由已有 default_runtime_route 统一生成,异常复用同一文本;实际 Goal 来源选择继续属于原有 route owner。当前边界是含 runtime 的具体 registry 恢复、显式单目录诊断和迁移前检查提示。 兼容性和复杂度已重新按完整范围判断,当前共享 owner 的局部改动有明确必要性,未发现应在此 PR 强制拆分的新架构。

UNVERIFIED:nativeWindows、真实PostgreSQL、实际主机升级采纳、模型对文字理解及长程效果/总成本未验证;syntheticFile/SQLite和独立wheel只证明当前局部CLI边界。 当前没有复现阻塞 finding;若 head、原证据格式或入口变化,需要重做对应证据。先前方法性经验仅用于检查真实恢复和有用结果,不作为当前结论或记忆效用的证明。

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

English verdict: APPROVE. Recovery guidance preserves registered Goal sources and keeps ambiguous or unavailable authority paths closed.

@loopx-agent
loopx-agent merged commit 57807a9 into main Nov 16, 2026
40 of 49 checks passed
@loopx-agent
loopx-agent deleted the codex/default-runtime-source-guidance-20261116 branch November 16, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant