Skip to content

Restore Chat session and Steward retry qualification - #9724

Open
cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/mainline-chat-qualification-20261201
Open

cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/mainline-chat-qualification-20261201

Conversation

@cocolord

@cocolord cocolord commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Goal And Delivered Outcome

  • Restore two Chat regressions found in the latest full Python run. GET and POST now count the real Effect runtime revision resolution for each request. The tests still verify fresh workspace grant readback and reject access after revocation. Latest main run
  • Restore the Steward regression from the preceding run. The fixture now aligns with the merged zero-write autonomous replan contract. It checks one bounded pre-commit retry and refuses a retry after committed state writeback. Preceding main run · Contract change

Author Declaration

  • Written by the Codex agent (OpenAI GPT-6).
  • Implemented against the existing HTTP admission and Steward recovery behavior at 2d47ab9efa. The diff updates two existing tests.

Validation

Check Result Evidence
Regression parity Passed All three failures reproduced before the test updates. The related four-file suite passed 52 cases with Python 3.14 and coverage.
Exact-head verification Passed Seven cases passed with coverage at ec3d5e38a61d7376781b59bef166038c2412e023. Only an upstream bilingual document update separates this base from the full 52-case run.
Local integration Passed The same seven cases and bilingual diff check passed on the #9053 integration tree with its prerequisite fixes.
Standard premerge Passed Five direct and seven selected checks, plus Ruff.

The six full Python shards remain the hosted integration gate. UI impact is none. The commit includes DCO sign-off.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

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.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

维护 Chat 会话准入和 Steward 自动恢复的开发者与值班人员。 主干的两条 Chat 用例在实际读取成功后仍因目录扫描计数为零失败,Steward 用例则仍把已调用宿主的零写入轮次当成不能重试。 候选重新用实际修订解析和零写入回执验证两个原有约定,恢复三个既有回归的有效判定。 改动集中在现有两个测试文件,运行时实现保持原样。 验证覆盖 macOS、Python 3.14、真实 HTTP 处理及隔离状态。Steward 单例使用合成回执,未跑外部宿主或全量托管分片。 固定依据

改动思路 / Approach

在真实 _runtime_fingerprint 外层统计调用,连续两次请求各解析一次,并在撤权后验证拒绝。Steward 直接走现有重试 resolver,切换同一合成回执的 state_written 检验两种返回。 两个 HTTP 路径复用正常结果,撤权后 GET 返回 409、POST 返回 400,会话列表不变且没有新 Turn。Steward 过冷却后只取原 .precommit-retry,写回已提交时返回 None。四个定向文件共 46 项通过。 源码扫描调整 · 已合入的重试契约

具体改动 / Changes

精确提交 ec3d5e38a61d7376781b59bef166038c2412e023,基线 2d47ab9efad0654dc37dbb4994663bb08637b3df。两个测试文件 +20/-17,复用原 HTTP 夹具及现有 Steward 投影测试。 依据 docs/development/good-smokes.md。请求修订隔离和撤权拒绝继续通过实际 HTTP handler 验证。零写入重试遵循已合入的恢复契约。

关键代码讲解

test_http_reuses_code_scan_but_rereads_revoked_grants 包装原解析函数并持续执行真实请求。test_resolve_advancement_turn_id_handles_selection_deferral_and_precommit_retries 同时确认原冷却、后继组合和次数上限,新加已提交分支。从 Git diff 可确认两处生产 owner 无改动。

对主干的风险 / Risks

基线两个 Chat 用例在 os.walk 断言得到 0,旧 Steward 断言把返回的 .precommit-retry 误判为失败。候选上以进程内故障注入模拟跨请求复用旧修订,GET 和 POST 都发现零次解析。取消请求内固定后,POST 捕获 8 次解析,GET 在该夹具仍只调用一次。忽略已写回标记时,Steward 新拒绝断言准确失败。 标准预检 5 项直接、7 项选中检查全部通过,Ruff 和 git diff --check 通过。 验证覆盖 macOS、Python 3.14、真实 HTTP 处理及隔离状态。Steward 单例使用合成回执,未跑外部宿主或全量托管分片。 Chat 测试 · Steward 测试

我的整体评价 / Verdict

批准。 三个旧失败均复现,候选恢复可读的资格校验。保留撤权后拒绝、请求间重新解析,以及已写入轮次不再重试的断言。故障注入证明新增断言会失败,生产运行时和用户界面沿用原行为。

English verdict: APPROVE at ec3d5e3. The existing Chat and Steward tests now track their shipped contracts. All 46 scoped tests and premerge pass. Local counterexamples exercise stale or repeated revision resolution and the post-write retry guard.

This branch has not been deployed

No deployments
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