ci: publish complete pr-package dependency graph - #1101
Conversation
|
Locally exercised the PR-package workflow from I followed the pinned reusable workflow's actual ordering: Local substitutions for GitHub contexts/actions:
Results:
Install URL (derived exactly like the PR comment): bun add alchemy@https://pkg.patrikduksin.com/alchemy/016c375Installing the published graph failed in 5/5 fresh projects on Bun 1.3.14 (a sixth independent attempt also failed — 6/6 total): the duplicate-tarball-URL race, not a flake. The errors varied by run but were consistently false resolution failures for repeated identical URLs, chiefly: This is not an upload/graph correctness failure: those URLs returned 200, their packed manifests are correct, and a clean standalone |
|
Converting to draft: we found a bug in this PR's own recommendation and are fixing it before this is ready. The description suggests query-string disambiguation ( The safe form is publishing the same tarball bytes under an additional per-edge alias tag (e.g. We're preparing an actions-side implementation of the tag variant and will update this PR's description and pin once it's ready. |
|
Blocker verification complete and this PR is ready for review.
The PR-package jobs are skipped as expected because this PR originates from a fork. |
Installing a PR build of
alchemyfrom pkg.ing currently breaks: the tarball keepsworkspace:*references for its nine runtime dependencies, so consumers fall back to stale or missing npm versions. This PR makes every pr-package publish a complete, installable same-commit graph —bun add alchemy@<pkg.ing url>just works — by pointing the caller at the graph-aware workflow from actions#2 and listing the nine workspace dependencies.Summary
alchemy's complete same-commit runtime workspace dependency closure: six Distilled packages and three Cloudflare Tools packagesubuntu-22-large, matching the existing project-reference build requirementsWhy
An official pkg.ing
alchemytarball currently retainsworkspace:*references for nine runtime dependencies because those packages are absent from this caller's package list. Consumers can therefore silently fall back to stale npm versions—or fail when no matching npm package exists—instead of installing a coherent same-commit graph. The graph support merged in actions#2 can rewrite and publish those dependencies once the caller declares the full closure.This remains a static list: whenever
alchemygains another workspace dependency independencies,optionalDependencies, orpeerDependencies, this workflow must grow too or the graph will silently become incomplete again. As a non-blocking follow-up, the actions repository could derive the transitive runtime closure directly from workspace manifests.Bun compatibility and CI cost
Complete graphs introduce duplicate tarball-URL edges. Bun through 1.3.14 (including the affected canary) drops a late duplicate edge's callback and fails installation with
failed to resolve. A maintainer-verified fix is open in oven-sh/bun#35426; the exact deep-graph repro and verification are recorded here, but the fix is not yet released.This is not hypothetical for this graph: we ran this exact configuration through the pinned workflow scripts against a private pkg.ing-compatible host, and installing the original published graph failed 6/6 attempts on Bun 1.3.14 (evidence in the comments below — the graph itself is byte-correct; each URL installs fine standalone). The actions-side fix in alchemy-run/actions#5 gives each affected duplicate edge a deterministic parent-specific tag such as
graph-<sha>-from-<parent>, uploads the same tarball bytes under every required tag, and rewrites the edge to that tag path. The resulting graph installed successfully in 3/3 fresh Bun 1.3.14 projects. Query-string identities are intentionally not used because Bun retains?in its package-store path and can then misparse that path during runtime module resolution. actions#5 is now merged, and this PR pins its merge commit (1d5b072da6efc338810ec99e1fd7d716947e6b57).This also adds nine package builds per push on large runners. That cost is explicit so maintainers can weigh complete graph correctness against CI usage.
Verification
ubuntu-22-large1d5b072da6efc338810ec99e1fd7d716947e6b57is the mergedalchemy-run/actions#5commitgit diff --checkactionlintwas not installed locally;bunx actionlintdid not expose a runnable binary, so no actionlint result is claimed.