Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a90ccfa
Publish by OIDC trusted publishing instead of a stored npm token
unbraind Aug 26, 2026
013ed34
Fail closed on the npm version actually in use, and scope the guards …
unbraind Aug 26, 2026
474c331
Fail the release before it bumps when npm refuses the workflow's iden…
unbraind Aug 26, 2026
0ceb987
Reject npm credential aliases and the --global install spelling
unbraind Aug 26, 2026
105a5cf
Close two guards that passed without the behaviour they protect
unbraind Aug 26, 2026
cb905aa
Restore the docstring the guard suite's docstring gate requires
unbraind Aug 26, 2026
f1dc6ac
Do not let the OIDC exchange credential outlive the step that fetched it
unbraind Aug 26, 2026
fe67961
Record the release-hardening evidence on the tracked item
unbraind Aug 26, 2026
88ff19e
Encode the package name and accept 201, or the preflight blocks corre…
unbraind Aug 26, 2026
bb0ec96
Scrub every legacy credential, bound the preflight, and name a regist…
unbraind Aug 26, 2026
645c266
State the incident dates in these records as UTC
unbraind Aug 26, 2026
8a0d529
Refuse a non-main ref before requesting a publish credential
unbraind Aug 26, 2026
1b498c9
Gate the job by ref, re-verify npm at publish time, and make failures…
unbraind Aug 26, 2026
76b9991
Freeze the history and gate the future on commit identity and host paths
unbraind Aug 27, 2026
676cc3f
Close a vacuous credential guard and stop interpolating context into …
unbraind Aug 27, 2026
6669e26
Measure the mutation coverage instead of maintaining a tally
unbraind Aug 27, 2026
f1c9e09
Reject and scrub global npm credentials, not only registry-scoped ones
unbraind Aug 27, 2026
fb605fc
Catch credential writes that carry a flag, and scrub npm's global config
unbraind Aug 27, 2026
e7591d1
fix(ci): let a maintainer update an audit control without the gate re…
unbraind Aug 27, 2026
75b1105
fix(ci): check each generator invocation on its own, and fail when th…
unbraind Aug 27, 2026
846d207
chore(pm): drop a comment that a retried add had duplicated
unbraind Aug 27, 2026
cf05a40
chore(git): ignore SDK workspace-transaction journals
unbraind Aug 27, 2026
e03f6f3
ci: run the changelog-date verifier instead of only shipping it
unbraind Aug 27, 2026
bd8b212
fix(ci): find the release-time generator invocations the shell verifi…
unbraind Aug 27, 2026
601d10e
test: execute the verifier's rules against fixtures, and close three …
unbraind Aug 27, 2026
783ad13
fix(ci): close two ways the identity audit could be told to look at l…
unbraind Aug 27, 2026
20b53f3
fix(test): make the inline-permissions branch capable of passing
unbraind Aug 27, 2026
f443a7d
fix(ci): stop three guards failing open, and stop one gate measuring …
unbraind Aug 27, 2026
6926d27
docs(pm): state the mutation property instead of a tally that goes stale
unbraind Aug 27, 2026
98dd9ad
test: follow the verifier's own contract change, and drop a duplicate…
unbraind Aug 27, 2026
a9af3e3
Merge origin/main after the daily release
unbraind Aug 27, 2026
d814533
docs(changelog): regenerate after merging the released main
unbraind Aug 27, 2026
d45f036
fix: close a continuation bypass, stop a comment satisfying a flag check
unbraind Aug 27, 2026
2ab1925
fix: split on unspaced shell separators, and stop two guards at the r…
unbraind Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/pm/history/pm-jira-0thg.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"ts":"2026-08-26T19:33:41.627Z","author":"claude","author_source":"asserted","agent_harness":"claude-code","agent_instance":"f559dcd5a5f387bc7221097a","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":{"value":"implementer","source":"argv"},"topic":null},"op":"create","patch":[{"op":"replace","path":"/body","value":"Trusted publishing replaces the stored credential. The registry mints a short lived credential from the workflow OIDC identity, so there is no secret left to expire. Requires a one time configuration on npmjs.com binding this package to unbraind/pm-jira and the release.yml workflow."},{"op":"add","path":"/metadata/id","value":"pm-jira-0thg"},{"op":"add","path":"/metadata/title","value":"The release job authenticated with a stored npm token that expired, so publishing stopped while every other gate stayed green"},{"op":"add","path":"/metadata/description","value":"The Publish npm package step read NODE_AUTH_TOKEN from the repository secret NPM_TOKEN. That credential began being rejected on 2026-08-17. From then until 2026-08-26 every daily release run reached the publish step and failed with npm code E404 on PUT to the registry, which is how npm reports a rejected write credential rather than a missing package. Rotating the secret on 2026-08-22 did not help, and the copy of the credential on the maintainer host answers 401 to npm whoami, so the token is dead rather than mis-stored. Because the version bump and the release commit both land before the publish step, main advanced to 2026.8.26 with no matching tag and no published artifact while npm still serves 2026.8.17. Sixteen of the eighteen published fleet packages are in the same state."},{"op":"add","path":"/metadata/type","value":"Issue"},{"op":"add","path":"/metadata/status","value":"in_progress"},{"op":"add","path":"/metadata/priority","value":0},{"op":"add","path":"/metadata/tags","value":["npm","release","supply-chain"]},{"op":"add","path":"/metadata/created_at","value":"2026-08-26T19:33:41.627Z"},{"op":"add","path":"/metadata/updated_at","value":"2026-08-26T19:33:41.627Z"},{"op":"add","path":"/metadata/deadline","value":"2026-09-02T00:00:00.000Z"},{"op":"add","path":"/metadata/assignee","value":"claude"},{"op":"add","path":"/metadata/author","value":"claude"},{"op":"add","path":"/metadata/estimated_minutes","value":90},{"op":"add","path":"/metadata/acceptance_criteria","value":"No release workflow references NODE_AUTH_TOKEN NPM_TOKEN or secrets.NPM outside a comment; the publish job carries id-token write; npm is raised to at least 11.5.1 before the publish step because the npm bundled with node 22 cannot exchange an OIDC token; a test fails closed if a stored token is reintroduced or the npm upgrade is removed"},{"op":"add","path":"/metadata/comments","value":[{"created_at":"2026-08-26T19:33:41.627Z","author":"claude","text":"Guards verified as non-vacuous: reintroducing NODE_AUTH_TOKEN fails the OIDC test and deleting the npm upgrade step fails the npm-version test, while the unmodified tree passes both."}]},{"op":"add","path":"/metadata/notes","value":[{"created_at":"2026-08-26T19:33:41.627Z","author":"claude","text":"Root cause was found by comparing npm view against the branch, not by reading CI. Every job except publish was green for ten days."}]},{"op":"add","path":"/metadata/learnings","value":[{"created_at":"2026-08-26T19:33:41.627Z","author":"claude","text":"A release pipeline that bumps and commits the version before it publishes hides a credential outage indefinitely. Registry state, not workflow state, is the definition of released."}]},{"op":"add","path":"/metadata/files","value":[{"path":".github/workflows/release.yml","scope":"project"}]},{"op":"add","path":"/metadata/tests","value":[{"command":"npx tsx --test test/release-workflow.test.ts","scope":"project"}]},{"op":"add","path":"/metadata/docs","value":[{"path":"https://docs.npmjs.com/trusted-publishers","scope":"project","note":"npm trusted publishing setup"}]}],"before_hash":"3cc22dff72be7b14824654a7a64ea62b04799939b2fee54c1b5f52ca60bf6df0","after_hash":"6c0ffb9f160ba706c1396d4224bc2338dc02ba290f91929168489aa2f7866365","item_hash_version":2,"message":"Record the npm credential outage and migrate this package to trusted publishing","context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
5 changes: 5 additions & 0 deletions .agents/pm/history/pm-jira-otvo.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{"ts":"2026-08-26T21:04:50.411Z","author":"codex","author_source":"configured","agent_harness":"claude-code","agent_instance":"66f51baccd944ab11404f28c","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":{"value":"implementer","source":"argv"},"topic":null},"op":"create","patch":[{"op":"add","path":"/metadata/id","value":"pm-jira-otvo"},{"op":"add","path":"/metadata/title","value":"A release run bumped and committed a new version every night while publishing was impossible, because the only externally-failable step runs last"},{"op":"add","path":"/metadata/description","value":"The release job orders the version bump and the release commit before the publish step. When the npm credential died on 2026-08-17 that ordering meant every nightly run advanced main to a fresh version, pushed no tag, published nothing, and still reported the bump as progress. The outage stayed invisible for ten days across sixteen packages. A probe against npm's OIDC exchange endpoint from a real workflow returned HTTP 404 with the message 'OIDC token exchange error - package not found', proving no trusted publisher is bound to the package, so publication cannot succeed until that is configured on npmjs.com."},{"op":"add","path":"/metadata/type","value":"Issue"},{"op":"add","path":"/metadata/status","value":"open"},{"op":"add","path":"/metadata/priority","value":0},{"op":"add","path":"/metadata/tags","value":["ci","npm","release","supply-chain"]},{"op":"add","path":"/metadata/created_at","value":"2026-08-26T21:04:50.411Z"},{"op":"add","path":"/metadata/updated_at","value":"2026-08-26T21:04:50.411Z"},{"op":"add","path":"/metadata/author","value":"codex"}],"before_hash":"3cc22dff72be7b14824654a7a64ea62b04799939b2fee54c1b5f52ca60bf6df0","after_hash":"fe4c417cc96a147b822cd5eceb4f7299f49c932e552141076d5c4a8ff98f4869","item_hash_version":2,"message":"","context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
{"ts":"2026-08-26T21:04:51.327Z","author":"codex","author_source":"configured","agent_harness":"claude-code","agent_instance":"66f51baccd944ab11404f28c","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":{"value":"implementer","source":"argv"},"topic":null},"op":"update","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-08-26T21:04:51.327Z"},{"op":"replace","path":"/metadata/status","value":"in_progress"},{"op":"add","path":"/metadata/acceptance_criteria","value":"The release run fails before the version bump when npm will not accept the workflow's OIDC identity; the failure message names the package, organization, repository and workflow filename to configure; the preflight cannot be made advisory with continue-on-error; reverting the preflight, the exact npm pin, the setup-node credential strip, or introducing any secret into the publish step each fail at least one test"},{"op":"add","path":"/metadata/learnings","value":[{"created_at":"2026-08-26T21:04:51.307Z","author":"codex","text":"Ordering, not the credential, is what made this a ten-day outage. The credential failure was ordinary; what made it invisible was that the only step which can fail for a reason outside the repository ran after the steps that mutate state. Any pipeline with that shape reports progress while achieving nothing, so the externally-failable check belongs first."}]},{"op":"add","path":"/metadata/files","value":[{"path":".github/workflows/release.yml","scope":"project"},{"path":"test/release-workflow.test.ts","scope":"project"}]}],"before_hash":"fe4c417cc96a147b822cd5eceb4f7299f49c932e552141076d5c4a8ff98f4869","after_hash":"532b8ca22c4384d3284c15bf4c7f6a4e230fc1c66f1f11b3b01ebfeb00e8a80c","item_hash_version":2,"context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
{"ts":"2026-08-26T21:44:30.535Z","author":"codex","author_source":"configured","agent_harness":"claude-code","agent_instance":"66f51baccd944ab11404f28c","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":null,"topic":null},"op":"comment_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-08-26T21:44:30.535Z"},{"op":"add","path":"/metadata/comments","value":[{"created_at":"2026-08-26T21:44:30.535Z","author":"codex","text":"Verified by mutation rather than inspection. Twenty reverts were applied to the workflow one at a time and the guard suite re-run against each, and all twenty fail: reintroducing NODE_AUTH_TOKEN, deleting the preflight, marking it continue-on-error, loosening the npm pin to a caret range, dropping the setup-node _authToken strip, smuggling PUBLISH_CREDENTIAL or NODE_AUTH_TOKEN into the publish env, a --global npm downgrade, an _auth line, a username line, a keyfile line, NPM_CONFIG__AUTH in the publish env, a comment-only npm install, a job-level permissions block without id-token, an inline permissions mapping without it, a scalar permissions shorthand, id-token granted to a different job only, a fixed /tmp credential path, mktemp without the cleanup trap, and a bracket-form secret reference."}]}],"before_hash":"532b8ca22c4384d3284c15bf4c7f6a4e230fc1c66f1f11b3b01ebfeb00e8a80c","after_hash":"8a6d66bdc8c160d5195da1058416ad67252b7eb4a8eb4ead318261a1745ccccd","item_hash_version":2,"context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
{"ts":"2026-08-26T21:44:30.995Z","author":"codex","author_source":"configured","agent_harness":"claude-code","agent_instance":"66f51baccd944ab11404f28c","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":null,"topic":null},"op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/1","value":{"created_at":"2026-08-26T21:44:30.995Z","author":"codex","text":"Root cause was established by asking the registry, not by reading CI. A throwaway workflow minted a GitHub OIDC id-token of 1982 bytes and offered it directly to npm's exchange endpoint, which answered HTTP 404 with 'OIDC token exchange error - package not found'. That is npm reporting no trusted publisher binding rather than a missing package, since the package is on the registry. It also rules out the competing hypothesis that setup-node's registry-url writes an empty _authToken that short-circuits the exchange; that is handled defensively but was not the cause. Publishing stays blocked until a trusted publisher is configured on npmjs.com, which is outside this repository."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-08-26T21:44:30.995Z"}],"before_hash":"8a6d66bdc8c160d5195da1058416ad67252b7eb4a8eb4ead318261a1745ccccd","after_hash":"42bc2351da939bbc1de881c458b0fbc0f73a2ffc2de4a9ef3aadbe99de1f542f","item_hash_version":2,"context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
{"ts":"2026-08-26T21:44:31.413Z","author":"codex","author_source":"configured","agent_harness":"claude-code","agent_instance":"66f51baccd944ab11404f28c","agent_provenance":{"model":null,"effort":{"value":"xhigh","source":"environment"},"role":null,"topic":null},"op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/2","value":{"created_at":"2026-08-26T21:44:31.413Z","author":"codex","text":"Review found a real credential leak in the preflight and it is fixed. On the HTTP 200 path the exchange response body IS a short-lived npm publish credential. It was written to a predictable path and left there for the rest of the job, where every later step running as the same runner user could read it; not echoing it was not sufficient. It now goes to an mktemp file removed by an EXIT trap on every path, and the error branch reads that file through the environment rather than by hardcoded name. The first attempt at that error branch wrote the env assignment after the node invocation, which passes argv rather than environment and would have silently produced an empty reason string; that was caught by running the line rather than assuming it."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-08-26T21:44:31.413Z"}],"before_hash":"42bc2351da939bbc1de881c458b0fbc0f73a2ffc2de4a9ef3aadbe99de1f542f","after_hash":"201d7d76991dc64253165f977524819895762ad0a8ab2bbd927bdf0e32d084b4","item_hash_version":2,"context":{"agent_provenance_outcomes":{"model":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"},"version":{"status":"failed","reason":"resolver_failed","resolver":"claude_session_file","rule_version":"v1"}}}}
27 changes: 27 additions & 0 deletions .agents/pm/issues/pm-jira-0thg.toon
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
id: pm-jira-0thg
title: "The release job authenticated with a stored npm token that expired, so publishing stopped while every other gate stayed green"
description: "The Publish npm package step read NODE_AUTH_TOKEN from the repository secret NPM_TOKEN. That credential began being rejected on 2026-08-17. From then until 2026-08-26 every daily release run reached the publish step and failed with npm code E404 on PUT to the registry, which is how npm reports a rejected write credential rather than a missing package. Rotating the secret on 2026-08-22 did not help, and the copy of the credential on the maintainer host answers 401 to npm whoami, so the token is dead rather than mis-stored. Because the version bump and the release commit both land before the publish step, main advanced to 2026.8.26 with no matching tag and no published artifact while npm still serves 2026.8.17. Sixteen of the eighteen published fleet packages are in the same state."
type: Issue
status: in_progress
priority: 0
tags[3]: npm,release,supply-chain
created_at: "2026-08-26T19:33:41.627Z"
updated_at: "2026-08-26T19:33:41.627Z"
deadline: "2026-09-02T00:00:00.000Z"
assignee: claude
author: claude
estimated_minutes: 90
acceptance_criteria: No release workflow references NODE_AUTH_TOKEN NPM_TOKEN or secrets.NPM outside a comment; the publish job carries id-token write; npm is raised to at least 11.5.1 before the publish step because the npm bundled with node 22 cannot exchange an OIDC token; a test fails closed if a stored token is reintroduced or the npm upgrade is removed
comments[1]{created_at,author,text}:
"2026-08-26T19:33:41.627Z",claude,"Guards verified as non-vacuous: reintroducing NODE_AUTH_TOKEN fails the OIDC test and deleting the npm upgrade step fails the npm-version test, while the unmodified tree passes both."
notes[1]{created_at,author,text}:
"2026-08-26T19:33:41.627Z",claude,"Root cause was found by comparing npm view against the branch, not by reading CI. Every job except publish was green for ten days."
learnings[1]{created_at,author,text}:
"2026-08-26T19:33:41.627Z",claude,"A release pipeline that bumps and commits the version before it publishes hides a credential outage indefinitely. Registry state, not workflow state, is the definition of released."
files[1]{path,scope}:
.github/workflows/release.yml,project
tests[1]{command,scope}:
npx tsx --test test/release-workflow.test.ts,project
docs[1]{path,scope,note}:
"https://docs.npmjs.com/trusted-publishers",project,npm trusted publishing setup
body: "Trusted publishing replaces the stored credential. The registry mints a short lived credential from the workflow OIDC identity, so there is no secret left to expire. Requires a one time configuration on npmjs.com binding this package to unbraind/pm-jira and the release.yml workflow."
Loading