Skip to content

test: preserve context overrides and exercise session recovery - #7899

Merged
huangruiteng merged 5 commits into
mainfrom
codex/native-progress-guard-fixture-20261102
Nov 2, 2026
Merged

huangruiteng merged 5 commits into
mainfrom
codex/native-progress-guard-fixture-20261102

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Two validation fixtures can miss their intended boundary. Raw quota assertions can receive Context Delivery reader references, and the retired-session recovery scenario can receive a streamed answer before its intended snapshot failure occurs.

  • Default the raw quota helper to off only when the caller omitted the option; retain split and equals forms of explicit on/off. Ten real File/SQLite option cases cover that boundary.
  • In the existing conversation-return scenario, wait for the actual requestfailed event before publishing the late result. Match the original Session pathname and retain the failure, recovery, deduplication, delegation and no-new-model assertions.

Production defaults, permissions, context/return semantics and product UI are unchanged. The complete change is confined to one existing Python test module and one existing browser scenario.

Validation:

  • Full raw progress/replay/comparison module on the integrated baseline: 26 passed.
  • The option regression fails exactly the two equals-on cases under the original condition.
  • Real conversation-return browser scenario passes after ordered fault injection; conversation return unit checks and JavaScript syntax pass. The earlier CI failure and local pass/fail observations exposed a setup race, rather than a product data-loss fix.
  • Standard premerge, Ruff, compile, diff/bilingual gates and public-boundary scans passed.
  • Supplementary staged-read diagnostics with explicit off retain the same four recovery.path failures on immutable base 8d314af4955c86ea389b0916eda5f1a51f30b966 and the earlier reviewed head (19 passed / 4 failed); these are not reported as passing validation.

Final-head review and merge readiness remain separate.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent — gpt-6.1-sol / OpenAI; runtime_reported; reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

精确 head:cf2022045d15d70ab46a6fd6151ce9861235dc70;base:fb16c6cb1369efce52a673030c914b38e1dac166。发现一个有界的参数覆盖问题,结论不依赖 CI。

[P2] 保留等号形式的显式 Context Delivery 设置 — call_progress_cli L120–121。"--context-delivery" not in args 只识别分词写法。合法的 --context-delivery=on 会被当作省略,再追加 --context-delivery off,最后一个设置覆盖原意。实际 File、SQLite 子进程均复现:base 的两种 on 都返回 context_capture_navigation_v1;head 的分词 on 仍返回 navigation,等号 on 却返回 raw autonomous_replan_required。同时识别 --context-delivery 与 --context-delivery=VALUE,只有确实省略选项时才补 off;增加两种 on/off 写法的 helper 回归。

动机 / Motivation

维护 typed progress / replan 回归的开发者和评审者。
既有测试直接读取 authority decision;在默认 Context Delivery 已启用的机器上,base 先返回 reader navigation,原断言因缺少 decision 而失败,尚未检验 replan。
head 的16个既有 File/SQLite case 全过,省略参数时恢复 raw decision;但显式 --context-delivery=on 被 helper 追加的 off 覆盖,和等价的分词写法不一致。
本次只评审已有测试 helper 的隔离,不改变生产默认、权限、quota 或 settlement;不要求 CI 成功,不安装、不合并,不用组合分支结果替代独立证据。

改动思路 / Approach

让 authority-focused 测试显式选择 raw 输出,是合适的局部隔离。恢复旧的生产默认、关闭机器全局配置或删除 replan 断言都会扩大问题;现有 helper 已足够,当前四行也没有引入另一个决策 owner。需要修的只是“是否已经给定选项”的判断,不能把一个有效覆盖写法吞掉。这是测试入口自身的行为问题,影响范围小,但与明确的 omitted-only 约定相反。

验收来源为当前任务 https://github.com/loopx-project/loopx/pull/7899,`spec_revision`:`cf2022045d15d70ab46a6fd6151ce9861235dc70`。逐项核对:`raw-authority` implemented,explicit-overrides not_met,production-parity implemented。这里没有把私有组合资格、CI 或未来模型效果变成本 PR 的前提。

具体改动 / Changes

关键代码讲解

完整 diff 只有 tests/control_plane/test_replan_progress_native_cli.py 的 +4/-0。call_progress_cli 在实际子进程之前,为 quota should-run 补 off;其他命令不经过此分支。子进程仍用同一 sys.executable -m loopx.cli、明确 fixture registry/runtime 和项目 cwd,原 exit code 断言未删。

其消费者包括六种 typed-progress 情景乘两种后端,以及 original/source-bound 两类 executed-comparison 情景乘两种后端。它们继续检查真实 admission、错误进展拒绝、原始 authority 与 registry 不变、restart 后幂等 replay、实际 assignment 对比产生的后续工作。这里的最小修复应保留这些语义,不增加一套框架。当前调用全部省略 context 选项,这也解释了16项通过为何仍不足以覆盖 F1。

对主干的风险 / Risks

PASS:当前完整模块 16 passed,immutable main 的原目标用例实际 KeyError: decision;standard premerge 5 direct + 3 canaries 全过、Ruff 通过,无 skip/hold。生产 diff 为空,未修改 native context 生命周期覆盖。

