Repository navigation
Description
Three defects in the release path, found while shipping fly 0.33.1. They are independent; two are fixable in this repo, one needs an action on npmjs.com.
1. @intentius/chant-k8s-client is stranded at 0.32.0 on npm
Everything else is at 0.33.0. The client is not.
@intentius/chant-k8s-client 0.32.0 ← npm
@intentius/chant 0.33.0
packages/k8s-client (local) 0.33.0
Its publish step fails and has been failing. From run 30411782660 (and 30409489666 before it):
npm error code ENEEDAUTH
npm error need auth This command requires you to be logged in to https://registry.npmjs.org/
Step-level result for that run — one failure, twelve successes:
success Publish @intentius/chant
failure Publish @intentius/chant-k8s-client
success Publish @intentius/chant-lexicon-gitlab
... (every remaining lexicon: success)
ENEEDAUTH on the OIDC path means npm found no credentials and performed no trusted-publisher exchange — i.e. there is no trusted publisher record for @intentius/chant-k8s-client, while every other package has one. This is exactly the failure mode c3dcbc7c anticipated when it made each package publish independently; that change is why one missing record no longer strands the packages after it, but the client itself is still stranded.
It matters beyond tidiness: the k8s lexicon declares the client as an optional dependency, and publish.yml's own comment says publishing it first is "what keeps chant lifecycle diff --live working for a registry install rather than silently degrading to holes."
Fix (not code): add a trusted publisher record on npmjs.com for @intentius/chant-k8s-client → repo INTENTIUS/chant, workflow .github/workflows/publish.yml. Then re-run publish, or let the next release carry it.
2. just release-lexicon does not keep @intentius/* peer ranges in lockstep
just release bumps .version and rewrites the @intentius/chant / @intentius/chant-lexicon-github peer ranges to match (added in #411, because ranges frozen at ^0.1.0 break clean installs).
release-lexicon only sets .version:
jq --arg v "$next" '.version = $v' lexicons/{{name}}/package.jsonHarmless today — fly 0.33.1 still wants core ^0.33.0, which is satisfied — but a single-lexicon patch that needs a newer core silently ships a stale range, reintroducing #411 for that package.
3. Release commits bypass branch protection
Both recipes push the version-bump commit straight to main:
remote: Bypassed rule violations for refs/heads/main:
remote: - 3 of 3 required status checks are expected.
So the commit a release tag points at is one CI never ran. The bump itself is mechanical (a .version edit), but nothing verifies the code being released was green either — release-lexicon will happily tag and publish from a red or unpushed main.
Proposed fix: a pre-flight in both recipes — refuse to tag unless the working tree is clean, HEAD matches origin/main, and the latest CI run for that commit concluded success. An explicit opt-out flag for emergencies.
Scope
- 1 — trusted publisher record for
chant-k8s-client(npmjs.com, needs an owner) - 2 — peer-range lockstep in
release-lexicon, guarded by a test - 3 — pre-flight green/pushed check in both release recipes
Related: d4a269cd fixed a fourth defect in this same path (single-lexicon tags did not trigger the publish workflow at all) and added packages/core/src/codegen/release-wiring.test.ts, which is where 2's guard belongs.
Activity
lex00 commentedon Jul 31, 2026
Item 1 is done, and 2–3 are up in #1281.
1 — trusted publisher for
@intentius/chant-k8s-client✅Configured on npmjs.com. The package published
0.33.1over OIDC with a provenance attestation, so it went through trusted publishing rather than a fallback:@intentius/chant-lexicon-fountainhad the same defect (added in #1253, never given a record) and was stranded at 0.33.0. Both are now at 0.33.1 and the whole estate is level.The record existed but did not match, for a while. The org field was
intentius; npm compares it to the GitHub OIDC claim case-sensitively, soINTENTIUSwas required. Until it was capitalized, the token exchange returned404 package not foundandnpm publishfell through to a bareENEEDAUTH— indistinguishable from having no credentials at all. Worth knowing before anyone debugs this again.Why it was hard to diagnose, and what now prevents a repeat
npm's OIDC helper is written never to throw: when the exchange fails it logs at verbose level and returns
undefined, so the only visible symptom isENEEDAUTH. That one error covers "no record", "record doesn't match this workflow", and "no credentials".#1278 addressed that:
scripts/publish-packages.shreplays the exchange and prints the registry's own status and message instead of leaving you to infer fromENEEDAUTH. (A successful exchange answers 201, not 200.)scripts/audit-trusted-publishers.shruns on every publish as a non-gatingauditjob and reports coverage across all 14 packages in ~40s, so a package missing its record surfaces immediately rather than at release time. It has to live inpublish.yml— npm matches the record against the workflow filename, so probing from any other workflow returns 404 for everything and proves nothing.2 and 3 — #1281
release-lexiconnow rewrites the@intentius/*peer ranges, pinned to the current core version rather than$next(a single-lexicon patch doesn't move core, so^$nextwould demand a version that doesn't exist). Also keepspackage-lock.jsonin step, per chore: sync package-lock with the 0.20.0 release bump #1094.scripts/release-preflight.sh, shared by both recipes, refuses to tag unless the tree is clean,HEADmatches its pushed branch, and thechantrun for that commit concluded success.CHANT_RELEASE_SKIP_PREFLIGHT=1is the opt-out.Guards for both are in
release-wiring.test.ts, as this issue suggested.fix(release): keep peer ranges in lockstep, and refuse to tag an unve…
fix(release): floor the lockstep bump at the highest package version (#…
lex00 commentedon Aug 4, 2026
Closing — all three defects are resolved. Verified each rather than assuming, since they landed separately and none referenced this issue on closing.
1.
@intentius/chant-k8s-clientstranded at 0.32.0 — fixed. It is now in lockstep with everything else on npm:That was the non-code half (a trusted-publisher record on npmjs.com), so it left no commit here — worth stating, because nothing in the repo records it happening.
2.
just release-lexiconnot keeping peer ranges in lockstep — fixed. The recipe now rewrites them, and gets the subtle part right: a single-lexicon patch does not move core, so the ranges track the CURRENT core / github-lexicon versions rather than the lexicon's new one. Pinning them to$nextwould demand a core that does not exist.3. Release commits bypassing branch protection — fixed.
scripts/release-preflight.shrefuses to tag unless the tree is clean, HEAD matches its remote, and the latest CI run for that commit concluded success, withCHANT_RELEASE_SKIP_PREFLIGHT=1as the emergency opt-out. Both recipes call it —releasewithmainrequired,release-lexiconwith any branch allowed but still pushed and green.Nothing left to do here.
ci(release): stop cancelling main's chant runs, and release the newes…