Add Codex fork replay regression for submit cap failures
Merged
MI
6mo ago+27+27+01234567890123456789-0-0-0123456789
Summary
- Adds a focused Codex parser regression test for the submit-cap failure shape reported in #650.
- Covers forked child sessions that replay very large inherited cached-input rows before only a tiny child-local increment should be counted.
- Keeps this PR test-only because current
mainalready includes recent fork replay handling; this locks the high-cache submit failure pattern as coverage.
Why
A published tokscale 3.0.0 submit run rejected local data because two Codex-heavy days exceeded the server daily token/cost caps. The local evidence pointed to high-fanout forked subagent rollout sessions with huge inherited cached-input rows. This fixture makes that shape explicit without including any private session data.
Closes #650 if current main behavior is considered the intended fix; otherwise it should at least provide a regression anchor for the next parser change.
Test plan
cargo fmt --checkcargo test -p tokscale-core sessions::codex::tests::test_forked_child_submit_cap_regression_skips_large_inherited_cache_replays -- --exactcargo test -p tokscale-core sessions::codex::tests::test_forked_child -- --nocapture
Summary by cubic
Add a focused regression test for Codex fork replay in forked child sessions. It ensures large inherited cached-input replays are skipped and only the small child-local usage counts toward submit caps, preventing the failure reported in #650.