FAIL:另用相同 source-pinned harness,在两种后端各比较省略、分词 on、等号 on、分词 off、等号 off,共 20 次 base/head 真实 CLI 观察。head 的省略输出按预期变 raw;两个 off、分词 on 保持;等号 on 两项失败。预期来自“显式设置继续生效”,而非新 helper 的输出。最初探索遇到的 capture-root 路径/权限准备失败已保留为测试设置错误,未归因到 PR;使用物理、私有目录后上述控制完整执行,未改 active Goal。

CI 为 UNVERIFIED,未查询、轮询或等待。wheel、Windows、安装采用及长期净收益未验证。扫描了既有 native CLI/context coverage 和同来源相关改动,未增加重复 smoke;共享 GitHub 账号不证明同一自然作者。

我的整体评价 / Verdict

遗漏参数的修复有真实价值;当前 head 尚未完整满足显式覆盖承诺,建议按 F1 修正现有条件并覆盖两种拼写后重审。完整 diff 只改 tests/control_plane/test_replan_progress_native_cli.py 的参数补齐,没有产品页面、布局或图形呈现变化。独立 wheel、Windows、完整 CI、安装采用及长期净收益未验证。此结论不改变生产默认,也不授合并或安装权限。

English verdict: REQUEST_CHANGES — cf2022045d15d70ab46a6fd6151ce9861235dc70 fixes omitted-option authority tests, but overrides valid --context-delivery=on; paired real File/SQLite CLI probes reproduce the regression despite 16 passing existing cases.

…ure-20261102' into codex/repair-pr7899-20261102

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 loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent — gpt-6.1-sol / OpenAI; runtime_reported; reasoning_effort=xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

精确 head:1f46ea982ee9e10fdd555ad358470b376939ba88;验收基线:8d314af4955c86ea389b0916eda5f1a51f30b966。无阻塞 finding;原 F1 的等号形式覆盖问题已通过实际子进程回归核验。

动机 / Motivation

维护 typed progress / replan 回归的开发者和评审者。
机器已启用 Context Delivery 时,原测试可能先拿到读取引用;最初补丁又把等号形式的显式 on 覆盖成 off。
现在省略参数稳定返回原始决策,分词和等号形式的 on/off 都保留调用者选择。
本 PR 只隔离既有测试入口,不更改生产默认、权限、quota 或结算策略。

改动思路 / Approach

保留现有 call_progress_cli 和真实 CLI,不用修改生产默认或减少原断言来让测试通过。只有 argv 确实没有该选项时补 off;完整 --context-delivery token 和 --context-delivery=VALUE 都视为显式设置。这是局部 fixture 输入隔离,生产 quota owner、权限及持久状态不增加分支。最小修复已经在原 helper 内完成;同域重构采用复用原 fixture、原清理路径,新增框架不必要。

具体改动 / Changes

关键代码讲解

  1. call_progress_cli 在实际子进程调用前检查选项拼写;子进程仍采用原解释器、fixture registry/runtime 和项目 cwd,exit code 断言保留。
  2. test_progress_cli_context_delivery_overrides 将机器默认显式设为 on,分别运行省略、分词 on、等号 on、分词 off、等号 off;两种 authority provider 共十项用例,直接检查 navigation 或原始决策。

规范来源为 https://github.com/loopx-project/loopx/pull/7899,`spec_revision=cf2022045d15d70ab46a6fd6151ce9861235dc70`。`raw-authority`、`explicit-overrides`、`production-parity` 均为 implemented:省略时检查真实决策、显式设置生效、完整 diff 仅同一测试模块 +40/-0。其余16项继续检查进展拒绝、持久结果、restart replay 与实际比较后续工作。

对主干的风险 / Risks

PASS:完整模块 26 passed;在修复条件之前,新十项用例恰好复现 equals-on 的两项失败,另八项通过。最终 standard premerge 5 direct + 3 canaries、Ruff、compile、双语 gate、diff hygiene 与公开边界扫描通过,无必要验证 skip。

额外 staged-read 套件的失败没有隐藏:本机环境默认 on 时为13通过/10失败;显式 off 后,在不可变 8d314af4955c86ea389b0916eda5f1a51f30b966 与当前 head 均为19通过/4失败,四个 native reader 情景都在 L259 读取旧 recovery.path 时 KeyError。该真实路径没有调用本 PR 的 helper,产品和该测试源码在两版相同;这是既有旧格式断言,不能算本次通过,也不把它误报为新回归。远端尚未结束的 CI 保持 UNVERIFIED,由 merge-readiness 单独等待。

我的整体评价 / Verdict

遗漏参数的隔离与显式拼写承诺均已完成,新增回归能检出此前16项没有覆盖的错误。长程产品行为未改,不声称模型收益;用户产品旅程也未变。完整 diff 只有测试模块,没有渲染页面或图形改动。当前 head 的改动规模合适,现有 helper 足够;更广的 native reader 断言修复不混入这个测试隔离 PR。Windows 安装与长期模型效果未验证;额外诊断失败和 CI 等待保留为独立限制。

