Repository navigation
test(context): inspect wire rows for duplicate initial selections - #7952
Conversation
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)
动机 / Motivation
维护 Agent 上下文读取的开发者,需要知道失败来自实际重复投递还是测试自身观察错误。 以前完整父对象被值读取 helper 展开成子地址,两个测试把这些派生地址当成重复投递而误报;现在只从实际发出的 selections 行检查重复,同时继续验证完整内容。 独立整合分支上的首读测试由基线 35 通过、2 失败变为本 head 37 通过;真实 reader 的四个正例与四个重复行反例全部符合预期。 本 PR 不交付生产 reader 改动,不证明整合分支整体、冻结运行、模型采用或长期收益,也不授予合并权限。
改动思路 / Approach
值读取 helper 会递归展开完整父对象,派生地址可以用于查询,却不代表线上另发了一行。本 PR 复用同文件已有的观察方式,从 page.content.selections 提取实际 pointer,专门检查重复。完整值仍由另一组断言验证,没有新增 helper、测试替身或生产去重逻辑。
具体改动 / Changes
实审 head d7dc851be482d7c39331179d101c889918e995a2,实际目标为 codex/edgebench-convergence-20261103-r5,merge base 44cd8ac1f9eee451b86459cbd366313c231874b8;差异仅一个既有测试文件 +4/-2。
关键内容讲解
current 测试 在248行仍比较整个 current,249–250行检查实际投递子行,252–253行继续核对原 capture、decision 和字节映射。outcome 测试 保留当前及 peer 的完整要求、其他 outcome 的按需读取,只把305行的重复判断改到真实 wire 行。
规范为 docs/development/good-smokes.md,spec_revision 44cd8ac1f9eee451b86459cbd366313c231874b8。Start With The Contract:观察真实 reader 与完整原值;Prefer Semantic Pressure:四个原页正例加四个只注入实际重复行的反例;Validate The Change:完整首读模块、Ruff 和实际目标 premerge。当前请求的修复已完整落在现有 oracle,额外抽象没有收益。
对主干的风险 / Risks
相同命令在实际 base 为35P/2F,本 head 为37P/0F;两个基线失败都是旧断言混淆派生地址。独立反例保留真实 value helper,只往返回页追加重复子行;三个 current 形态均在250行被拒绝,outcome 在305行被拒绝,完整值与 peer 条件继续验证。标准 premerge 的5项直接检查及Ruff通过,0项catalog被选择。
已比较同类 main 修复 #7953:本 PR 面向不同整合目标并含两处 oracle,不能继承另一个 head 或冻结运行的资格。未改生产、预算、评分或任务语义。CI 未查询,原因保持未知;必要不变量由当前本地证据覆盖,CI成功不是批准前置。
我的整体评价 / Verdict
没有阻塞 finding。命名的测试修复目标已完成,生产 long_horizon 与 user_experience 语义保留,开发者得到更准确的失败信号。完整差异没有渲染呈现变化,visual_review 不适用;未验证范围为真实模型采用、冻结运行与整合分支整体净收益。最强剩余边界是此结论只覆盖当前测试修复;合并/readiness保持独立。
English verdict: APPROVE — d7dc851; both wire-row oracles preserve complete values and reject deliberate duplicate emissions; 37 tests and native premerge pass.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
d7dc851 to
54d84d7
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: loopx-agent; exact head: 54d84d7c57529dcd8b8f118b288bf61c49fd8aa6
动机 / Motivation
Initial-read 正向断言会把 delivered parent 展开成逻辑子地址;负向 duplicate 检查若拿这些展开值判断,会把同一 parent 的正常子地址误报成重复 wire row。当前 head 改为直接读取实际 JSON selections 数组,使测试 oracle 与传输行身份一致。main 已经包含等价判断,本 head 在 rebase 后主要保留这组更明确的 wire_pointers 命名,不改变运行时。
改动思路 / Approach
只修改 tests/control_plane/test_context_first_read.py 的两个负向断言:从实际 selections 取得 pointer 列表,检查 delivered descendant 没有被重复发送。正值、未知字段、peer constraint、capture 不变和 recovery 断言全部保留。PR 已从 EdgeBench integration branch 改靶到 main,并在最新 main 上重放。
具体改动 / Changes
关键内容讲解
- 第一个断言确认空 source 的 parent 已 delivered 时,不再重复发送其 descendants。
- 第二个断言确认 acceptance contract 的 parent 已 delivered 时,不重复发送已有 child。
- 新变量名
wire_pointers明确测试对象是 JSON wire rows,而不是正向 helper 展开的逻辑地址。
验证
tests/control_plane/test_context_first_read.py:37/37 通过。- 标准 premerge:direct diff、changed-file compile 和双语检查通过;catalog selection 为 0,无风险冒烟选择,0 manual holds。
- Ruff 和
git diff --check通过。 - 无运行时、协议、状态、权限、持久化或 guidance 变化。
对主干的风险 / Risks
没有发现阻断性风险。变更仅限测试断言命名和读取来源,且 main 已有等价语义;不会改变生产行为。剩余风险只是这个 rebase 后相对于 main 的增量接近零,因此价值仅是测试可读性清理,不应被描述为新的 oracle 能力。
我的整体评价 / Verdict
APPROVE。当前精确 head 已安全改靶到 main,测试仍验证实际 wire rows,并且没有引入运行时行为变化。相对 main 的收益是明确的测试命名清理,而非新的覆盖能力。
English verdict: APPROVE — exact head 54d84d7c57529dcd8b8f118b288bf61c49fd8aa6 is a test-only, main-retargeted clarification. It passes all 37 first-read cases and preserves the actual-wire-row duplicate check without runtime changes.
huangruiteng
left a comment
There was a problem hiding this comment.
Independent approval of exact head 54d84d7 after retargeting to main. The first-read module passes 37/37 and the change is test-only.
Main retarget · 2026-11-03
This PR is retargeted from the EdgeBench integration branch to
mainat the user's request. The current head54d84d7c57529dcd8b8f118b288bf61c49fd8aa6was rebased directly onto mainbeeffb2d64e57341a1cc10a90df47645947d1b46.wire_pointersnaming while continuing to read the actual JSONselectionsrows.tests/control_plane/test_context_first_read.py: 37/37 passed.The historical integration-runtime notes below remain context, but no integration-branch target or aggregate merge claim applies to this current head.
The initial-read helper expands delivered parents into logical child addresses for assertions. Two negative checks incorrectly treated those expanded children as additional wire rows and reported duplicates after parent coalescing.
Check duplication against the actual JSON
selectionsarray instead. Preserve all positive value, unknown-field, peer-constraint, untouched-capture and recovery assertions. This changes one test file, with no runtime or guidance changes.Validation: the complete 37-case first-read module passes against the frozen integration runtime. The isolated interpreter verifies that every imported
loopxmodule comes from that runtime; the corrected test file is a separate validation artifact. The original bundled suite's two failures remain recorded as test-oracle errors, not rewritten as passes. The runtime commit remains unchanged. This PR targets the integration branch for the combined #7930/#7935/#7940 contract; it does not propose an aggregate merge to main.