Repository navigation
Make the nightly Full check green: one product race, the process-wide unbilled count, and test races - #3023
Merged
Conversation
A same-request caller that read the intent claim inside claims.create, before b.starting was set, was answered "uncertain" where the contract says "busy". Reproduced 21 times in 1500 runs of TestStartCrewConcurrentSameRequestSendsTheGoalOnce under load; 0 in 1500 with the mark raised first. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… config.json Nothing in TestAppWireCustomStorageFailureCanRetryWithoutDuplicate created the profile file it renames; the start-up warm-up does, in the background. Delaying the warm-up 300ms makes the old test fail every time with the CI message. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…exit does The warm-up opens the process-wide engine half once a key exists and its model discovery keeps writing into the profile; only closeEngineProcess joins it. Without it TempDir removal can race a late write (model-catalog.json was seen changing after the cleanups). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The another-computer branch seats the chat a second time and nothing closes that seat; its warm capture seals the first seat's unsaved call in the background. After the body returns the store's wal, pack, catalog and workspaces/t-<hash> were still being written (8 files, 5 of 5 runs); with the second seat drained only a daemon bookkeeping file changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first read after the agent.changed event answered the local copy in 3 of 8 loaded runs. The contract is the saved page at the remote head, so that is what is waited for. 12 of 12 loaded runs pass. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The 2026-11-29 nightly timed out here with no state in the message. Report whether the start was attempted, may retry and how long its retry wait is, so the next occurrence explains itself. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…a gate The test bounded the foreground turn at four seconds against a two-second clock and the nightly measured 4.77s on a loaded runner. The command now waits for a file the test creates after the turn returns, so only the clock can have ended the foreground wait; the lower bound stays. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
session.UnbilledCalls is a process-wide count that only grows, and TestExportAfterCompactKeepsAllJournalTurns2685 leaves 13 calls unpriced (its stream carries no usage), so every nightly shard that ran it first drew an unbilled row on the Spending tab. The count is now read through a variable the test sets, and a companion test pins when the row appears. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <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.
The nightly
Full checkondevhas failed every night since at least 11-16, with a different set of tests each night (runs 11-2846170416581, 11-2946289973210, 11-3046524507020, 12-0246826566078). The 11-30 and 12-02 runs are the same commit and failed on different tests, so most of these are races, not regressions. Each cause below was reproduced (or its straggler observed) against a baseline test binary built fromdev, and the fix run against the same load. The load is a few niced CPU burners beside the test, to imitate the 4-shard CI runner.What was wrong, and the fix
TestTheSpendingTabIsTheSevenRowsAndNothingElse(every night)session.UnbilledCallsis a process-wide count that only grows.TestExportAfterCompactKeepsAllJournalTurns2685leaves 13 calls unpriced (its fake stream has no usage block), so anyinternal/tui3shard that runs it first draws anunbilledrow. Shard 3 of 4 does, every night. Reproduced exactly at baseline.TestStartCrewConcurrentSameRequestSendsTheGoalOnceCrewStartsetb.startingafterclaims.createreturned, but another caller can read the claim insidecreate. It saw an intent claim with no mark and answereduncertain, where the contract isbusy. 21 failures in 1500 runs at baseline.TestStorageOffSeatedTurnStopsWhenAnotherComputerContinuesIt(another computer)workspaces/t-<hash>were still being written (8 files, 5 of 5 runs), which is the directoryRemoveAllfailed on.TestAppWireCustomStorageFailureCanRetryWithoutDuplicateconfig.json, which only the start-up warm-up creates, in the background. With the warm-up delayed 300ms the old test fails every time with the CI message.TestAppWireRegionSurvivesReopencloseEngineProcessjoins it.model-catalog.jsonwas seen changing after the cleanups.appProviderTestcloses it after the backend, as the app's exit does. Not reproduced as a failure locally (1 straggler write in 6 runs at baseline, 0 in 6 after).TestAppPassThroughTitleAndPreviewagents.entriesafter theagent.changedevent answered the local copy in 3 of 8 loaded runs.TestTheBackgroundAfterClockKeepsTheCommandAndTheConversationMovesOnTestC3AppHostedDisclosureWaitsForAcknowledgement/desktop_acknowledgestimed out waiting for hosted background startup, 30s). Not reproduced in 8 loaded local runs. A startup that fails once retries after 5s, 10s, then 20s, so a second failure can outlast the 30s ceiling.Not in this PR
TestRegistryCoversEveryUserFacingEnvironmentPinwas already fixed by fix(shell): login PATH marker no longer reads as an unregistered setting #3009.TestGuardOwedAbsoluteMeasuredCommand(TestGuardOwedAbsoluteMeasuredCommand fails on a clean dev tree #3008) is fix(test): seed TestGuardOwedAbsoluteMeasuredCommand with CheckContext (#3008) #3017's.TestAppPassThroughTitleAndPreview) could briefly serve a stale local page to a client that reads straight afteragent.changed. It self-heals on the next event. Left alone because it sits in the chat-move code and was not proven harmful.Validation Contract
request_idstart that arrives while another is in flight is answeredbusy, neveruncertain.uncertainis only for a claim another process holds or a start that stopped early.unbilledrow directly under the day, only when calls did.keys.setreports an error, adopts no credential, and a retry persists exactly one row.agents.entriesreturns its saved page at that head.Each test maps to one line above. No test was reshaped to fit current output; the one product defect (the start mark) is fixed in the product.
What was driven
Drove the real
bin/codeafbuilt fromeabc825e3aover thecodeaf appstdio wire, with a throwaway home and a scripted model. A freshcrews.createwithstart_managerstarts once. A repeat of the same request is replayed, and the goal reaches the manager once. Two identical requests fired 0–40 ms apart, 160 pairs per run, two runs: every second caller was told busy or replayed, with 0 answered uncertain, and the goal was delivered once in all 320. The same sweep on deva549981183answered uncertain in 8 of 160.🤖 Generated with Claude Code