Repository navigation
Stop triage agents from stalling on git auto-gc and unbounded commands - #50
Merged
Merged
Conversation
A single `git blame` in a triage run on withastro/astro#18162 took 26 minutes: the public checkout is blobless, so blame fetched blobs on demand and git kept auto-packing the growing object store in the foreground. The pipeline agent's bash tool had no deadline, so nothing stopped it. - Configure every triage checkout with gc.auto=0 and maintenance.auto=false. - Wrap the pipeline agent's sandbox so each command runs under `timeout -k 5 N bash -c`: 600s by default, up to 1800s when the agent requests a longer timeout. A killed command returns exit 124 with a note telling the agent how to request more time.
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.
Changes
gc.auto=0,maintenance.auto=false) in every triage checkout. Public checkouts are blobless, so history commands likegit blamefetch blobs on demand and each batch could trigger a foreground auto-pack. In the triage of astro@7.3.5: experimental_AstroContainer output now includes data-astro-source-* dev annotations (regression from #17736) astro#18162, a singlegit blamespent 26 minutes auto-packing.timeout, so a stuck command could consume the whole submission. Commands now run undertimeout -k 5 N bash -c: 600s by default, and up to 1800s (the existing build budget) when the agent asks for more. A killed command returns exit 124 with a note explaining the default and how to request a longer timeout.bash -crather thansh -c, because Cloudflare Sandbox runs agent commands in bash and/bin/shis dash in the image. Commands were already independent (enableDefaultSession: false), so no shell state is lost.Testing
tests/sandbox.test.ts: checkout config disables gc/maintenance and still removes origin for private repos; command bounds use the default timeout, honor requested timeouts, and clamp to the ceiling; the agent sandbox wraps commands and passes a trailing adapter deadline; a timed-out command gets the explanatory note.tests/author-push.test.tsmocks@flue/runtime/cloudflare, whichsrc/triage/sandbox.tsnow imports.Docs