Repository navigation
test(explore): align replan qualification with inline context - #5962
huangruiteng merged 2 commits into
Conversation
|
Follow-up for the replan-recovery fixture: its prior setup inserted surface-only run-history rows without matching quota admission receipts or settlement writebacks, so it could not legitimately trigger the documented settled-effective-Turn periodic review. On canonical main 9d7680a, the original focused case failed with |
|
CI update for head a342ba6: Frontstage Pages build run 37811578012 fails in the unchanged |
|
The failing |
Signed-off-by: mika <211269698+mikamikasuki@users.noreply.github.com>
Signed-off-by: mika <211269698+mikamikasuki@users.noreply.github.com>
caedbaf to
86f3a79
Compare
|
Validation update for head 86f3a79, rebased on canonical main b27c4c7. The remaining shard failure is part of this PR's fixture scope: the exact Validation on the rebased head: both affected modules passed (31 tests); Ruff, Python compilation, and Hosted checks have restarted for this head; the browser currently shows Summary passing, six jobs queued, and merge-gate expected. Code-owner review is still pending. The full repository suite has not completed. |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent — gpt-6.1-sol / OpenAI; runtime_reported; reasoning_effort=xhigh.
动机
APPROVE,当前完整 head 没有发现阻塞问题。
维护重规划资格测试的开发者,在 quota 已把 Explore 上下文随结果返回时,会被旧测试误导为还缺少一次工具读取。
旧 fixture 从已移除的顶层 required_reads 取 Explore 命令,组合路径在真正行动前失败;新版先核验包内 scoped、read-only 上下文,再沿原 frontier 选择与回写。
新 head 的真实 CLI 资格、作用域与重放验证通过;文档与现有单一内容载体一致,恢复选择继续按原 Turn 结算一次。
这次交付是既有资格测试和文档维护,不改变生产准入、配额、重规划或 provider 权限;没有证明真实模型采纳、远端服务或全库测试通过。
精确 head:86f3a792e46108f43ac7bcbfe0cece06d1afd74c;不可变 base:b27c4c7290b9fea5deac1afa54694f3d5c263b93。作者正文的旧 head、旧 base、三文件和测试数没有作为当前事实采用;本轮核验两个提交、全部四文件和实际 CLI。
改动思路
复用现有 TypeScript interaction owner 的来源投影和结算规则;Python 仅修正资格工具的读取位置,避免重新实现生产决策或增加第二份上下文。
当前 PR 完成真实 CLI 资格与现有内联契约对齐,保留未完成必读项、作用域、重放和周期结算约束;不新增产品操作或通用协议。
quota 先通过原 hook/source adapter 取得上下文,TypeScript owner 把已提供来源放在 work_context、未完成读取保留在嵌套 required_reads。测试消费当前包,再执行原 frontier/source 和 typed successor/writeback,实际准入、来源失败、重规划、身份及配额结算仍由原 Core 负责。把顶层旧命令重新塞回生产包或删掉 pending 检查都会制造第二契约,因此本 PR 只调整现有资格 seam。
具体改动
关键代码讲解
_required_explore_read_command(loopx/control_plane/testing/replan_semantic_action_behavior.py:537):先读嵌套 agent_channel.required_reads,再筛选 Explore;嵌套列表不存在才保留原测试 helper fallback。具体 source、before_work、Goal、Agent 仍逐项校验。空的当前嵌套列表优先于旧顶层指针。_inline_explore_context_action(tests/control_plane/test_replan_semantic_action_behavior.py:92):检查真实 quota 已附带的唯一来源、准确身份、read_only 与 replay command,拒绝重复 pending Explore,然后回到原 frontier。它是 scripted fixture 观察,不能证明真实模型已理解上下文。- selection recovery 测试(
tests/control_plane/test_selection_replan_reentry.py:18):移除没有准入/结算回执的人工 surface-only 行,用真实 long_todo_chain 验证恢复;原 Turn 身份、fresh admission、reentry 与只扣一次的断言继续保留。
规范依据:docs/reference/required-work-context.md + docs/reference/protocols/goal-vision-replan-contract-v0.md,固定版本 b27c4c7290b9fea5deac1afa54694f3d5c263b93。Required work context 为 implemented:已提供来源不重复读取,未完成项仍精确且有顺序,来源失败须恢复重准入,内容不给权限。Default review cadence 为 implemented:周期按 verified settled effective Turns 计数;selection 的 long-chain 触发与专门周期证明分开。修改的 Explore README 对照这些既有规范,不用自己的新文字证明自己正确。
对主干的风险
五个 source 模块独立执行 head 82 passed,base 5 failed / 79 passed。base 四项失败来自旧顶层读取/旧 skip-repeat-scope 假设,另一个失败是未结算历史不能触发 periodic_review_due。新版删除的 obsolete 用例没有被当作“相同测试自然变绿”:相同独立 8 项 nested oracle 在 head 8 passed、base 7 failed / 1 passed,验证合法 mixed pending list、重复项、错误 Goal、错误 Agent、错误 source、错误 order、legacy-only 兼容与 authoritative empty 优先。
相关 source suites 经真实 loopx CLI、生产 TypeScript owner 和隔离文件状态运行;Explore replay 读取与内联 content 一致,unhealthy Goal 仍 should_run=false/delivery_allowed=false。组合路径创建 scoped successor 并重新准入,选择恢复按原 Turn 结算一次;专门 effective-turn/periodic suites 仍拒绝不合格计数。模型 transport 是 scripted,不是一次真实付费模型验收。
Ruff、diff whitespace、两个提交 DCO、变更 advisory 及两端完整 semantic smoke 通过。风险式 premerge 的 5 项直接检查与 19 项选择检查全部通过,零失败、零 warning、零 manual holds。没有新增共享词汇、权限或默认开关;未配置 Explore 时原普通路径保持。README 改的是载体描述,读取当前 sources before work、freshness、scope、bounded detail 和建议非强制的条款保留,没有把义务缩成可忽略提示。未查询或等待 CI;全库 suite、live model/provider、安装后的应用未测。
我的整体评价
交付判断 goal_achieved 仅指这次资格与文档维护:开发者不再遇到旧载体造成的假失败,user_experience 为 improved;长期执行所需的来源失败、重放、scope、真实结算与周期 owner 保持,long_horizon 为 preserved。没有把局部维护称作 Explore 全能力或父级 Goal 完成。
复用现有 TypeScript interaction owner 的来源投影和结算规则;Python 仅修正资格工具的读取位置,避免重新实现生产决策或增加第二份上下文。
当前 PR 完成真实 CLI 资格与现有内联契约对齐,保留未完成必读项、作用域、重放和周期结算约束;不新增产品操作或通用协议。
Future-facing pass 保留生产 TS 单一 owner,Python 仅适配已有测试 seam;这个有界修复无需新增状态机或扩大重构。嵌套 empty 与 legacy fallback 的取舍已通过反例核验。Approval 不代表合并授权、全部旧架构 producer 安全或真实模型采纳。
English verdict: APPROVE — exact head 86f3a79. The qualification and documentation now follow the existing inline work-context contract without duplicating fulfilled reads or fabricating settled-turn cadence. Eight identical nested-read counterexamples and 82 actual CLI source cases pass at head; production context, admission and settlement owners remain unchanged. Live model adoption and the complete repository suite are unverified. No remote CI was consulted; merge readiness and authority remain separate.
Goal And Delivered Outcome
required_readscommand. Quota packets deliver the turn-start hook result inline throughinteraction_contract.agent_channel.work_context.sources; the stale helper failed before the modeled action and its skip/replay/scope cases no longer matched the packet contract. The Explore README described the previous delivery shape.5f51559dc93b43d023a9c915c52ec1dc409e3e65, the replan qualification file had 4 failures and 19 passes. The actor fixture now verifies the scoped, read-only Explore context in the quota packet before the next action and does not perform a duplicate Explore read. The README describes the inline contract.main; current base is73dfd1f66dadbd7c08b25a94813c4d51ec99d1fe.Author Declaration
Some coding work was AI-assisted. I personally reviewed the changes, verified the relevant behavior and tests, and take responsibility for the submission.
Implemented against
loopx/control_plane/work_items/context_readback.pyandtests/capabilities/test_explore_turn_context.py::test_real_quota_delivers_replayable_context_without_admitting_unhealthy_goal.interaction_contract.agent_channel.work_context.sourcestests/control_plane/test_replan_semantic_action_behavior.pywork_context.sourcesandrequired_reads_required_explore_read_commandtest_required_explore_read_uses_nested_interaction_contractScope And Continuation
Validation
caedbafcba3621c12f7bfe0a2ba218838803b3b0, synced with canonical main73dfd1f66dadbd7c08b25a94813c4d51ec99d1fe.loopx canary premerge --from-git-diff: 19 selected checks passed, zero failures, zero manual holds.37832856777and associated checks started at 2026-10-08 19:33 UTC. GitHub Summary succeeded; DCO, dependency review, Frontstage Pages, PostgreSQL integration, and Release Artifacts were queued at last readback; merge-gate is expected.python -m pytest -q -n 2run was interrupted around 25% after failures appeared in untouchedtests/architecture/test_semantic_*tests. No complete full-suite result is claimed.a342ba63cebbc908b1766c5771a2cdfb999d7260was in the unchanged bilingual-link smoke and reproduced on its exact base. The semantic link-check correction is tracked separately in #5968; it is outside this PR's diff.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
N/A; this change aligns a qualification fixture and capability documentation with the existing packet contract.
Shared-authority RFC fixture impact
Boundary Checklist
Signed-off-bytrailer.