Wait up to ten minutes for registry propagation and probe the tarball in the release smoke test - #97
Merged
Conversation
The release smoke test polled npm twelve times at five-second intervals and gave up after sixty seconds. The 0.6.0 release failed at this step during an npm incident: the version appeared after the window closed, and a second attempt saw the tarball itself return 404 even though the version was listed. The publish, tag push, and moving v0 had all succeeded, so the job had to be rerun by hand once the registry caught up. The wait is now a backoff schedule of 5, 5, 10, 10, 20, 20, then 30 second steps up to a ten-minute window (MODEL_EOL_REGISTRY_WAIT_SECONDS overrides it), each attempt logs why it is still waiting, and a version counts as published only when dist.tarball is a registry model-eol tarball URL that answers a ranged GET. Integrity checking is unchanged. Implemented by Claude directly; the change is a single script routine with unit tests in the package contract suite.
A Codex review of the propagation wait found five issues, now closed with tests. The wait runs against an absolute deadline, so child process timeouts and sleeps are cut to the time left and the reported elapsed time is real; MODEL_EOL_REGISTRY_WAIT_SECONDS treats blank as the default, and refuses negative, non-numeric, or values over an hour. The tarball probe follows no redirects, requires a 200 or 206 octet-stream response, and accepts only the registry URL for the exact expected version, so an older release's tarball cannot satisfy it. The tests no longer inherit the environment override and exercise the probe against a fixture registry that runs as a child process, because spawnSync in the test would block an in-process server.
A second review pass found that an exhausted window still allowed one more 30-second metadata request and one more 30-second tarball probe, that fractional wait overrides produced non-integer millisecond timeouts Node rejects, and that one test read the environment through an undefined argument. The first attempt keeps a full request budget; later attempts stop when the window is spent and are cut to what is left. Schedules and timeouts are integer milliseconds. The test passes with MODEL_EOL_REGISTRY_WAIT_SECONDS set.
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.
Hardening carried over from the 0.6.0 release, where the smoke test failed on registry propagation lag and a transient tarball 404 after a successful publish, and had to be rerun by hand.
What changes
MODEL_EOL_REGISTRY_WAIT_SECONDSoverrides the window. Each attempt logs why it is still waiting.dist.tarballis the registry'smodel-eoltarball URL and answers a ranged GET. Integrity checking is unchanged.Verification
npm testexit 0, with unit tests for the schedule shape, the override, and the probe's fail-closed paths in the package contract suite.model-eol-0.7.0.tgztarball (HTTP 206) and against a foreign URL (rejected without network).🤖 Generated with Claude Code
https://claude.ai/code/session_01P2NboF8EvmvmmzRwQEVut9