Repository navigation
fix(context): keep shared acceptance references resolvable - #7696
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ceptance-reference-owner-20261030 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact head: 45834a3ff77896720f2cfa8a8eb2ea881bc0f1c2;整项不可变 base:a36e01c32b0a290a96466c766629a0b01850f823。
动机 / Motivation
通过普通 quota 输出和恢复 reader 读取 Goal 完整要求的 Agent。
投影把完整验收 owner 移到 work context 后,已有别名可能仍指向被删除的位置;当前版本让本次实际迁移的引用跟随完整 owner,包括先访问别名、后处理 owner 的情况。
现有 CLI 与 TurnEnvelope 可以继续读取完整要求、来源、失败和修订;未知或未迁移的引用保持原有语义,调用者输入不被改写。
本 PR 不交付统一 controller 切换、live 安装、模型采用或完整成本净收益,也不增加状态、RPC、权限或配置。 C1 的生产者/consumer 切换、历史 reader 退役和 original-quota 成果/完整成本资格仍沿既有 #7430 保持开放。
改动思路 / Approach
这是决定完成后的引用展示修复;复用当前 compatibility projector,比把所有验收副本再传过一条 TS bridge 更合适。 当前 PR 修复现有 caller 的别名可解析性,并集成已单独评审的静态扫描 prerequisite;不把这两个有界结果宣称为 C1 完成。
不改会保留可复现的 dangling reference;只修 summary 的一个地址又会漏掉提前访问的 alias。这里在原 helper 中记录真正迁移的 owner,复用一个局部 copy-spine helper,然后第二遍修正已有引用。不解析任意输入链,也不按文本或相同 id 猜测两个来源相等;完整 JSON 的修订、类型、失败和 source 都参与比较。
原决定、准入、capture 和一次结算仍归各自 owner。Python 只在已决定的显示响应上改路径;现有 typed reader 继续消费同一份完整值。C1 后续应在 source-owning composition 吸收该规则并随 caller 退役兼容算法,不能把本次修复固化成第二套 authority。
具体改动 / Changes
完整九文件 +213/-38:三个生产模块 +73/-38、两个测试文件 +95、四份文档/按需指导 +45。共享 scanner prerequisite 的四个源码/测试/指导 blob 与已独立评审的 1dc6cb85d1203eeea1236d70c3127782fd375379 完全一致,且该提交是当前分支祖先;此次仍重新判断整个组合,而不是继承整项批准。
关键代码讲解
- _reference_inline_goal_acceptance 只为本次实际删除的 inline owner 建 relocation map;第二遍修正先前见过的 alias。嵌套
writable_parent只复制被改的父链,原始输入不变,原 carrier 顺序和尺寸判断不变。 - compact_quota_should_run_cli_payload 保留原调用位置和已有 coarse reference_context 请求;没有新增 RPC。不同或不可用来源不会被强行归并,未知/未迁移引用保持既有 reader 语义。
- _field_mentions 复用完整
SourceFile键下的已解析名称事实;不会用 substring 过滤代替 AST,也不再存一份 AST。语法错误、escaped string、normalized identifier 和 hash collision 反例保持。 - scan_python_production 在 qualified enum、builder 和 registered return 已解析后才跳过无关环境。没有字段文本不等于没有 producer,unknown 也不能被消掉。
parse_python的一行ast.Module注解纠正实际返回类型,不改 parser。
规范依据为 docs/reference/required-work-context.md,spec_revision:a36e01c32b0a290a96466c766629a0b01850f823。complete-required-context 与 same-capture-recovery 均 implemented:完整来源、修订、失败、原始要求和恢复仍可到达。并以同版本 semantic-vocabulary RFC 核对 I2、I7、I8、I11、I12、I13:固定 grammar、tracked-source 范围、角色、registered producer 和 unknown 边界保持。既有 controller/executor RFC 的 C1 仍 deferred 于 #7430,不把新加段落当作自己的 oracle。
对主干的风险 / Risks
未发现当前阻塞性问题。 同一组冻结反例通过真实公开 compactor:不可变 base 的三个旧 alias 地址断言失败,当前 head 三个通过;完整 owner、input immutability 和签名同时检查。另有 34 组同输入 default/all-detail、不同类型/修订/source/failure、unavailable/unknown 和 source-prefix 0/4/80 对照,完整结果及跨语言调用参数逐字相等,无归一化,原 default 一次、all-detail 零次的投影调用保持。最初使用各自即时 fixture clocks 的比较失败只暴露 observed_at/served_at 不同;该运行按“非同输入”保留,后续回放的是完整冻结输入,未抹掉时间字段造绿。
当前完整相关源码模块 497 passed。普通 wheel 的 1,898 个现有产品文件与源码逐项相等,三个变更模块哈希一致,实际载入的产品模块位于隔离安装环境;installed registered-return probe 保留无显式 field 的生产证据。该 wheel 上 28 项投影/恢复用例通过,另两项真实 File/SQLite CLI 用例在修正测试 staging 后通过。fixture 的源码相对定位仅指向实际 wheel;未替换产品实现、mock backend 成功结果或修改断言。最初缺 examples 及 source-only 路径的两次失败保留。另一次包来源预读正确挡住 ambient package,随后显式隔离 PYTHONPATH;没有把其他安装的行为算给本 wheel。
首次 wheel 构建也正确拒绝陈旧 frontend assets;按正常文档重建后完成打包,没有绕过来源检查。全部安装只在 disposable 环境,未升级 live Host。
标准 premerge 6 direct +17 selected 全过,零 warning、skip、timeout 或 manual hold;完整 native semantic check 45.588 秒,原限额 120 秒。普通 import 的两模块 mypy、fresh-cache 配置的17文件 mypy、Ruff、完整 docs governance 和双语 RFC 检查通过。最初猜错测试文件名的 exit4/no-collection 保留,纠正后的完整选择才计入497。作者旧3769的120.713秒失败及 #7687 原失败没有改写成通过;当前结果既不解释旧 timeout,也不替别的 head 合格。未查询、轮询或等待 CI。
语义与 CI 对齐
复用既有引用、parser 和 production 词汇,没有新增共享 Enum、actor 或权限状态。共享 scanner 的原 1,769-source 完整 API/corpus、反例和 profile 证据保留实际旧版本,通过四 blob 相等和 caller/grammar 检查复用;本轮同时验证当前完整 native tree。59 项动态 unknown 仍是 unknown,4096 个 cache entry 也不是 byte bound。原资料中的 component CPU 降低不等于 whole-command、整轮或模型净收益。
成对 RFC 保留了“后移共享反而增加 projection 参数”的原作者受控负结果,并明确那不是完整流量、延迟或科学结果;该实验数值未在本轮重新创造或升级为独立净收益证明。当前自身对照只证明没有新增 bridge 调用/参数变化。局部 helper 收敛已应用;更大的 source-sharing 迁移留给既有 C1 owner,未新建框架或跟踪任务。
我的整体评价 / Verdict
APPROVE 当前完整组合,delivery 为 justified_increment。long_horizon 为 preserved:原要求、来源、后续恢复和执行身份保持;user_experience 为 improved:已有命令能读回完整验收,不增加配置、重新填报或确认回合。三项故障恢复与其余完整对照共同支撑这一判断,不用通过数量、缓存字段或字节数代替收益。
视觉审阅不适用:变化位于 quota CLI/context JSON 投影和静态分析器,没有网页、App 视口或交互布局改动。 已安装 Host/App/Lark 的自然采用、完整 C1 切换、模型遵从与长期净收益未验证。
本结论没有继承父 PR 的效益资格;#7699 共享提交先后关系和任何后续 base/head 变化仍须合并前重新核对。当前 GitHub 同账号限制采用 COMMENTED 回退,代码批准不等于正式 GitHub APPROVED 或合并授权,也不授权安装、dismiss 或实验。
English verdict: APPROVE — 45834a3. Three immutable-base alias regressions pass through the current public projector; 34 exact-input observations and bridge parameters match without normalization. Independently verified 497 source tests, installed 28+2 projection/native cases with source provenance, and 6 direct/17 selected checks. C1 cutover, live/model adoption and whole-Turn net benefit remain separate; no merge authority.
Ordinary quota projection can relocate a complete inline acceptance owner while leaving an existing
acceptance_contract_refpointing to the removed field. Retarget only aliases whose owner actually moved, including aliases visited before their owner. Complete requirements, source versions, original numeric types and caller-owned input remain intact; unknown or unmoved references retain their existing reader semantics.The existing compatibility projector and its nested copy-spine helper own this repair. It adds no RPC, source read, schema, authority or capture rewrite. Parent #7430 remains unfinished: producer/consumer cutover, historical-reader exit and original-quota outcome/full-cost qualification stay with that work.
Written by: Codex (OpenAI GPT-6).
The branch includes the exact shared commits from #7699, including its one-line parsed-module type correction, to qualify the combined source. Prefer reviewing/merging that independent validation prerequisite first; then reconcile this branch with actual main before its own exact-head merge review. Both PRs currently target main. No duplicated scanner implementation is introduced.
Final combined head:
45834a3ff77896720f2cfa8a8eb2ea881bc0f1c2, tested against maina36e01c32b0a290a96466c766629a0b01850f823. Inputs are synthetic/public fixtures.3769a605. Its same-fixture default/all-details call-count and serialized-input/result/output controls remain applicable; they do not measure complete costs.4501ca198before the sole final inventory annotation. CLI projector and reference-test blobs are unchanged at final head. After that annotation, 142 semantic production/binding/inventory cases pass again on final45834a3ff.4501ca198; every changed documentation blob is unchanged at final head.The previous
3769a6051011f8abe8c3f42dbb2258333d3fcabfgate remains a historical failure: six direct and 13/14 selected checks passed, but semantic vocabulary scanning timed out at 120.713 seconds under its 120-second limit, and that exact-scope quality result is non-passing. The new head must earn its own result; no timeout, fixture or assertion was relaxed.The paired RFC retains the rejected standalone late TS-sharing experiment: on the same 100-requirement fixture, projection parameters grew 102,680 → 344,010 bytes, while visible output stayed 102,189 bytes and all-details added a call. That relocation is excluded. Integrated C1 should absorb sharing at the existing source-owning composition boundary, then retire the compatibility algorithm with its callers.
The helper's current component samples do not establish a whole-Turn or long-horizon benefit. #7687 retains its own historical required-check failures and is not qualified by this combination. Original quota outcome/full-cost acceptance remains open.
No live installation, model/benchmark campaign, release, approval or self-merge is included. No authority-store behavior is changed and no PostgreSQL qualification is claimed. UI impact: none; the existing CLI/context-reader journey remains in place, with no viewport or interaction change. Every commit retains DCO sign-off; RFC language files change together.