Conversation
pre-commit's hook environments are rebuilt every session (the cache lives in the sandbox home), so the ~4 min cold build is paid by every session that lints — past the 120 s default command timeout.
task lint a 10-minute timeouttask lint a 10-minute timeout in the tend sandbox
prql-bot
left a comment
There was a problem hiding this comment.
The 10-minute figure is derived from the pre-commit hook build alone, but task lint is pre-commit run --all-files then cargo clippy --all-targets --all-features. Two consequences:
- 600 s is the harness's maximum for a single command, so "at least 10 minutes" asks for headroom that doesn't exist — a session reads it as a floor and there's nothing above it.
- The clippy half is a whole-workspace
--all-targetsbuild. The Verifying arust-toolchain.tomlbump section directly below records that shape as exceeding the session budget on a cold cargo cache, with a single scoped compilation unit already at ~9 minutes. A session that sets 600 s and still gets killed — in clippy this time, with the hook build's ~4 minutes already spent — lands back at "task lintcouldn't run", which is the outcome this section exists to prevent.
Suggestions inline: name 600 s as the ceiling rather than a floor, and give the fallback of running the two commands separately, each with its own 600 s.
|
so there is no caching available in the tend sandbox? that's a shame if so; makes runs much longer is there a way around this or no? |
|
Confirmed — and it's structural rather than a missing knob. The agent no longer works in the runner's checkout; it gets a disposable clone under Measured from inside this session: Two things fall out of that, both worth fixing here rather than waiting on upstream:
What is available for warming is This PR is still worth having either way: as long as the hook build happens inside the session, a session needs to know a multi-minute |
|
would there be a way to run in our normal path, with access to caches etc; without giving up access to standard GHA caching? |
|
Not by configuration, no — but the two halves of the question come apart, and only the first one is actually blocked. Standard GHA caching isn't at stake. Running in the runner's checkout isn't a knob. On 0.2.10 (released yesterday, current) What is reachable inside the boundary is artifacts, not the cache API. I measured this in this session rather than reasoning about it:
That last one is the real constraint: a warming job has to produce the tree with So the warm- Two things that are cheap and available now, independent of that:
Upstream, max-sixty/tend#1198 option 1 is still the clean fix, and the Commands behind the measurements# artifact throughput, from inside the session
gh run download 35333728039 -n prqlc_c-aarch64-apple-darwin-dev -D "$TMPDIR/arttest2"
# real 0m1.980s, 24M unpacked
# relocation is fine
cargo new a && cd a && echo 'itoa = "1"' >> Cargo.toml && cargo build
mkdir ../b && (cd ../a && tar cf - .) | (cd ../b && tar xf -)
cd ../b && cargo build # Finished in 0.00s
# relocated CARGO_HOME is not
(cd ~/.cargo && tar cf - registry) | (cd "$TMPDIR/cargohome2" && tar xf -)
CARGO_HOME="$TMPDIR/cargohome2" cargo build # Compiling itoa, Compiling aCache size: |
A tend session that runs
task linttoday sees it killed partway through, and can't tell that from the gate being broken.pre-commitbuilds its hook environments into~/.cache/pre-commit, which lives in the sandbox home and is discarded with the session — so the cold build is paid by every session that lints, not just the first. It measured 233.7 s in run 35321455559, against the agent's 120 s default command timeout; thecargo fmthook on its own ran past 300 s there on a cold rustup.600 s is the agent's maximum for a single command, not a floor to raise — and
task lintispre-commit run --all-filesfollowed by a whole-workspace--all-targets --all-featuresclippy, which on a cold cargo cache is the larger half. So the note names 600 s as a ceiling and gives the fallback of running the two commands separately, each with its own 600 s, rather than leaving a session to read the kill as a broken gate.That matters because #6334 is restoring
task lintto the sandbox by installingpre-commitand the pinned toolchain. Without a note telling a session to extend the timeout, the first thing it does with the restored gate is watch it get killed — which lands back at the nightly's "task lintcouldn't run", from a different cause. This adds the note so the fix in #6334 is usable; it's inert until that lands.running-tendrather than the bundled skill: the numbers and the cause are this repo's — its hook set, its sandbox — and.config/tend.yaml, which is where the cost is currently recorded, isn't read at session start.