Skip to content

fix(release): require crates.io publication before np - #660

Merged
vladimirrott merged 2 commits into
lacs-project:mainfrom
Humerous:fix/631-release-publish-order
Oct 26, 2026
Merged

vladimirrott merged 2 commits into
lacs-project:mainfrom
Humerous:fix/631-release-publish-order

Conversation

@Humerous

@Humerous Humerous commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixed the release workflow so npm only publishes after crates.io has published successfully.

Previously, both jobs could run at the same time. This meant npm could publish even if crates.io failed.

Changes

  • Updated the npm job to wait for crates.io.
  • Added a test to make sure this dependency stays in place.

Testing

  • Publishing order test passed.
  • Existing release test passed.
  • Confirmed the new test catches the original problem.

Part of #631

@vladimirrott vladimirrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking #631 up the same morning. The needs edit is the right fix, and with publish-crates skipping versions that already exist, re-running failed jobs after a token fix still finishes the release the way your #614 made it.

I read the diff and ran your test at 5f0a1e01 in a container with no network. It passes on your tree and fails against both mutants I tried:

--- pristine
PASS: npm depends on crates.io publication
--- needs: [preflight, build] on publish-npm
FAIL: npm must depend on successful crates.io publication
--- publish-crates renamed
FAIL: missing job publish-crates

Blocking

scripts/check_test_reachability.sh refuses the new file, so docs-and-hygiene will go red:

test-reachability: test is not invoked by a gate: tests/release/release-publish-order.test.sh

Add a step next to the other release contract tests in .github/workflows/ci.yml:

      - name: Check npm publishes only after crates.io
        run: bash tests/release/release-publish-order.test.sh

Scope

#631 also asks for a credential probe in preflight, so an expired token fails the release before anything publishes. This PR doesn't add one. I'm happy to merge the ordering fix on its own: please change Closes #631 to Part of #631 and I'll keep the issue open with your claim on it. With your ordering in place, the probe covers the opposite failure: crates.io publishes and then npm refuses an expired token. You wrote the crates.io index poll (#463) and the rerun guard (#614), so the probe is yours if you want it as a second PR.

Once the step is in, I'll run the gates and merge.

@vladimirrott vladimirrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 8fdde94a. You put the new step right beside the other release contract tests, and you switched the body to Part of #631, so both items from my last review are done.

What I checked on this head:

$ bash scripts/check_test_reachability.sh
test-reachability: every release and E2E test is invoked by a gate.

Your test again, in a container with no network, at 8fdde94a:

pristine                                                   rc=0  PASS: npm depends on crates.io publication
revert prod hunk: needs [preflight, build]                 rc=1  FAIL: npm must depend on successful crates.io publication
needs as scalar string publish-crates                      rc=0  PASS: npm depends on crates.io publication
publish-crates job renamed                                 rc=1  FAIL: missing job publish-crates
publish-npm gets if: always()                              rc=0  PASS: npm depends on crates.io publication

shellcheck --severity=warning on the new script exits 0, and 12 checks pass on this head with container-smoke skipped, as it is on every pull request. main has not touched release.yml or tests/release/ since you branched.

Optional, and I'd merge without it: the last line above. if: always() on publish-npm would let npm publish after a failed crates.io job, and your test still passes. If you want to close it, assert that publish-npm has no job-level if.

Because the PR edits workflow files, I merge it by hand rather than through my usual merge script. The credential probe from #631 is still yours whenever you want it.

@vladimirrott
vladimirrott merged commit a138798 into lacs-project:main Oct 26, 2026
13 checks passed
@vladimirrott

Copy link
Copy Markdown
Member

Merged as a138798. GitHub wouldn't let me update your branch (edits from maintainers are off on this fork), and main had gained only one dev-story script since you branched, which no CI job runs, so I merged it at the head the checks passed on. npm now waits for crates.io. #631 stays open for the credential probe, which is still yours, and #674 is there too if you want it.

vladimirrott added a commit that referenced this pull request Oct 27, 2026
Minor release. #627 keys request_hash with an HMAC under the audit key
(chain_version 4; previews stored by an older release fail closed after
upgrading) and #639 changes the history request a newer CLI sends, so a
caller relying on the old behaviour notices: the middle digit moves.

Also: the planner sees only its host's distribution (#626, #656, #658,
#684), checkpoint and the MCP audit tools share the audit-store resolver
(#636), every workflow job has a time limit (#662), a weekly cargo audit
(#640), release hardening (#635, #637, #660), and every published figure
is rendered from its source (#685).


Claude-Session: https://claude.ai/code/session_01UpyrhbDTW1gBwzGAC44GYU

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants