Skip to content

Add Codex fork replay regression for submit cap failures - #651

Merged
IvGolovach merged 1 commit into
junhoyeo:mainfrom
minislively:minislively/codex-fork-submit-cap-regression
Jun 5, 2026
Merged

Add Codex fork replay regression for submit cap failures#651
IvGolovach merged 1 commit into
junhoyeo:mainfrom
minislively:minislively/codex-fork-submit-cap-regression

Conversation

@minislively

@minislively minislively commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a focused Codex parser regression test for the submit-cap failure shape reported in Codex forked subagent sessions can make submit exceed daily validation caps #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 main already 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 --check
  • cargo test -p tokscale-core sessions::codex::tests::test_forked_child_submit_cap_regression_skips_large_inherited_cache_replays -- --exact
  • cargo 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.

Written for commit c5cf62b. Summary will update on new commits.

Review in cubic

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
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
tokscale Ignored Ignored Preview Jun 1, 2026 1:03am

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@IvGolovach
IvGolovach merged commit 2d90f41 into junhoyeo:main Jun 5, 2026
15 checks passed
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.

Codex forked subagent sessions can make submit exceed daily validation caps

2 participants