fix(todo): anchor runtime root to registry - #4913
Conversation
Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
|
CI triage for head
This PR changes only |
huangruiteng
left a comment
There was a problem hiding this comment.
结论
代码评审通过(exact head a368f7cf2)。这修复的是 todo list 从独立工作目录读取相对 common_runtime_root 时漏掉 registry 锚点的问题;我没有合并此 PR。当前远端 CI/merge gate 仍是红色,合并需等相关基线修复、同步后重新验证,不把代码评审通过当成 merge-ready。
问题与边界
基线 list_goal_todos 调用 resolve_runtime_root 时不传 registry_path,导致相对运行目录随调用者 cwd 漂移;promoted Goal 可能找不到 provider fence,并把旧 Markdown Todo 当真。新 head 复用现有路径解析器,没有新增 Todo 权限、状态协议或写入。绝对运行目录保持原语义。
关键代码讲解
loopx/todos.py:208:把 registry_path 交给现有 resolver,让相对目录锚定 registry 所属项目。tests/control_plane/test_registry_relative_runtime_resolution.py:124:真实 CLI 子进程从独立 cwd 读取合成 promoted provider;故意让旧 Markdown 与 canonical Todo 分叉,并检查 provider=true、legacy=false 和调用目录没有新建 runtime。
验证与风险
精确 head 的目标测试 3 passed(13.02s);git diff --check 通过。负例覆盖旧 Markdown 不可盖过 provider;未触碰真实 Goal。当前 test-shard (3)/(4)、Node minimum 等远端检查失败,PR 作者已指出对应 #4906 的交叉基线问题;我未将这些失败归因于本次两文件改动,也未宣称完整 CI 通过。合并前仍需在更新后的 head 上取得绿色必需检查。
后续
无此 head 的代码阻塞意见。邻近调用点若也遗漏 registry_path,应按各自实际入口和回归证据修复;不扩大这次窄改。未来向重构检查:现有 resolver 正是合适边界,无需新抽象。
English verdict: APPROVE the code at exact head a368f7cf2; merge remains on hold until required CI is green on the final head.
Goal And Delivered Outcome
list_goal_todos()resolved a relativecommon_runtime_rootagainst the caller's working directory because it did not passregistry_pathtoresolve_runtime_root(). A CLI call from another worktree could miss the promotion fence and return stale Markdown Todos instead of canonical authority state.todo_staleon the parent revision andtodo_canonicalon this revision, withdecision_read_from_provider=trueandlegacy_fallback_used=false.main.Scope And Continuation
Validation
a368f7cf2ec8786abb7393d4843b9cbf995c98ecregression_paritypassedpython -m pytest -q tests/control_plane/test_registry_relative_runtime_resolution.py -k todo_list_anchors_promoted_authority_to_registry_project; the parent revision returns the stale Markdown Todo, while this revision returns canonical authority state.unitpassedreal_entrypointpassedpython -m loopx.cli ... todo listfrom an independent working directory against the realFileAuthorityStorefixture.staticpassedgit diff --check, andloopx checkpassed for the changed files.integrationpassedloopx canary premerge --from-git-diffpassed all 18 selected catalog and risk-profile smokes.staticfailedloopx/todos.py; no diagnostic points to the changed call.See validation disclosure guidance.
Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A. This bug fix changes registry-relative path anchoring in one Python caller. It does not change the production-scale fixture, provider semantics, promotion behavior, or compatibility projection.
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).