feat: name a sweep that no longer fits its job - #18
Merged
Merged
Conversation
Ported from #15, which measured the case and is now closed: everything else it carried arrived via #16 and #17. A sweep killed by `timeout-minutes` reports that the RUNNER exceeded its maximum execution time, which names neither the package it was on nor how far it got. Give the publisher its own budget, under the job's, so the message a human reads is the publisher's. Put elapsed and ETA on every progress line for the same reason: the run-level `updatedAt` GitHub exposes does not advance while a job streams logs, so from the API a sweep that is working looks exactly like one that is wedged. Reading it that way is what got the 4.8.0 sweep cancelled at 38% while it was publishing normally. Both decisions are pure functions in publish-plan.ts so they can be held to cases that go both ways — zero disables the deadline rather than expiring instantly, which a plain `now > start` would get wrong. Claude-Session: https://claude.ai/code/session_012KM53BXFvEdP4PLgcojKCS
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.
The two things #15 carried that
maindid not. #15 is closed; everything else it had arrivedindependently via #16 and #17, and the comment there records which.
A sweep that stops fitting should say so itself
A job killed by
timeout-minutesreports that the runner exceeded its maximum execution time.That names neither the package the sweep was on nor how far it got.
NPM_DEADLINE_MIN(default300, under release.yml's 360) makes the publisher fail by name first:
Elapsed and ETA on every line
Because the run-level
updatedAtGitHub exposes does not advance while a job streams logs.From the API, a sweep that is working looks exactly like one that is wedged — which is what got
the 4.8.0 sweep cancelled at 38% while it was publishing normally, and what had me second-guessing
the v5.0.0 run at the two-hour mark.
Validation
Both decisions are pure functions in
publish-plan.ts, so they are held to cases that go bothways rather than only to the happy one.
sweepDeadlineExceededtreats zero as disabled ratherthan expire immediately, which a plain
now > start + budgetgets wrong, and there is a testfor exactly that.
npm run check,npm test— 25 tests, 2 newnpm run test:e2egreen, all six armsthe captured publisher stdout is printed (the harness swallows it on success)
sweepDeadlineExceededforced totrue, four e2e armsflip red and the message above is what they print. An abort condition nobody has watched trigger
is not one.
🤖 Generated with Claude Code
https://claude.ai/code/session_012KM53BXFvEdP4PLgcojKCS