Repository navigation
test: split the prompt hook's one-second bound from what it shows, and make its hanging origin hang - #1098
Merged
Conversation
Refs: iss-2610181122454939 Assisted-by: Claude:claude-opus-5-5
git-remote-ext escapes a space only as "% ", so "ext::sh -c sleep\ 30" handed sleep no argument and failed at once. The claim test's origin now hangs; the hook tests get theirs from hangOrigin, in the next commit. Resolves: iss-2610181122454939 Assisted-by: Claude:claude-opus-5-5
The show-once test asserted both what the hook shows and that it returns inside its second, so a loaded runner could fail it either way. TestThePromptHookReturnsInsideItsSecond keeps the shipped bound over three tries, each in a fresh checkout and logged, and fails when two run over; the show-once test runs under ten-second budgets of its own. Both decide whether origin was reached from a file the origin's command leaves. Resolves: iss-2610180735158998 Assisted-by: Claude:claude-opus-5-5
Refs: iss-2610181153278714 Assisted-by: Claude:claude-opus-5-5
Refs: iss-2610181153288506 Assisted-by: Claude:claude-opus-5-5
…udgets Review of the split found the two-of-three rule forgave one try of any length and that nothing required the read to happen. Any try over five seconds now fails, and at least one try must show the announcement under the shipped budgets. Markers are checked again after the last try, and claim.WaitPromptReadsForTest lets the tests wait for an abandoned read before their directories go. The session-title test gets budgets of its own through the shared ownHookBudgets, and the hollow-origin record now says the old hook test's no-network claim was not checked at all. Resolves: iss-2610181153278714 Refs: iss-2610180735158998, iss-2610181122454939 Assisted-by: Claude:claude-opus-5-5
The read runs under the package's stretched budget, so a bare one-second bound could fail on a loaded runner. Now that the origin really hangs, a network wait also fails the announcement check and the git trace. Resolves: iss-2610181153288506 Assisted-by: Claude:claude-opus-5-5
The held read never ends before cleanup, so any finite bound shows the prompt returned at its deadline; a bare second left about 150 ms over the read's cutoff. The comment now says a network wait runs the read out of its budget, and the bound test registers its read wait once. Refs: iss-2610181153288506 Assisted-by: Claude:claude-opus-5-5
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.
Follows #1093.
TestThePromptHookShowsEachAnnouncementOnceasserted two things under the shipped budgets: that the hook returns inside its one second, and what it shows. A loaded queue runner could fail it on either count.TestThePromptHookReturnsInsideItsSecondkeeps the shipped bound. It runs three tries, each in a fresh checkout so each one has the announcement to show, and logs each try's time and whether it showed the announcement.ownHookBudgets: 10 s for the hook and for the status read).%, soext::sh -c sleep\ 30ransh -c 'sleep\' 30, and sleep exited at once. The hook test's no-network claim was therefore not checked at all. Both that test andTestThePromptNeverWaitsOnTheNetworkin the claim package now use an origin that really hangs.slack, as its other bounds do.claim.SetPromptReadBudgetForTest(from test: make the status hook deadline test hold under a loaded runner #1093) andclaim.WaitPromptReadsForTest. The second lets the cli tests wait for an abandoned read before their directories are removed.Checked by mutation. A hook that runs
git ls-remote originfails both cli tests on the marker, including a call started after the hook returns. An always-slow hook, and one 6 s try, fail the bound test. A hook slow on one try in three passes. A skipped read fails "no try showed". An untraced network call in the claim read fails the claim test.An Opus and Sonnet review pair read a frozen copy over three rounds and both stopped. Both agreed with the two-of-three rule, which works like a median of three, once the hard ceiling was added.
Resolves: iss-2610180735158998
Resolves: iss-2610181122454939
Resolves: iss-2610181153278714
Resolves: iss-2610181153288506
Assisted-by: Claude:claude-opus-5-5