redeploy-services: PeerTube's sign-in plugin install dies with an empty stderr — pnpm add is killed by the unit's seccomp filter on chown(2) (SIGSYS), and PeerTube reports it as a bare HTTP 400 #1622
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#1622
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
20260919T021605Z(#1620 run 2, the roles proof part 2) went red atredeploy-services, 29/30 legs green (artifacts/verdict.json,artifacts/legs.json:leg=redeploy-services). The switch died at exit 4 with:This is link 3 of the PeerTube-8-on-a-nixpkgs-PeerTube-≤7-unit chain. Links 1 (
pnpmnot on the unit PATH, GOTCHAS #261,f48c2dee) and 2 (pnpm's store/state in the read-only HOME + the 60× retry storm, GOTCHAS #262,a3253331) were both live on this drive and both held — the retry cap fired loud and correctly after three refusals (peertube-oidc.servicejournal, 03:00:26: "PeerTube refused the plugin install 3 times — giving up rather than hammering the plugin index"), which is what made link 3 readable at all.Evidence, from the kept box
PeerTube's own journal blamed pnpm but carried nothing:
An empty stderr on a command that had all but finished:
/var/lib/peertube/storage/plugins/node_modules/holdspeertube-plugin-auth-openid-connect,openid-client,jose,oauth4webapifully linked;pnpm-lock.yamlis written andlockfile-verified.jsonlrecords the 02:57:29 verification. Onlypackage.jsonstayed{}, with pnpm's temppackage.json.442308548({"dependencies":{"peertube-plugin-auth-openid-connect":"1.2.0"}}) orphaned beside it — plus one orphanedpnpm-lock.yaml.<n>per attempt.coredumpctlon the box named the cause outright:The unit's filter (
systemctl cat peertube, lines 60–63):and on the same box:
So:
@privilegedis denied,@privilegedcontains@chown, and nixpkgs hands back exactly one member —fchown, the entry point PeerTube ≤ 7's yarn used. pnpm 11 rewritespackage.jsonand the lockfile through write-file-atomic, which chowns the temp file by path.chown(2)is denied → SIGSYS → core dump. seccomp kills without a word, which is exactly why stderr was empty, node printed no stack, and PeerTube could say no more thanCannot install plugin.The suspected layer
The video port's render,
internal/clan/video.go:260(renderPeerTubeDaemon) — the same place links 1 and 2 were fixed. Nothing in the harness, the fixtures or PeerTube's own logic is at fault; the unit's syscall allowlist names one entry point of the ownership family and pnpm 11 uses another.The fix (
cc1bced9)internal/clan/video.gohands the whole family back:lib.mkAfterbecause the entry MUST land after the module's own deny list — NixOS'sunitOptionconcatenates list definitions, and an unprefixed entry landing first would make the whole filter an allow-list instead of a deny-list. Covered byTestRenderVideo_ThePeerTubeUnitMayChownItsOwnPluginFiles(substring + a realnix-instantiate --parse, the #257 double-definition guard). GOTCHAS #263 records the diagnostic rule: a child killed by seccomp says nothing, so ask the box for the core dump before theorising about the child.Render-proven; live-unproven until the next fire, the same standing as links 1 and 2.
Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door. The change is one rendered Nix line in
internal/clan/video.go; reverting it is deleting that line and its test, with no migration, no persisted state and no data shape touched — a later commit undoes it completely.Proven by
TestRenderVideo_ThePeerTubeUnitMayChownItsOwnPluginFiles(internal/clan/video_test.go), written red-first: it failed against the pre-fix render and passes after, and it parses the whole module with a realnix-instantiate --parseso a second definition of the attribute cannot slip through as a substring match (GOTCHAS #257).Mechanical repair, not a design decision. It reads as a security-posture edit and I weighed it as one; on the substance it is not. The decision — "the PeerTube unit may change ownership of the plugin files it owns" — was already taken upstream, by nixpkgs, when the module re-allowed
fchownafter denying@privileged. That is the same capability this commit grants; the only delta is the sibling entry points of the same syscall group (chown,lchown,fchownat; the 32-bit members are unreachable underSystemCallArchitectures=native), which do by path whatfchownalready does by fd. And the ceiling is unchanged: the unit runsUser=peertubewithCapabilityBoundingSet=empty andNoNewPrivileges=true, so without CAP_CHOWN it can only ever chown its own files to its own uid/gid — there is no privilege for the added entries to reach. Nothing a community sees, no route, no secret, no default, no message at a trust moment. It is the same class as links 1 and 2 of this chain (a PATH, an XDG dir): making the unit do what it already meant to do, for the tool PeerTube 8 actually shells out to.The one judgement worth a second eye is the breadth —
@chownrather than the singlechownthe core dump named. I chose the family deliberately: naming one entry point of this group is precisely how the bug arose, and this chain has already cost three paid drives, one per link. If Ben prefers minimal-and-evidence-driven, narrowing[ "@chown" ]to[ "chown" ]is a one-token follow-up. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260919T021605Zred atredeploy-services(sig 03347fc9985d) — self-fixed on the fast lane, commitdd3cceaf583e587e5ab46935505ad41efb8ea4ed; checks: targeted:GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/clan -run TestRenderVideo_ThePeerTubeUnitMayChownItsOwnPluginFiles— FAIL before the fix (red-first),ok git.matou.nz/Matou/idss/internal/clan 0.080safter. package:GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/clan ./internal/videosvc—ok git.matou.nz/Matou/idss/internal/clan 27.118s,ok git.matou.nz/Matou/idss/internal/videosvc 0.004s. Diff: 3 files, 60 non-test lines added, 0 removed; no assertion, test or leg touched.. evidence:/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260919T021605Zon matou-workstation.close-report for #1622 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope