Repository navigation
Conversation
Quest-Claim: b30992b7dddb1fb4
… of load quest gate --quick waits at most QUICK_MS (one load-average window), then starts the command. QUEST_GATE_PRIORITY=1, set by the land daemon's sandbox, makes every gate inside the check wait for memory but never for load. Both record their admissions, so other callers still count them. quest agent drops the priority mark as it drops an admission. Finishes quest/m0/land-priority.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 31, 2026 15:30
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Oct 31, 2026
This branch has not been deployed
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.
Finishes
quest/m0/land-priority.md: cheap checks wait a bounded time inquest gate, and the land daemon's check goes ahead of agent load.Changes
quest gate --quick <command>waits at mostQUICK_MS(60 s, the load average's lag window), then starts the command. The caller passes the flag; Quest keeps no list of command names, and the bound belongs to the gate, so callers can't pass 0.QUEST_GATE_PRIORITY=1in the environment makes a gate wait for memory but never for load. It is an environment variable, not a flag, so it reaches the nestedquest gatecalls in a repository'sjustrecipes (for example moq'ssh/local.sh).--quickwaits up to a minute, and priority still waits for memory.quest agentstripsQUEST_GATE_PRIORITY, as it already stripsQUEST_GATE_ADMITTED, so agents launched from inside a check don't inherit priority.gateBoundarynow parses--quickas the gate's own option when it comes before the executable. After the executable it still belongs to the command.quest gate --help, and tests are updated. The quest is deleted.Where admission happens on the host (investigation)
I checked
nixosread-only:Each daemon runs
quest land serve --sandbox <repo>-check. That command connects to/run/quest-land-<repo>-check.sock. The socket startsquest-land-<repo>-check@.service(Slice=ci.slice,CPUQuota=1600%,MemoryMax=18G,RuntimeMaxSec=60min), which boots an ephemeralsystemd-nspawncontainer. Inside it,quest-land-check-commandrunsnix develop --command just ci "$BASE".moq's
just cirunssh/local.sh. Outside GitHub Actions, that script callsexec quest gate bun … local.ts(the image's quest 0.1.0). So admission happens inside the container. That gate's ledger is private:/home/check/.cache/quest/admissions/qland-6in a fresh copy of the image. But its load signal is the host's 1-minute load average, and its limit is the host's 32 CPUs. The land check therefore queues behind agent load without ever appearing in the host's ledger.In the batch logs (
/var/lib/quest-land-moq/moq-dev-moq/batch-*.log), 3 of 24 batches printedquest gate: waiting for the load average to fall(4 to 6 times each).The 2026-10-31 05:07Z–06:45Z "idle" window was not gate starvation. The daemon was busy the whole time:
check gh.check gh.check quest.check ghfailed in 2 s (alert.yml's workflow list is out of sync with .github/workflows/ — stale (remove, CI-only): Pullfrog). The rest ofjust cistill ran for 32–40 minutes before the batch was ejected. Neither of those first two batches waited in the gate.Host-side change (kixelated/nixos, not made here)
modules/quest-land.nix, have the generatedquest-land-check-commandexport QUEST_GATE_PRIORITY=1, next to its other exports, beforeexec nix develop …. The container's private ledger means a host-side reserved slot can't work, and the launcher already bounds the check: one container per repository socket, a 16-CPU quota, and an 18 GiB memory cap insideci.slice.questpin to a release that contains this PR. The image ships quest 0.1.0 from the Nix store.QUEST_GATE_ADMITTED=1for this. It would also skip the memory admission that currently spaces the check's parallel Cargo suites inside its 18 GiB cap.Choices made without asking
--quickbound is a fixed 60 s owned by the gate, rather than a duration the caller declares, so it can't be turned into a zero-wait bypass.--quickcommand still marks its descendants admitted, like any gated command. Pass the flag only for commands that start nothing expensive.land-serve.tsdoes not setQUEST_GATE_PRIORITYon the sandbox's environment, because a parallel quest owns that file. The nspawn sandbox doesn't forward the daemon's environment anyway.Suggested follow-ups
QUEST_GATE_PRIORITY=1in the land check command and bump the image's quest (see above).quest gate --quickfor cheap suites such ascheck quest, formatters, and markdown (moq-dev/moq#7250, moq-dev/moq#7257). Also makejust cifail fast once a module fails: the 2-secondcheck ghfailure cost two 35-minute batches.land-serve.tspassQUEST_GATE_PRIORITY=1in the sandbox environment, after the land-head-moved quest lands.Review
gpt-6.1-solat medium effort, viaquest review --base origin/main(session01a19294-8f89-76a1-bc11-d83ddf3495e6, round 1)Local checks on this head:
just checkpassed, andjust testpassed (724 passed, 2 skipped; worker suite 426 passed).🤖 Generated with Claude Code
(Written by Claude Opus 5.5)