Repository navigation
test: restore canonical authority in autonomous replan smoke - #7070
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6-astra; OpenAI; runtime_reported; reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
未发现阻塞问题。审阅精确 head de342754d89dfed8c5fd0f039ae1234f9b23d766;目标 main 722bcc582043bdc2ab60746e4b0dc7a57130b716。本评审只批准这一测试准备修复,合并资格仍需单独回读。
动机
维护者运行自动重规划回归检查时,需要测试真正进入重规划判断和写回路径。 此前合成状态只写入旧文件,第一条状态查询便被权威存储检查拒绝;现在先导入临时测试存储,再执行原有五组断言。 同一 smoke 的进程内和独立 CLI 两种运行方式均通过,重新覆盖重复观察拒绝、重规划关闭和监控阈值。 本次只修测试准备,不改变产品规则、生产存储或原有断言,也不据此宣称实际 Agent 长程收益。
改动思路
入口仍是原来的 smoke。所有合成 Goal 和历史记录写完后,复用已有 import_fixture_authority:备份临时源、准备并应用保存的导入计划,再验证读取来自 canonical File authority。随后原有 status、quota should-run、refresh-state 路径直接运行。省掉这一步会继续在首条查询失败;绕过产品的权威校验或放松断言反而会失去覆盖。显式在当前 fixture 末尾调用,也避免改变其他故意测试“未导入状态拒绝”的 fixture。
具体改动
仅 examples/autonomous-replan-obligation-smoke.py 增加两行:第20行导入共享 helper,第260行在全部 writer 后调用。现有五组断言、输入和 CLI dispatch 均未修改。
独立规格为 docs/development/good-smokes.md,spec_revision 722bcc582043bdc2ab60746e4b0dc7a57130b716。Start With The Contract:已实现,保留真实 CLI、序列化和状态边界;Consolidate Without Losing Coverage:已实现,复用既有 canary harness,保持独立的语义断言。没有增加生产模块、协议词汇、兼容分支或新 smoke。
正向路径从两个相同观察产生 obligation,执行 host 投影出的 refresh 命令,以新 surface 关闭同一 obligation。反向路径仍要求:只换措辞或 evidence ID 不算语义进展,拒绝前后 run-history 完全相同;heartbeat liveness 也不混同真实死循环监控。
对主干的风险
最强反例是导入发生在历史写完前,或 helper 伪造成功,导致检查虽然通过却没有测试原状态。代码确认调用位于全部 writer 后;registry/runtime 都由当前 TemporaryDirectory 派生;共享 helper 实际执行保存计划并核验 provider、digest 与无 legacy fallback。现有阈值、写回和精确关闭断言继续约束导入后的历史,未新增吞错或重试。
复核该 head 的两种 CLI 模式均通过;managed premerge 5项直接检查、6项选中检查全部通过,包含相邻 monitor/writeback、语义词汇、维护预算和公开边界;无 manual hold 或 tracked side effect。精确范围 CQR cqr_31a42231841a82dfaa11 有效。合并前 RFC bilingual diff 复核通过。远端 base/head、helper和依赖均未变化,因此复用上述执行证据,没有重复健康矩阵;按当前策略未查询 CI。先前7057整合 head 的 canonical_authority_required 失败仍保留,不追认旧检查通过。
覆盖边界是合成数据上的真实本地 File/CLI,不是模型收益、已安装产品或所有存储后端资格。回滚仅需移除两行,旧 fixture 失败会重新出现;未修改活跃 Goal。
我的整体评价
goal_achieved 仅针对恢复这个回归入口。long_horizon 为 not_applicable:无生产调度或持续执行策略变更,不主张实际长程收益;user_experience 为 improved:维护者沿原命令完成验证,无额外手工初始化或交互轮次。Planner 仍选择该 smoke;相邻 readmodel smoke 只覆盖投影,不能替代此处真实 CLI/写回。近期同账号相关PR扫描未发现重复新增同类脚手架;账号不等同单一Agent。
代码量判断 necessary,compatibility assessment 为 not_applicable。所需整理已通过复用共享 importer 完成,进一步抽象没有当前收益。该测试单项修复适用仓库的低风险维护者 self-merge 条件;正式合并仍须 unchanged-head readiness,而本结论不授权生产行为或发布。残余限制是未证明全后端或长期模型表现,这不属于本次测试准备修复承诺。
English verdict: APPROVE. The two-line opt-in restores the existing real-CLI regression checks through the shared canonical fixture importer without weakening assertions or changing production behavior. Exact-head local validation passes; CI was not consulted. This author-owned COMMENTED review is an approval conclusion, not a GitHub formal approval or independent merge authorization.
The autonomous-replan smoke stops at its first
statuscall withcanonical_authority_required: its fixture still writes legacy Markdown state without importing it into the canonical authority store. This prevents the existing replan regression checks from running during premerge.Call the existing
import_fixture_authorityhelper after every synthetic fixture writer has finished. The helper uses the real saved import plan and verifies provider readback. All five original checks and their assertions remain unchanged, including rejection without a run-history write, exact-obligation closeout, monitor thresholds and periodic fallback.This is the remaining fixture repair after #7057 was merged. It changes one smoke only, with no production behavior, new helper, relaxed assertion or active Goal mutation.
Validation at
de342754d89dfed8c5fd0f039ae1234f9b23d766:--subprocess-cli, using disposable canonical File authority.git diff --checkpass.canonical_authority_requiredfailure remains historical evidence.Scope review: reuse the shared fixture import owner; opt in here rather than changing the helper's defaults for intentional refusal fixtures. No fixture assertions were removed or rewritten.