Add Codex fork replay regression for submit cap failures - #651
Merged
IvGolovach merged 1 commit intoJun 5, 2026
Merged
Conversation
A high-fanout Codex subagent day can make published submit payloads exceed server daily caps when replayed inherited cache rows are counted. Add a focused regression fixture that keeps the latest fork replay behavior anchored to the submit failure shape without changing parser semantics. Constraint: Public issue junhoyeo#650 reports validation failures from sanitized local Codex fork-rollout evidence. Rejected: Change parser logic in this PR | current main already contains fork replay skipping; this PR locks the submit-cap shape as coverage. Confidence: medium Scope-risk: narrow Tested: cargo fmt --check Tested: cargo test -p tokscale-core sessions::codex::tests::test_forked_child_submit_cap_regression_skips_large_inherited_cache_replays -- --exact Tested: cargo test -p tokscale-core sessions::codex::tests::test_forked_child -- --nocapture
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainalready includes recent fork replay handling; this locks the high-cache submit failure pattern as coverage.Why
A published
tokscale 3.0.0submit 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 -- --nocaptureSummary 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.
Written for commit c5cf62b. Summary will update on new commits.