Skip to content

Wait up to ten minutes for registry propagation and probe the tarball in the release smoke test - #97

Merged
thossullivan merged 3 commits into
mainfrom
feat/release-smoke-test-propagation
Sep 9, 2026
Merged

thossullivan merged 3 commits into
mainfrom
feat/release-smoke-test-propagation

Conversation

@thossullivan

Copy link
Copy Markdown
Owner

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

  • Registry wait goes from twelve 5-second polls (60 s) to a backoff schedule of 5, 5, 10, 10, 20, 20, then 30-second steps up to ten minutes. MODEL_EOL_REGISTRY_WAIT_SECONDS overrides the window. Each attempt logs why it is still waiting.
  • Tarball probe. A version counts as published only when dist.tarball is the registry's model-eol tarball URL and answers a ranged GET. Integrity checking is unchanged.

Verification

  • npm test exit 0, with unit tests for the schedule shape, the override, and the probe's fail-closed paths in the package contract suite.
  • The probe was exercised against the live model-eol-0.7.0.tgz tarball (HTTP 206) and against a foreign URL (rejected without network).

🤖 Generated with Claude Code

https://claude.ai/code/session_01P2NboF8EvmvmmzRwQEVut9

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.
@thossullivan
thossullivan merged commit b8c94ed into main Sep 9, 2026
6 checks passed
@thossullivan
thossullivan deleted the feat/release-smoke-test-propagation branch September 9, 2026 16:25
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