Decision Points: The First Few Hours After a Broken Release
An invented scenario, labelled hypothetical. A small team maintains "Package Q" in three ecosystems: an npm package, a Python distribution on PyPI, and a Go module. A release went out on all three with a serious regression in its config loader. The team's choices differ by registry because each registry offers different tools, and knowing those tools in advance shortens the incident considerably.
Hour zero: confirm and freeze
The first report arrives with a stack trace. Before touching the registries, the team does three things: reproduces the failure from the published artifact rather than from the repository, posts a short pinned issue saying "we know, do not upgrade to 4.2.0, details soon", and pauses the release automation so a well-meaning merge does not publish another version on top. What if they skip the pinned issue? Duplicate reports pile up and users start guessing at workarounds.
Decision 1: patch forward or step back?
If the fix is small and certain, publishing 4.2.1 quickly is usually the best remedy, because users on ordinary ranges pick it up without doing anything. If the fix is uncertain, the safer move is to republish the previous code as 4.2.1, a revert release, and investigate calmly. Version numbers only move forward; the team cannot re-publish over 4.2.0 on any of the three registries.
Decision 2: mark the bad version, per registry
| Registry | Tool | Effect |
|---|---|---|
| npm | npm deprecate package-q@4.2.0 "msg" | Install still works but prints a warning; version stays available |
| npm | npm unpublish | Restricted by npm policy after the first 72 hours; version number can never be reused |
| PyPI | Yank the release (PEP 592) | Skipped by installers unless pinned exactly with == |
| Go | retract directive in go.mod, in a newer version | go get stops choosing the retracted version and the go command warns users who still depend on it |
The team deprecates on npm, yanks on PyPI, and adds this to go.mod before tagging the fix:
retract v4.2.0 // config loader ignores env overrides
Note that the Go retraction only takes effect once a version containing the directive is published, which is why it rides along with the fix. What if they had tried to unpublish on npm? Anyone with 4.2.0 in a lockfile would get a 404 on their next clean install, turning a regression into a total outage for them.
Decision 3: what to tell users
The changelog for 4.2.1 says plainly what 4.2.0 broke, who was affected, and that upgrading is the only action needed. The pinned issue is updated and then closed. If any data could have been mis-handled, for example config values silently ignored, the note says so explicitly instead of leaving users to work it out.
Decision 4: the short review afterwards
A blameless write-up answers three questions: why tests did not catch it, why the artifact was not smoke-tested, and how long the recovery took. In this scenario the answer to the first two is the same: the tests ran against the source tree, never against the built package. The follow-up action is a CI step that installs the packed artifact into a clean project; see testing the package tarball before publishing. Background on npm's removal rules is in our unpublish policy note.