Repository navigation
fix(control): retry a session a full or low-disk runner declines - #679
Merged
kalaspuff merged 1 commit intoDec 3, 2026
Merged
Conversation
Since #669 every decline that isn't for the driver made the runner one that couldn't start the session, which dispatch passes over until it starts. But a runner declines a session for being at capacity or low on disk when FleetDO's view of it, from heartbeats 15 s apart, lags: in a workspace with one runner the session then failed at once, where it used to try again after a backoff. schedule::passes tells those declines by the host's words, which schedule::AT_CAPACITY and schedule::low_on_disk now say for the host too, and FleetDO retries them after a backoff, as it does a decline for the driver, without counting the runner as tried. Hosts of every version say these words, so the protocol doesn't change.
kalaspuff
approved these changes
Dec 3, 2026
kalaspuff
deleted the
fctl/1823-give-me-a-detailed-prompt-that-i-can-sen
branch
December 3, 2026 19:08
kalaspuff
pushed a commit
that referenced
this pull request
Dec 3, 2026
) ## Summary Since #678, the notice the session page shows when a runner's work isn't coming through offers *Move to another runner* to the session's owner, review agents' sessions included. The ⋯ menu leaves the item out for reviews, and `POST /sessions/{id}/move` refuses them. So the click failed with an unrelated toast ("Review agents take no messages…"). The transcript now takes its own `canMove`, which the session page sets for the owner unless the session is a review. `canManage` still governs everything else it did. Verified with a new transcript test: the move appears with `canMove` and not without it, for a reader who still manages the session. The test fails without the fix. `npm run check` and the web app's whole test suite pass. There is no screenshot: the only visible change is that the button no longer appears on a review session's stall notice, and other sessions' notices look as before. - #679 Refs #678 [fctl session](https://app.fctl.sh/s/ses_01M8YGVKC8CD8CGJ4FXTRRN7EG) <!-- FCTL_REVIEW_SUMMARY --> --- > [!NOTE] > **Low risk.** A small web-only change that hides one button for review agent sessions; nothing else reads the new prop. > > **What it does.** Review agent sessions can't be moved to another runner, but the stall notice still offered "Move to another runner" to their owner. This adds a `canMove` prop to `TurnTranscript`, set in the session page to `isOwner && !session.review`, and uses it instead of `canManage` for the move button. A test covers both cases. > > <sub>[fctl review](https://app.fctl.sh/s/ses_01M8YHB0382Q8YGTJQMAXX4PMY)'s first look at [`f77e613`](f77e613) · 3 files, +21 −2 · [Review agent settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub> <!-- /FCTL_REVIEW_SUMMARY --> Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.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.
Summary
Since #669, a runner that declined a session for any reason but its driver went on the session's list of runners that couldn't start it. That includes the two declines that only last a moment: "the host is at capacity" and the low-disk decline. FleetDO learns a runner's free slots and disk only from heartbeats, 15 seconds apart, so it can send a session to a runner that has just filled up. In a workspace with one runner, that session then failed at once ("Couldn't start on studio: the host is at capacity"). Before #669 it tried again after a backoff, and
Wait::rules_outalready treats busy and low-disk runners as ones that may take a session later.Now
schedule::passesrecognises those two declines by the host's words, and FleetDO handles them as it handles a decline for the driver. The runner isn't added to the list, and the session goes back to the queue, "Retrying: …", with the same backoff.driver_declinedstays set only for the driver, so a resume still goes back to its sandbox as before. The host now builds both messages fromschedule::AT_CAPACITYandschedule::low_on_disk, so its wording and the check that matches it can't drift apart. Every host version already sends these strings, so the protocol doesn't change. The architecture doc's "Sessions a runner can't start" and ADR 0107 now say so.Verified with a new domain test (
passesis true for these two declines and false for the image, size, retiring and pull ones), the host's low-disk test, which now also checkspasseson its refusal, FleetDO's tests in Node, and Clippy native and for wasm. Nothing reproduced the race end to end incargo xtask dev.Worth confirming
Decision: a full or low-disk decline still counts towards the session's five attempts, as before feat: start sessions a runner can't start on another runner #669. If FleetDO kept sending the session to runners that declined it for room, it would fail after about 75 seconds of backoff. Normally the next heartbeat shows the runner busy first, and the session then waits without using attempts.
fix(web): stop offering to move review sessions off a quiet runner #680
Refs #669
fctl session
Note
Medium risk. It changes how the control plane handles every session a runner declines, though only the declines for a full host or low disk; a wrong text match would retry sessions that should move or fail.
What it does. When a runner declines a session because it is at capacity or low on disk, the control plane now queues it again after a backoff, without counting that runner as one that couldn't start it. Before, such a decline marked the runner as tried, so a session in a workspace with one runner failed. The host's two decline texts now live in
fctl_domain::schedule, andpassesmatches them in the control plane.Match on decline text. The control plane recognises the decline by comparing the host's error text (
AT_CAPACITY, and amin_free_disk_gb in its host.tomlsuffix), not by a flag in the protocol.fctl review's first look at
0d3fb93· 5 files, +78 −19 · Review agent settings