redeploy-services: the PeerTube unit has no pnpm, so PeerTube 8's sign-in plugin install dies command not found and reports a bare 400 — the 429 in the leg error is self-inflicted #1621
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1621
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The failure
Drive
20260919T005805Z, legredeploy-servicesred (29/30 green) withmasked_exit on gateway: the remote switch died at exit 4.peertube-oidc.servicefailed; its journal ends:This is byte-for-byte the #1616 / GOTCHAS #260 symptom, so it reads as "the lifted connect cap did not take". It did take. This is the NEXT link in the chain.
The evidence — from the kept droplet
journalctl -u peertube, the FIRST install attempt (01:54:03, 8 s after the oneshot started):PeerTube 8.1.8 installs a plugin by shelling out to pnpm —
dist/core/lib/plugins/package-manager.js:34,execShell(\pnpm ${command}`, { cwd: pluginDirectory }). PeerTube ≤ 7 usedyarn add, and nixpkgs'services.peertubestill puts PeerTube ≤ 7's package manager on the unit PATH.systemctl show peertube -p Environment` on the box:No pnpm, anywhere.
execShellinherits that PATH, so the install fails before it unpacks anything.pnpm's layout is not part of the gap: PeerTube writes its own
pnpm-workspace.yaml(nodeLinker: hoisted,dangerouslyAllowAllBuilds: true) into the plugins dir first (package-manager.js:72-75). The binary is the whole missing piece.Why the leg error named the wrong cause
The oneshot retries
provision_video_oidc60× at ~7 s (internal/clan/video.go:576-580), and every attempt makes PeerTube POSTpackages.joinpeertube.org/api/v1/plugins/latest-version. 120 attempts were logged. That index allows 100 (x-ratelimit-limit: 100), so from ~02:01 onward the response is:The 429 is entirely self-inflicted and it OVERWROTE
pnpm: command not foundin the journal tail the harness captures. GOTCHAS #245 again: read the FIRST failure of a retry loop, never the last.The fix in this commit
renderPeerTubeDaemon(internal/clan/video.go:289-300) now emitssystemd.services.peertube.path = [ pkgs.pnpm ];beside the #1616NODE_OPTIONSline. Covered byTestRenderVideo_CarriesPeerTubesPluginPackageManager(internal/clan/video_test.go:58). GOTCHAS #261 records the hazard and the 429-masking trap.Second defect — NOT fixed here, needs its own ruling
The retry storm above is a real latent defect in its own right: the oneshot retries a DETERMINISTIC failure 60 times and, on each pass, makes the community's gateway hammer a shared third-party service until its rate budget is spent — abusing joinpeertube.org and destroying the diagnostic evidence in the process.
mint_peertube_tokenalready learned exactly this lesson for PeerTube's OWN limiter (#1606 defect 2,video.go:538-544— mint once, back off on 429), but the lesson was never applied to the upstream index the install dials.It does not block the re-drive (with pnpm present the first install succeeds and the loop exits immediately), so it is not filed as a blocking residual — but it should be ruled on, and it overlaps the question already routed to Ben as #1616 defect 1: whether the plugin should arrive in the Nix closure at build time instead of from a third-party index at deploy time. Landing the plugin in the closure would dissolve both this defect and #260 at once.
Suspected layer
Product — the video port's Nix render (
internal/clan/video.go). A version drift between nixpkgs'services.peertubemodule (still yarn-era) and the PeerTube 8 package it deploys.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door, mechanical, not a design decision. (1) It is a one-line addition to a rendered unit's PATH —
systemd.services.peertube.path = [ pkgs.pnpm ]— revertible by deleting that line and its test in a single later commit, with no migration, no state, no persisted artifact behind it. (2) It changes nothing about what the community SEES or what the deploy MEANS to do: the module already declares that it installs peertube-plugin-auth-openid-connect and already drives PeerTube's install API to do so; it simply could not, because the interpreter that install shells out to was absent. Making the code do what it already meant to do is the definition of a mechanical repair. (3) No security, trust, secrets, route or message surface is touched — pkgs.pnpm is an existing nixpkgs package placed on one unit's PATH, not a new dependency manifest entry, not a new default a community chooses, not a changed word at a trust moment. (4) It is proven here byTestRenderVideo_CarriesPeerTubesPluginPackageManager(internal/clan/video_test.go:58), written red-first against the render and watched fail before the fix. (5) My confidence that pnpm alone closes it — rather than pnpm plus some layout flag — is not inference: the box's own copy of package-manager.js:72-75 shows PeerTube writing its own pnpm-workspace.yaml withnodeLinker: hoistedbefore installing, so the binary is the only thing it was missing. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260919T005805Zred atredeploy-services(sig 03347fc9985d) — self-fixed on the fast lane, commitf48c2deec1894b5998bdfb87cedcdd9dfa75614b; checks: targeted:GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/clan -run TestRenderVideo_CarriesPeerTubesPluginPackageManager— FAIL before the fix (red-first),ok git.matou.nz/Matou/idss/internal/clan 0.008safter. package:GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/clan ./internal/videosvc—ok git.matou.nz/Matou/idss/internal/clan 28.008s,ok git.matou.nz/Matou/idss/internal/videosvc 0.006s. Diff: 3 files, 47 non-test lines added, 0 removed; no assertion, test or leg touched.. evidence:/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260919T005805Zon matou-workstation.close-report for #1621 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope