session: control the clocks in the slowest regression tests - #1733
Merged
Merged
Conversation
Twelve internal/session tests spent about 123 seconds (sum of local medians) waiting on real wall clocks: watch tickers, the team traffic settle, the steer grace, a blocked phase listener and a stalled checker's call share. They are a large share of the session leg in every pull request's touched-packages run, and a real-clock window is also the shape behind the suite's load-only failures (#1664, #1339). Each now drives the same real commands, queues, landings and receipts, and waits on an acknowledgement or an explicit clock advance instead of time passing. The product gains four private seams (a watch tick wait, a steer timer, a manual team traffic clock and a checker timeout), each nil or false in production and falling through to the call it replaces, so no default, window or person-facing behaviour changes. Every changed test was proved against a product mutation of the behaviour it pins. The sum of medians for the twelve is now about 4 seconds. The two plandb CLI tests that run a real loop through bash (about 35 seconds each) are left as they are: they are integration tests and a faster version would have to stop running the real CLI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What
Twelve
internal/sessiontests spent about 123 seconds (sum of local medians, ten runs each) waiting on real wall clocks: watch tickers, the team traffic settle, the steer grace, a blocked phase listener, and a stalled checker's call share. They are a large share of thesessionleg in every pull request'stouched packagesrun, and a real-clock window is the same shape behind the suite's load-only failures (#1664, #1339).Each test now drives the same real commands, queues, landings and receipts, and waits on an acknowledgement or an explicit clock advance instead of on time passing. Sum of medians after: about 4 seconds.
Product code
Four private seams, each
nil/falsein production and falling through to the exact call it replaces:jobRegistry.watchTickWait,Agent.steerAfter,Config.teamWatchManual, andConfig.auditTimeout→callWindow.timeout. No default, window, limit or person-facing behaviour changes, so no manual page changes.Validation
-count=10focused runs for every changed test;go vet, gofmt,make test-laws.make pr-readyon this branch: light gate green; the full session suite failed three tests that this branch does not touch (TestARefutedNodesRepairRoundRunsOnTheCarefulModelandTestTickingAnItemMovesTheRowToTheNextItem: "task 1 never finished" on a fixed 30 s wait;TestSpendRowsFollowThePlanNode: 3 spend rows for 2 calls) while the box was at load ~40. All three pass 3/3 on this branch and 3/3 on plain dev once the load dropped, and no helper they use is changed here. They are pre-existing load-sensitive tests.Not changed
The two plandb CLI tests that run a real loop through bash (about 35 s each) are left alone: they are integration tests, and a faster version would stop running the real CLI.
🤖 Generated with Claude Code