Skip to content

test(release): align inventory and onboarding validation with contracts - #5149

Merged
huangruiteng merged 1 commit into
mainfrom
codex/release-v1.2.1-inventory-test-parity
Sep 26, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/release-v1.2.1-inventory-test-parity

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

The 1.2.1 release sweep found stale validation assumptions after source simplification and prompt compaction. The live-inventory tests assumed a new fork always exceeded the fixed production ceiling, and searched only the first slack token. The onboarding smoke required an obsolete sentence despite already checking the native Goal activation, visible-Goal spend source, and non-automation classification.

Keep every production threshold and error assertion. Pin the fork test's registry and matching anchor to its measured baseline so the additional fork actually overflows; inspect complete comma-separated slack items so exact zero/two slack remains enforced regardless of sibling order. Remove the redundant prose assertion while retaining all existing typed activation/quota/classification, stop, blocked, and user-resume assertions. No product, permission, state, scheduler, or default behavior changes.

Validation: all116 semantic-vocabulary tests pass; the real onboarding CLI smoke passes, including its existing positive/negative cases. The initial clean-source sweep's three inventory assertion failures are retained as failure evidence. Full repository preflight continues independently; final release qualification and public artifacts are not claimed yet.

…racts

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: 5149@c2f0e11bf46a860fe4be0f65b98fc3442153e262; base: 6669c178bfeb2269d5d67c6203b9f5a535e6e180.

动机

1.2.1 的真实发布检查复现了3处 inventory 测试假设过时,以及1处 onboarding smoke 要求已被压缩掉的旧提示句。这些失败把源码简化产生的预算余量、合法的列表顺序和已有结构化约束误认为回归,阻塞发布。

改动思路

保留原 overflow 错误断言,把 fixture 的 registry 与匹配 anchor 同时固定到其测量基线,使新增 duplicate 必然真正越界;slack 读取完整 token 而不假设排在第一位。onboarding 已验证 native activation、运行 profile、visible-Goal spend source 和非 automation 分类,因此删除重复旧句断言即可。没有生产预算、source classifier、状态、权限、调度、默认行为或 API 改动;没有新 helper 或抽象。

具体改动

完整差异为两个原有验证文件、10行增加和4行删除。当前116项 semantic-vocabulary pytest 通过,实际 onboarding CLI smoke 通过,包括既有正反路径;原 guard 对 missing/invalid snapshot 下的越界 duplicate 仍拒绝,零 slack 与协调增加后的恰好2仍必须披露,native Goal 的 quota 事件仍必须判为非自动化。停止、blocked 与仅用户恢复的原断言保留。Ruff、diff hygiene、3项原生预合入/公开边界检查和精确差异质量回执通过。持续运行和用户体验保持:没有生产代码变化,修复现有验证消费者;最终发布全量资格和真实模型/产物读回仍由当前发布操作负责,当前全库预检未结束,不声称已经发布。

对主干的风险

风险是用放宽测试来掩盖真实退化。本 head 没有改生产上限,保留原拒绝断言,fixture 只在测试范围内协调收紧基线及 anchor;完整 token 检查保留零/恰好2的独立期望。删除的句子不再是 Host 边界的唯一证据:原 activation_method、host_surface、runtime profile、CLI 参数解析、spend source 和 is_automation_run=false 都保留,原停止/恢复行为也保留。没有新的 prose 分类、默认启用、泛化义务或 permission grant。完整2文件差异和原 consumers 已读;局部验证不替代最终干净发布提交的全量资格。

我的整体评价

该修复消除已经复现的验证漂移,完整覆盖同一维护问题,且保持生产门禁。未来改动便利性检查已应用到 fixture 基线和完整 token 断言,移除重复 prose 检查,无需额外框架。当前精确 head 可以按低风险测试/窄清理规则合入;没有当前差异 blocker,最终发布仍须完成独立资格和远程读回。

English verdict: APPROVE

@huangruiteng
huangruiteng merged commit 6d97127 into main Sep 26, 2026
4 checks passed
@huangruiteng
huangruiteng deleted the codex/release-v1.2.1-inventory-test-parity branch September 26, 2026 21:05
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