fix(agent): give the Workers deploy path its registry credential #516
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/deploy-registry-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the registry-auth story. The gap had three homes and this is the last one:
"$HOME/.npmrc"on HOME-less runners, landing in/.npmrcwhile pnpm read/root/.npmrc(#505).FG_NPM_TOKEN(#514, agent 0.1.63).pnpm installin a temp checkout and never looked atdep.Registryat all.ensureForgegraphRegistrywrites the@forgegraphscope mapping into that checkout's.npmrc, but nothing wrote an auth line — so pnpm resolved the scope to npm.forgegraf.com and then fetched anonymously, and the registry answered 401.The error is genuinely misleading: pnpm says "No authorization header was set" and then lists the scope mappings it found, which reads like a missing secret rather than a missing file. And because the nix path had the credential all along, the same deployment could succeed on one platform and 401 on the other.
forgegraph → beta(targetbeta-cfon hetzner-bob) failed this way repeatedly on 2026-08-27.Appends, never truncates. App repos ship their own
.npmrc— ForgeGraph's own carries@preflight:registryandnode-linker=hoisted.registry.WriteNpmrctruncates, which suits a CI sandbox but would swap a 401 for an unresolvable scope in a real checkout. Written0600since it holds a token; no-op without a credential or when auth for the host is already present; best-effort like its neighbour, so it never fails a deploy.5 tests: append-preserves-content, create-when-absent, 0600 perms, no-duplicate, no-op-without-credential.
go vetclean, agent + registry suites green.Until this ships I have hand-written
/root/.npmrcon hetzner-bob and hetzner-worker to unblock beta deploys — the same invisible node-local config #514 is removing. This lets those be deleted.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMpzX1b6swjezEptw3T71f