Skip to content

feat: name a sweep that no longer fits its job - #18

Merged
JumpLink merged 1 commit into
mainfrom
feat/sweep-deadline-and-eta
Sep 11, 2026
Merged

JumpLink merged 1 commit into
mainfrom
feat/sweep-deadline-and-eta

Conversation

@JumpLink

Copy link
Copy Markdown
Contributor

The two things #15 carried that main did not. #15 is closed; everything else it had arrived
independently via #16 and #17, and the comment there records which.

A sweep that stops fitting should say so itself

A job killed by timeout-minutes reports 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 (default
300, under release.yml's 360) makes the publisher fail by name first:

sweep deadline of 300 min reached with 5 of 5 package(s) unpublished
(published: 0, failed: 0). Raise NPM_DEADLINE_MIN, or find why the registry got slow.

Elapsed and ETA on every line

Because the run-level updatedAt GitHub 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.

✅ 20.0% - Processed: 1, Errors: 0 - elapsed 0s, ETA 1s
✅ 60.0% - Processed: 3, Errors: 0 - elapsed 1s, ETA 0s
✅ 100.0% - Processed: 5, Errors: 0 - elapsed 1s, ETA 0s

Validation

Both decisions are pure functions in publish-plan.ts, so they are held to cases that go both
ways rather than only to the happy one. sweepDeadlineExceeded treats zero as disabled rather
than expire immediately, which a plain now > start + budget gets wrong, and there is a test
for exactly that.

  • npm run check, npm test — 25 tests, 2 new
  • npm run test:e2e green, all six arms
  • the progress line above is the real output, obtained by inverting the e2e's first assertion so
    the captured publisher stdout is printed (the harness swallows it on success)
  • the deadline was seen firing: with sweepDeadlineExceeded forced to true, four e2e arms
    flip 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

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
@JumpLink
JumpLink requested a review from ewlsh as a code owner September 11, 2026 19:44
@JumpLink
JumpLink merged commit ba0d5da into main Sep 11, 2026
4 checks passed
@JumpLink
JumpLink deleted the feat/sweep-deadline-and-eta branch September 11, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant