Skip to content

test(turn): align DSH exhausted-retry smoke with effect uncertainty - #5153

Merged
huangruiteng merged 1 commit into
mainfrom
codex/release-v1.2.1-dsh-readback-tests
Sep 26, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/release-v1.2.1-dsh-readback-tests

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

The existing built-in DSH smoke still treats an exhausted-retry error as proof that no invocation effects occurred. The merged error-readback contract deliberately preserves unknown current-invocation effects and reports the original Turn journal separately.

Require nullable effects with current_invocation scope plus original_turn journal/zero-spend readback. Keep the independent host counter at exactly3, provider-capacity retries/backoff, successful validation/spend, replay with no effects, exhausted no-reinvoke and raw-provider-prose exclusion checks. No production or budget change.

Validation: the old smoke failure is reproduced; corrected actual built-in adapter/CLI end-to-end smoke and23 error-readback/journal tests pass, along with Ruff and public-boundary scan. The DSH runner is a synthetic executable, not a live provider qualification. Bounded simplification: reuse existing uncertainty/journal semantics, no new helper or smoke.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>

@huangruiteng huangruiteng 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.

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

Reviewed exact head: 5153@0ba5aa7dcd16799010690c87df0ff1ed95a1f87d; base: 300dac82717ebefea78bd67c527b3c1d2f1f43d7.

动机

1.2.1全量预检与独立运行都复现了旧 DSH smoke 把重试耗尽异常的未知副作用当成全部未发生。已经合入的#5142合同要求当前调用保留未知值,原 Turn journal 单独记录。该修复维持真实错误语义,避免为了测试通过恢复虚假的全 false。

改动思路

在原有实际 adapter/CLI 集成 smoke 中,把错误的4项 false 期望改为 null,区分 current_invocation 与 original_turn,并核验原 journal 的零配额事实。当前未知值不证明没有调用,因此独立 host 文件计数与 quota 账本保持不变;不增加 helper、smoke、runtime 或预算。

具体改动

单个既有 smoke 增加9行、删除4行。实际 built-in adapter/CLI 端到端检查和23项 error/journal pytest 通过。成功路径仍只支出1次,replay无副作用;capacity3次仍要求相同配置、backoff30/60/120、零支出,第4次被 blocked 且 no-reinvoke,实际 host计数必须恰好3,原 provider文字不得落盘。Ruff、diff、公开边界、原生预合入和当前质量回执通过;首次原生检查缺 root npm依赖,安装后相同门禁重跑通过。没有查询或等待 CI。这里的 runner 为合成可执行文件,证明真实 adapter/CLI边界,不宣称真实 DSH模型运行或最终发布资格完成。

对主干的风险

风险是更新断言后掩盖额外调用或配额副作用。保留的实际文件计数、账本和 no-reinvoke是独立证据,不从被测 payload推导期望;null只表达当前调用无法证明的事实,原 Turn有独立 scope和零支出读回。完整单文件差异没有生产代码、权限、调度、profile、状态或 API变化,也没有删掉原成功、重放、重试和隐私检查。原错误已复现,修复后的正反路径已运行。持续工作及用户恢复体验保持原合同;最终发布仍需最终干净源码全量资格。

我的整体评价

这是完整、必要、可回滚的既有测试修复;没有用宽松断言替换执行上限,也没有建立第二个副作用事实源。未来改动便利性检查复用现有 scoped error/journal语义,并保留独立效果计数,额外抽象无价值。当前精确 head无 blocker,可按低风险测试规则合入,后续发布验收继续由当前授权任务负责。

English verdict: APPROVE

@huangruiteng
huangruiteng merged commit 0b71557 into main Sep 26, 2026
4 checks passed
@huangruiteng
huangruiteng deleted the codex/release-v1.2.1-dsh-readback-tests branch September 26, 2026 21:31
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.

1 participant