Repository navigation
perf(guard): a call that waits on cargo builds runs in the background or with a timeout inside the cache lifetime - #315
Merged
Conversation
… or with a timeout inside the cache lifetime
Owner
Author
|
bstack-judge: PASS+NOTES tier=2 sha=d222a4f231377af7a7db14011f6c8dff373fc3ec PR 315 (perf(guard): foreground waits on cargo builds). Head d222a4f confirmed after Criteria and proof:
Findings (notes only, none blocking):
Dropped hypotheses:
[{"id":"F1","title":"Refusal at timeout 240001 says 'up to 240 s' while asking for at most 240000 ms (rounding)","reproduction":"plugins/bstack/scripts/guard.mjs foregroundWaitRule with tool_input {timeout:240001}","base":"not run","head":"pass","blocks":"no","files":["plugins/bstack/scripts/guard.mjs"]},{"id":"F2","title":"A node flag before the script (node --max-old-space-size=4096 checks.mjs) bypasses the rule; only args[0] is matched","reproduction":"plugins/bstack/scripts/guard.mjs stdin {tool_name:'PowerShell',tool_input:{command:'node --max-old-space-size=4096 scripts/checks.mjs',timeout:600000}}","base":"pass","head":"pass","blocks":"no","files":["plugins/bstack/scripts/guard.mjs"]},{"id":"F3","title":"Message says 'waits on cargo builds' even for checks.mjs in non-Rust repos or with no shared target dir","reproduction":"plugins/bstack/scripts/guard.mjs stdin without CARGO_TARGET_DIR, command node scripts/checks.mjs, timeout 600000","base":"pass","head":"pass","blocks":"no","files":["plugins/bstack/scripts/guard.mjs"]}] |
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.
Request
After #314 a run on a Rust repo with a shared
CARGO_TARGET_DIRfollowed the new rules except one: agents still started cargo calls in the foreground with a 600 s timeout. In 5.6 hours 20 such calls ran over five minutes, and 8 ran into the ten-minute limit. An agent's context is cached for five minutes, so each of those waits reloads the whole context. The instruction inworker.mdandjudge.mdalone did not hold; the owner asked for a guard.Change
cargo-lock.mjs,checks.mjsorcargo checkwith atimeoutover 240000 ms, unless it hasrun_in_background. The message names both ways out.Trade-off
A foreground call with a short timeout relies on the harness moving a command to the background when it passes its timeout. That is what the transcripts of the measured run show ("did not complete within its 600s timeout and was moved to the background"). A harness that kills the command instead would stop a build after four minutes; the refusal therefore names
run_in_backgroundfirst.Proof
node --test tests/guard.test.mjs: the new test covers the three kinds of call in both shells, the three ways that pass, and commands the rule must leave alone.node --test tests/: 895 tests, 869 pass, 26 skipped, 0 fail.node tools/check-plugin.mjs: ok, markdown budget unchanged.Not run: a real multi-agent session on the new rule.