Repository navigation
fix: admit native child reports during lawful semantic replans - #7484
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.1-sol; OpenAI; runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
未发现阻塞问题。APPROVE,精确head ec5a2563dcd352b0d47b184901052251d8c31af7。报告许可与普通交付许可分离,仍受原始身份、明确工作事实、已验证义务和结算阶段约束。
动机 / Motivation
在已准入重规划Turn中登记宿主原生子代理工作的主Agent和维护者。 重规划刻意关闭普通交付许可,但报告准入也要求该许可,导致合法的子代理决策和迟到结果无法登记。 已验证的语义重规划义务、既有autonomous_replan交互路由与明确工作准入共同允许报告,普通交付仍关闭。 不启动子代理,不授予执行或写入权限,不增加配额,也不重开已开始结算的Turn。
规格依据为 d60b1f9ef1e8eb529aec7a85ba5e132555774ae6 的 docs/integrations/host-native-child-receipts.md:REPORT-REPLAN要求合法重规划可报告且不按状态名推断;ORIGINAL-BINDING要求保留原始身份且不消费配额;CLOSEOUT只允许已开始操作的迟到事实,不能补建新决策。三个条目均由真实CLI及TS反例覆盖。
改动思路 / Approach
复用现有TS报告准入、semantic guard验证和原始settlement identity;不按状态标签或错误文字推断许可。 既有报告准入owner足够,复用已验证义务和持久化交互路由。三个既有TS文件和两份回归文件修复合法重规划报告,不扩大执行权限。语义义务单独存在并不足以准入:successor/repair-only guard仍被拒绝;普通工作原有准入和旧普通guard的有界兼容保持。
具体改动 / Changes
nativeChildReportAdmission继续要求ok、should_run、must_attempt_work明确为true且quiet_noop为false。普通交付已准入时保留原路径;普通交付明确为false时,还必须是既有autonomous_replan交互路由及通过settlement owner验证的义务。readQuotaSettlement先验证语义guard再传入;heartbeatWorkRequalification复用同一判定,并只在原绑定首次获正向工作准入时复制现有interaction_mode,不替换原始语义guard。
182个TS准入/结算用例、control-plane typecheck、10个真实File/SQLite CLI用例、5项direct和16项selected premerge、CI规定Ruff命名空间、17个配置mypy文件、五文件公开边界与CQR通过;均无skip。 真实CLI保留Todo-bound/pure两种绑定、decision幂等、agent-context同读、父index字节不变及零report-spend断言。completed/failed/cancelled三种迟到结果在File/SQLite均通过。TS负例覆盖状态标签、缺失/部分/truthy/否定事实、只有义务没有路由、错误身份、malformed guard以及已开始结算。原10个真实反例在修复前失败。没有跳过旧断言来取得通过。
对主干的风险 / Risks
最大风险是把语义义务误当成通用执行许可;明确路由和全部工作事实共同约束,disabled/unregistered policy、精确identity和phase原owner仍在。回执不是宿主核验,不能启动子代理、取得lease或消费配额。未修改UI,首次屏幕证据不适用。两次探索性lint命令覆盖了CI定义范围以外的既有债务;首个CLI命令也曾误指不存在的测试文件,均保留失败记录且不计通过。随后按工作流规定命名空间和实际文件完成验证。PR CI按Goal配置不查询。最终全量发布、打包UI、模型资格及原生Windows验证仍由发布批次完成。
我的整体评价 / Verdict
这是既有契约的有界修复,复用同一TS决策owner,没有新增持久化字段、枚举、CLI选项或Python决策层。当前切片具备合并依据,完整发布仍需最终同源验证。未发现阻塞问题;模型效果和完整成本收益仍未知。
English verdict: APPROVE ec5a2563dcd352b0d47b184901052251d8c31af7. Verified semantic-replan work can report native child facts without ordinary delivery authority. Original binding, negative work facts and late-fact-only closeout remain enforced;182 TS and10 real File/SQLite CLI cases plus required local gates passed. Full release qualification remains separate.
Lawful semantic replan Turns deliberately deny ordinary delivery. Native child report admission also required that delivery flag, so coordinators could not record a child decision or close out an existing reported operation during a replan.
The existing TypeScript admission owner now accepts the already validated semantic obligation together with the committed autonomous-replan interaction route and explicit positive work facts. Status labels do not grant admission. Original settlement identity, disabled/unregistered policy, pending/settled closeout, no launch authority and zero report-based quota spend remain unchanged. Work requalification copies the existing interaction route with its first positive admission.
Validation: 38 TypeScript admission/readback cases and 10 actual File/SQLite CLI cases passed with no skips. The CLI cases cover Todo-bound and pure replan, idempotence, unchanged parent history, and completed/failed/cancelled late results. Repository premerge and final release qualification are recorded separately; this PR does not claim whole-release readiness. No renderer or page composition changes.