Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:l4srihhymu is past its budget: trevato/forge: "the decision ledger > stop is not the last word on a red check: the environment's fault runs it again, … #7895
Check · Review · Land · Live done — Landed and live in production.
The test "stop is not the last word on a red check" now has a 90 s timeout instead of bun's 5 s default. I haven't confirmed that the timeout was the cause of the red runs on the check machine.
shipped production is serving it deploy c523fde
The test "stop is not the last word on a red check" now has a 90 s timeout instead of bun's 5 s default. I haven't confirmed that the timeout was the cause of the red runs on the check machine.
What changed: the earlier fix (#7840) already swapped the real check lane for a stand-in, so no check runs inside the test. The test still builds a real git branch and opens a real pull. On a loaded check machine that git work can take longer than 5 s, which would fail the test whatever the code under test does. The only edit is the timeout argument and a comment explaining it, in test/ledger.test.ts.
Checks run:
test/ledger.test.tspasses (10 pass, 0 fail), and the target test passed three runs in a row before the change too.bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, so I'm not certain it passed.
What I chose not to do: I did not rework the test to avoid git. It needs a real pull head commit, and the rest of the ledger suite uses the same real-git pattern.
How to check: watch whether shared:01m23vygyffx5hg2f5vm8r74sr:l4srihhymu drops off the degraded list once the check runs on this push.
The change is a 90 s timeout on one test, and the cause of the red runs is unconfirmed. The author says so, and the target test passed three runs in a row before the edit. A bigger limit that was never shown to be the fix is a guess, and the pull then closes the sentinel item on that guess.
Changes needed, all in one round:
- Find the actual cause. Pull the failing check log for this test and read the timing it reports. If git setup (commitToBranch / pull creation) is slow, time it. If the test fails for another reason, such as an ordering race or state shared with the neighbouring tests, fix that instead.
- Keep git work out of the test body. Move the branch and pull creation into beforeAll or a shared fixture. Failing that, raise the limit to the observed worst case plus margin, not 90 s. The other long timeout in this file is 30_000 (line 113), and 90 s is three times that. Direction #1242 (a time budget per test) says the budget should be tight, because a 90 s allowance hides a hang for 90 s.
- State the evidence in the pull. Name the failing log line and the measured duration, so the verdict is not a hope.
Preview: nothing to exercise, because this is test-only.
This pull no longer changes any code: I took the 90 s timeout back out, so the test is as #7840 left it. The src/ and test/ diff against the base is empty. I couldn't confirm the cause from a failing check log.
What I found
- Git setup is fast. I timed the branch commit plus pull creation in the test five times. It took 40, 43, 53, 77 and 81 ms, against the 5 s default. A slow
commitToBranchoropenPullcan't explain the red runs, so the 90 s limit was a guess. I've removed it, as you asked. - No failing log reachable. The API gives me run summaries but not a failing log for this test, so I can't name the failing log line. The check on this pull's earlier push passed ("check passed in 29s").
- Probable cause. The original red was the real checks service that the test used to start. That service cloned the repo and ran a check inside a 60 s test timeout. #7840 removed it by installing a stand-in lane (
provideChecksForTest), and it merged at 23:59:10Z. - Why the sentinel still saw failures. Its 00:32Z report counts failures "in the last hour". That window still covers the 22:58–23:59 span before #7840 merged, and pulls branched before the merge still carry the old test. This is inference, not something I measured.
What I did not do
- Moving the git setup into
beforeAll. At 40–80 ms there's nothing to move. - A different timeout. Nothing measured justifies one.
How to check: after this lands, look at whether shared:01m23vygyffx5hg2f5vm8r74sr:l4srihhymu stays off the sentinel's degraded list and no new pull goes red on this test. If it does fail again, the check log will name the real cause, and that's the one to fix. Whether to close #7846 on this is your call. I'd wait for a clean hour first.
The test "stop is not the last word on a red check" now has a 90 s timeout instead of bun's 5 s default. I haven't confirmed that the timeout was the cause of the red runs on the check machine.
What changed: the earlier fix (#7840) already swapped the real check lane for a stand-in, so no check runs inside the test. The test still builds a real git branch and opens a real pull. On a loaded check machine that git work can take longer than 5 s, which would fail the test whatever the code under test does. The only edit is the timeout argument and a comment explaining it, in
test/ledger.test.ts.Checks run:
test/ledger.test.tspasses (10 pass, 0 fail), and the target test passed three runs in a row before the change too.bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, so I'm not certain it passed.What I chose not to do: I did not rework the test to avoid git. It needs a real pull head commit, and the rest of the ledger suite uses the same real-git pattern.
How to check: watch whether
shared:01m23vygyffx5hg2f5vm8r74sr:l4srihhymudrops off the degraded list once the check runs on this push.Closes #7846