fix(ci): unblock v1.6.0 release publishing path#460
Conversation
build.rs panics with `.expect()` when `node` is absent, taking down release-plz Linux upload-assets (cross-rs container) and copr-publish (Fedora COPR mock chroot). Fall back to the empty-primer path on ENOENT — same degradation already used for downstream crate consumers without the workspace generator script. publish-npm fails on the namespace runner because npm Trusted Publishing rejects self-hosted identities. Move the publish job to ubuntu-latest (the publish step is light enough that the namespace runner saves nothing). ppa-publish dput FTP to ppa.launchpad.net fails because the namespace runners block outbound port 21. Move to ubuntu-latest where it is allowed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes three independent root causes that blocked the v1.6.0 Linux release assets and downstream publishes: the Confidence Score: 5/5Safe to merge — all three changes are narrow, well-justified fixes with no correctness or security concerns. No P0 or P1 findings. The No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(ci): unblock v1.6.0 release publishi..." | Re-trigger Greptile |
Benchmark changesVersions:
Public ratios: warm installs vs Bun 6x -> 10x; warm installs vs pnpm 10x -> 14x.
fa90723 vs 28582d9 | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
## Summary The v1.6.1 release-plz macOS upload-assets job (https://github.com/endevco/aube/actions/runs/25232551216/job/73991667575) failed mid-primer-generation when a single `fetch(registry.npmjs.org/<pkg>)` hit a TLS socket close at package 786/2000: ``` [TypeError: fetch failed] { [cause]: SocketError: other side closed ... code: 'UND_ERR_SOCKET', } ``` The script had no retry, so a transient blip during a 2000-package run crashed the whole release. Wrap fetch with up-to-5-attempt exponential backoff (1s/2s/4s/8s) that retries network errors, 5xx, and 429, and propagates other 4xx as terminal. Linux upload-assets jobs in the same run already pass via the empty-primer fallback from #460 — only macOS (which has node and runs the script for real) was hitting the transient blip. Windows builds will benefit from the same retry. After merge, re-run the failed `Upload assets / upload-assets (aarch64-apple-darwin, ...)` job for v1.6.1 to backfill the macOS tarball. ## Test plan - [x] `node --check scripts/generate-primer.mjs` clean - [x] Smoke-test the retry helper with stubbed `fetch` that throws `UND_ERR_SOCKET` twice — third attempt returns 200, retries logged - [ ] Re-run the v1.6.1 macOS upload-assets job after merge → confirm the primer generates and the tarball lands on the GH release 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only changes the `scripts/generate-primer.mjs` fetch behavior by adding retries/backoff for transient network/HTTP failures, which may slightly increase run time but should reduce flaky CI failures. > > **Overview** > Improves primer generation robustness by wrapping registry/name-list `fetch` calls in a new `fetchWithRetry` helper with exponential backoff. > > The script now retries transient network errors plus HTTP `5xx` and `429`, while treating other `4xx` responses as terminal and preserving existing failure/skip behavior when the final attempt still fails. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 637800f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
The v1.6.0 release shipped to GitHub but only with darwin-arm64 and the two windows tarballs — all four Linux targets failed to upload, and the downstream npm/COPR/PPA publish jobs all failed too. Fixes the three independent root causes:
crates/aube-resolver/build.rspanics via.expect()whennodeis absent. The cross-rs Docker container that builds Linux release binaries and the Fedora COPR mock chroot that builds the SRPM both havescripts/generate-primer.mjsvisible (mounted / bundled in the source tarball) but nonodebinary, so the existing "no script → empty primer" fallback (fix(resolver): ship empty primer when generator script unavailable #425) doesn't trigger. Fall back onErrorKind::NotFoundfromCommand::status()so the same empty-primer path covers all three "no node" environments. Verified locally withenv -i+ a node-less PATH: emitscargo:warning=node not found in PATH; shipping empty primerand builds clean.publish-npmfails withUnsupported GitHub Actions runner environment: "self-hosted". Only "github-hosted" runners are supported when publishing with provenance.Move the job from the namespace runner toubuntu-latest. Trusted Publishing requires a github-hosted OIDC identity; the publish job is otherwise light enough that the namespace runner saves nothing.ppa-publishfails atdputwithConnection failed, aborting. Check your network— namespace runners block outbound FTP (port 21) toppa.launchpad.net. Move toubuntu-latestwhich allows it.After merge, re-run the failed jobs against
v1.6.0to backfill the missing Linux assets and complete the npm/COPR/PPA publishes.Test plan
cargo build -p aube-resolverfrom a node-less PATH falls back to the empty primer with the newcargo:warning=cargo build -p aube-resolverwith node present still generates the primer and builds normallycargo clippy -p aube-resolver --all-targets -- -D warningscleancargo fmt --checkcleanv1.6.0after merge → confirm Linux tarballs land on the GH releasepublish-npmforv1.6.0→ confirm@endevco/aube*lands on npmjs.com with provenancecopr-publishforv1.6.0→ confirm Fedora 42/43/44/rawhide builds succeedppa-publishforv1.6.0→ confirm dput uploads the source package🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk because it changes release/publishing CI runners and alters
aube-resolverbuild-time primer generation behavior (now falling back to an empty primer whennodeis unavailable), which could affect release packaging and runtime performance if mis-triggered.Overview
Unblocks release publishing by switching the
publish-npmandppa-publishGitHub Actions jobs from the self-hosted namespace runner toubuntu-latestto satisfy npm Trusted Publishing provenance requirements and allow outbound FTP for Launchpaddputuploads.Makes
crates/aube-resolver/build.rsresilient to environments where the primer generator script exists butnodeis not installed:generate()now returns a boolean and treatsErrorKind::NotFoundas a non-fatal condition (emitting acargo:warning=) so builds fall back to shipping an empty primer instead of panicking.Reviewed by Cursor Bugbot for commit fa90723. Bugbot is set up for automated code reviews on this repo. Configure here.