English verdict: APPROVE — 1f46ea982ee9e10fdd555ad358470b376939ba88 preserves explicit split/equals context-delivery options and isolates omitted-option authority fixtures; 26 cases and standard premerge pass. Existing staged-read failures and pending CI remain separately disclosed.

…0261102

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 loopx-agent changed the title test(replan): isolate raw guard fixtures from context presentation test: preserve context overrides and exercise session recovery Nov 2, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent — gpt-6.1-sol / OpenAI; runtime_reported; reasoning_effort=xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

精确 head:8a42421fa9709dd7b0d2578f95ec18995f8a0d7c;当前目标 base:fd05b56cf9105dcc47700bbfcc719221fbe51490。无阻塞 finding。相较上次1f46审查,新增CI故障注入时序修复并同步main;以下按完整两文件diff重新判断。

动机 / Motivation

维护真实 quota 回归和会话回流恢复验证的开发者及评审者。
展示默认会让原始决策断言收到 reader 引用;回流测试又可能先由流收到晚到结果,尚未触发计划中的读取失败。
省略设置和两种显式参数拼写有独立覆盖,恢复场景先观察真实 requestfailed 再发布结果,保留后续完整恢复断言。
完整 PR 只修改两个既有验证文件,不改变产品默认、权限、quota、回流执行或页面呈现。

改动思路 / Approach

继续复用原 call_progress_cli 与 conversationReturnContinuityScenario。前者只补真正遗漏的展示开关;后者把故障事件作为发布晚到结果之前的测试输入约束。真实 quota 和 frontend 恢复仍由已有产品 owner 执行,没有另建决策层或假定恢复成功。

时序修复来自实际CI和本地请求观察:旧Turn流可能先送回结果,旧测试随后检查尚未发生的快照失败。原匹配在本地也可能通过,所以没有把后来一次绿视为修复。现在先等待目标Session真实 requestfailed,再提供结果,原恢复/去重/原交办/模型计数断言全部保留。局部复用和明确事件顺序足够,不需要新增框架或产品分支。

具体改动 / Changes

关键代码讲解

  1. call_progress_cli 同时识别分词与equals设置,只有两者都没有时补off。原子进程解释器、registry/runtime、cwd与exit断言保留。新参数化用例以机器默认on执行五种输入乘两种backend,直接观察navigation/raw。
  2. conversationReturnContinuityScenario 先注册目标Session的失败事件等待,再abort一次真实读取,等浏览器确认失败后才发布晚到结果。pathname匹配只对应原Session;返回仍须出现一次、原交办仍在、模型调用数不增加。

完整diff 两文件 +48/-1。规范为当前任务 https://github.com/loopx-project/loopx/pull/7899,`spec_revision=cf2022045d15d70ab46a6fd6151ce9861235dc70`;原会话恢复断言和CI1f46失败补充当前修复边界。`raw-authority`、`explicit-overrides`、`production-parity`、`ci-recovery-order` 均 implemented。没有将main已合并的产品历史算作本PR新增行为。

对主干的风险 / Risks

PASS:同步main后的真实File/SQLite完整模块 26 passed;旧条件能复现两个equals-on反例。最终浏览器恢复场景在普通和CI coverage两种运行方式都通过;conversation-returns unit checks、JS语法、Ruff与compile通过。标准premerge 5 direct + 5 catalog + 1 boundary、双语和diff gate通过,无必要验证skip。

保留负面证据:旧browser setup曾在CI失败、也曾本地通过;分页专用注入候选没有击中实际snapshot owner,已弃用。最终采用已观察到的读取失败与结果发布之间的因果顺序。早先staged-read扩展诊断在不可变8d与旧1f46显式off下均19通过/4个recovery.path断言失败;旧默认环境运行13通过/10失败。这些是有来源修订的历史诊断,没有伪装成当前通过或当前新回归。当前两处改动有独立真实路径覆盖;新head的远端CI仍交给merge-readiness完整等待。

我的整体评价 / Verdict

当前修复同时恢复参数隔离的承诺和CI恢复测试的有效输入顺序,规模与已证实问题相称。完整 diff 只有测试模块和故障注入场景,没有产品页面或图形改动。产品长程执行、quota和持久状态未改,也未声称模型收益;原用户路径和权限保持。现有测试清理和产品owner足够,更大抽象不必要。浏览器后端为合成fixture;live安装、所有平台和长期模型效果未验证。APPROVE不替代新head的CI及合并资格。

English verdict: APPROVE — 8a42421fa9709dd7b0d2578f95ec18995f8a0d7c preserves explicit context options and orders the actual failed read before late-return publication. The26-case module, real recovery scenario with/without coverage, and standard premerge pass; historical diagnostics and fresh CI remain separately disclosed.

@huangruiteng
huangruiteng merged commit d918dd1 into main Nov 2, 2026
5 of 6 checks passed
@huangruiteng
huangruiteng deleted the codex/native-progress-guard-fixture-20261102 branch November 2, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants