Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): repeated capture timeouts no longer delay turn starts #29196

Mergedvoltcrash(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/29196/headmerged by maria-rcks View on GitHub

voltcrash(GitHub profile, opens in a new tab)commented

Problem

Repeated checkpoint capture timeouts make each new turn spend the five-second baseline budget before starting without a snapshot. The workspace keeps retrying even after capture has repeatedly failed.

Change

After two consecutive capture timeouts in a workspace, skip attempts to create missing baselines. Count both the five-second baseline expiration and VCS process timeouts. Every post-turn capture still runs with its existing budget as a recovery probe; success or a non-timeout capture failure clears the streak. Existing refs remain usable, and workspace locking, snapshot ordering, and restore validation stay intact.

Timeout streaks are in memory and bounded to 128 workspaces. After repair, a pre-turn baseline may remain missing until a successful post-turn capture clears backoff.

Scope

Addresses #28996 with a focused correction to repeated baseline retries after demonstrated capture timeouts. Only the checkpoint service and its tests change. No maintainer direction approval is claimed; maintainers determine contribution eligibility. No changes to clients, providers, contracts, steer handling, or Git cleanup.

Verification

  • The regression tests fail on the reviewed upstream base: a third baseline fails after another actual five-second expiration instead of skipping, and repeated VCS timeouts attempt capture three times instead of two.
  • All four checkpoint-service tests pass, including budget expiration, workspace isolation, concurrent capture, existing-ref handling, unrestricted post-turn probes, and recovery/reset behavior. The broader focused run passes 101 tests across five files.
  • vp run check:changed fd8e386f7f259070899553e55c99a2a49a378480 --concurrency 1 passes format, lint, knip, generated GraphQL checks, affected typechecks, and adjacent tests.
  • Final rebase onto 4e48d9e6a5aba8d0184ac2c953598086ed034c29 adds only unrelated upstream browser-test fixes. The approved checkpoint diff is byte-for-byte unchanged; range-diff reports an equivalent patch.

Real-Git service runtime, using the actual five-second baseline budget:

first baseline: Failure, cause TimeoutError (real five-second budget), stage attempts: 1
post-turn checkpoint: error (injected VcsProcessTimeoutError), stage attempts: 2
next baseline: Success, stage attempts: 2
uncaptured baseline: missing; restore: Failure
healthy post-turn: ready, stage attempts: 3
new baseline after recovery: Success, stage attempts: 4
existing baseline during backoff: ready, stage attempts: 6
restored successful checkpoint: "recovered snapshot\n"

The stall and VCS error were injected at checkpoint git add -A; other Git operations were real. This rework was not tested with a naturally slow repository, a full-app run, native clients, Windows, or the reporter's workspace. No paid provider turn or live userdata write was used. Earlier Linux full-app evidence covers an older head and predates the five-second baseline budget; it is historical context, not verification of this rework.

Reviewed with review-loop: 1 round with gpt-6.1-sol on xhigh. Reviewer verdict: approved

Created with gpt-6.1-sol via Codex/T3 Code.

    1. Pushedffd0336

    2. maria-rcks merged this6108545

    3. maria-rcks closed this

Sign in to join this conversation.