Skip to content

Rotate the submit_result turn token on every steering followup - #967

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-6946-submit-result-channel
Sep 13, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-6946-submit-result-channel

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Steering a leaf worker mints a fresh submit_result turn token, resets the correction budget, and states the replacement in the steer through the same shared notice the dispatch brief uses
  • The submit_result handler reads the live token binding, so submissions under a superseded token are rejected as stale
  • Builds on the landed correction-flow and stale-token rejection work from prior channel PRs without duplicating it

Verification

  • bun run check passes: lint, typecheck, build, and the guarded suite (7134 pass, 0 fail across 489 files)
  • New end-to-end rotation test drives real runSubAgent wiring: the steered send carries a different token than the dispatched brief plus the replacement contract
  • New pure tests cover budget reset on rotation and byte-identical notice rendering between dispatch brief and steers

Fixes CL-6946

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CL-6946

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Audit: Approve. Turn-token rotation on steer is the correct freshness model: the handler reads the live binding so a submission under the old token is rejected as stale, and resetSubmitResultTurn gives the replacement token a full correction budget. Tests pin both halves. File-for-later, no change: the currentToken === undefined early return (this run has no turn token) looks unreachable for leaf runs that actually mount submit_result, since the token is always minted for tier leaf. If a non-leaf tier can reach the handler, a comment naming that tier would close the question.

@TheGreatAxios
TheGreatAxios merged commit d2ccdcd into main Sep 13, 2026
9 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.

1 participant