deploy-video: the video-oidc oneshot installs the sign-in plugin from packages.joinpeertube.org at deploy time — the gateway can't reach it (ETIMEDOUT), so the switch dies at exit 4 #1616
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1616
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
20260918T211407Z(targetbrands, commitb561319d) red atdeploy-video, 35/36 legs green.peertube-oidc.serviceis the only failed unit on the box (logs/guest-failed-units.log), it fails on both the first pass and the clean-retry, and its failure killsswitch-to-configurationat exit 4 — themasked_exit/502 in the leg error is the consequence.The box is gone (no
artifacts/live-box.json; no forwarded port listening; the qemu guest unit is unreachable from this workstation), so this is read off the harvested journal rather than asked of the box.Defect 1 — the sign-in plugin is fetched from a third-party index at deploy time (the red)
internal/clan/video.go:494-496installs the OIDC plugin over PeerTube's admin API:PeerTube services that request by reaching out to the public plugin index. Its own log says so, verbatim (
logs/guest-system-journal.log:111-114):The
HTTP 400/"Cannot install plugin …"body in the leg error IS that timeout surfacing.AggregateError [ETIMEDOUT]frominternalConnectMultipleis Node's happy-eyeballs aggregate: every address forpackages.joinpeertube.orgtimed out from the gateway. The oneshot then retries the idempotent provisioning 60× (video.go:566-570) and exits 1 (video.go:571-572) — the 8 minutes between the two journal stamps.For contrast, this workstation reaches the same host fine over IPv4 (
curl -4→400from178.63.240.150) and has no IPv6 route at all (curl -6→ immediateCould not connect); the host publishes both an A and an AAAA record. Whether the gateway has no public egress by design, or lost only the v4 path, could not be settled with the box down — but it does not change the shape of the defect.Why this is not a heal. Every other catalogue port's bits arrive in the Nix closure. Video is the only one whose deploy is gated on a third-party package index (framasoft's) being up and reachable from the community's own box.
deploy-videohas been red on every drive since the port's OIDC half landed (169b24c5, spec #1544); the previous drive20260918T193207Zwas red here too, with the masked404/429that#1606(09504f01) fixed — that fix worked exactly as intended and is what let this drive name the real cause.Defect 2 — the already-installed tolerance is dead code (
count=250exceeds PeerTube's max)Separate, mechanical, and also named by the box.
internal/clan/video.go:502probes PeerTube's plugin list to tolerate the already-installed case:PeerTube caps
countat 100 (logs/guest-system-journal.log:19-30):Under
curl -fsSthat 400 is a non-zero exit, so theelseatvideo.go:506-509always runs and theplugin already installed — reusing itbranch (video.go:505) can never fire — precisely the case#1606added it for. It is a wrong constant:count=250→count=100. It is not the cause of this red (the journal shows PeerTube installed-then-removed the plugin, so the probe would correctly find it absent either way), but it is a latent exit-4 on any re-deploy where the plugin is present. Fix it in the same pass and pin it with a render test besideTestRenderVideo_OIDCPluginInstallFailsLoud(internal/clan/video_test.go:269).Suspected layer and why this needs a ruling
Product,
internal/clan/video.go— but the fix for defect 1 is a one-way door I refused under refusal rule 3 (product-behaviour surface as a design decision) and the never-self-fix bar on dependency changes. Three materially different paths, and a swarm worker cannot pick between them without a ruling:internal/clan/keri.go:338-376pinsfetchPypisdists by hash,internal/clan/anysync.go:282usesfetchFromGitHub. This is a supply-chain/pinning decision (which version, how it is updated, licensing) and a dependency change.deploy-videoproves; noted only for completeness, it should not be chosen without a ruling.Defect 2 is unblocked and confident regardless of which path defect 1 takes.
drive
20260918T211407Zred atdeploy-video:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gateway: clan: masked_exit on gateway: clan reported success but the log shows a real failure: the remote switevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260918T211407Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedSession close-report (ADR 0174 standing session). Worked the two-way half of this ticket and routed the one-way half. Commit
09a3e118onmain.Defect 2 — LANDED (two-way door, render-proven)
Fixed
internal/clan/video.go: the already-installed tolerance branch #1606 added probed PeerTube's plugin list withcount=250, over PeerTube's hardcountcap of 100. Undercurl -fsSthat 400 is a non-zero exit, so theelsealways ran and theplugin already installed — reusing itbranch could never fire — a latent exit-4 on any redeploy where the plugin is present.count=250→count=100.TestRenderVideo_OIDCPluginListProbeStaysWithinPeerTubesCountCap(red before the fix, green after);go test ./internal/clan,go build ./...,go vet,gofmtall clean. GOTCHAS #258. STATUS milestone-log entry.This was not the cause of this drive's red (the journal shows PeerTube installed-then-removed the plugin, so the probe would correctly have found it absent) — it is a separate latent hazard fixed in the same pass.
Defect 1 — ROUTED to
ready-for-human(the red)The
deploy-videored itself is a one-way door I am refusing under ADR 0174's one-way-door list (a supply-chain/dependency change and a security-posture question). It is not a heal, and a session cannot pick between the paths without a ruling — see## Why humanbelow.deploy-videostays red until that ruling lands; the ticket stays open.Why human
A one-way-door ruling (ADR 0174 §3 — supply-chain/dependency change + security-posture widening). The video-oidc oneshot installs the sign-in plugin over PeerTube's admin API, which fetches it from the public index
packages.joinpeertube.orgat deploy time; every address for that host timed out from the gateway (ETIMEDOUT), soswitch-to-configurationdied at exit 4. Video is the only catalogue port whose deploy is gated on a third-party package index being up and reachable from the community's own box — every other port's bits arrive in the Nix closure.Three materially different paths, each irreversible in a different way:
internal/clan/keri.go:338-376pinsfetchPypisdists by hash;internal/clan/anysync.go:282usesfetchFromGitHub. This is a supply-chain/pinning decision (which version, how it is updated, licensing) and a dependency change.deploy-videoproves. Noted only for completeness; should not be chosen without a ruling.Proposed default ruling (adopt if Ben doesn't say otherwise): path 1 — vendor into the closure, pinned by hash, matching the
keri.go/anysync.goprecedent. It keeps a community's deploy independent of framasoft's uptime (the whole point of shipping the rest of the port in the closure) and widens no security posture. The residue that still needs a human is the supply-chain call itself: which plugin version to pin, the update cadence, and the licence check — none of which a session should self-authorize.The open question is settled: the gateway HAS egress — the connect is slower than Node's 250 ms happy-eyeballs cap
Measured from elitebook-03 (the drive host the guest NATs through —
internal/vm/manager.go:1076is plain SLIRPuser,id=net0,…, norestrict=on, so the guest has public IPv4 egress and no IPv6 route):And the box's own journal, this drive:
255 ms from start to failure, every attempt (22:39:50, :58, 22:40:04 — all the same). That is Node's
autoSelectFamilyAttemptTimeout(default 250 ms): the host is dual-stack, so Node races families and gives each address 250 ms to finish the TCP handshake. Aotearoa → Germany is ~350 ms, so the A attempt is abandoned at 250 ms; the AAAA attempt has no route; the aggregate isETIMEDOUTwith an empty message. curl has no such cap, which is why every host-side probe succeeds.So this is not a rehearsal-guest quirk — it is every gateway in Aotearoa. Any box more than ~250 ms RTT from Hetzner DE without working IPv6 fails this install, on every deploy, forever. (The same cap applies to every outbound request PeerTube's Node makes to a far dual-stack host — federation, remote video import — not just the plugin index.)
Two separate things, only one of them Ben's
systemd.services.peertube.environment.NODE_OPTIONS = "--network-family-autoselection-attempt-timeout=5000"inrenderPeerTubeDaemon(internal/clan/video.go:265). This is what un-redsdeploy-video. It does not pre-empt (2).Defect 2 (
count=250> PeerTube's max 100) stands as filed and is mechanical too.Landed
d0c92177— the PeerTube unit carriesNODE_OPTIONS=--network-family-autoselection-attempt-timeout=5000(GOTCHAS #260). Ruled by agent under ADR 0174 — veto anytime. Not yet proven live; the next brand-reach fire is the proof.I have removed this ticket as a blocker of #1277 so the drive re-fires on the fix: what kept
deploy-videored was the connect cap, not where the plugin comes from. This ticket stays open andready-for-humanfor the question that is genuinely Ben's — should the sign-in plugin ride the Nix closure rather than a third-party index at deploy time. If the next fire is red atdeploy-videoagain I will re-add the edge and report here.drive
20260919T004408Zred atdeploy-video:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gateway: clan: masked_exit on gateway: clan reported success but the log shows a real failure: the remote switevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260919T004408Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedpnpm, so PeerTube 8's sign-in plugin install diescommand not foundand reports a bare 400 — the 429 in the leg error is self-inflicted #1621Run
20260919T004408Z(ond0c92177): the connect-cap fix is PROVEN LIVE, and the install died one layer further. PeerTube reached the index and resolved the plugin to@1.2.0— noETIMEDOUT, no 255 ms death — thenpnpm add …failedpnpm: command not found(exit 127). The reporter re-attached this ticket to #1277 on that red, which is right.The layers peeled on
deploy-videoso far, in order:09504f01— the oneshot masked its own install failured0c92177— Node's 250 ms happy-eyeballs cap vs ~350 ms to the index (GOTCHAS #260) — proven live by this runf48c2dee— PeerTube 8 installs with pnpm; the nixpkgs unit carries yarna3253331(#1620 lane) — pnpm's store/state in the read-only HOME (GOTCHAS #262)dd3cceaf— seccomp kills pnpm 11's by-pathchownwith SIGSYS (seen on #1620's run20260919T021605Z)3–5 are unproven live. #1620's drive (workstation, rented) is re-firing on HEAD now and reaches the video deploy ~45 min in — well before a brand-reach fire would (~85 min). To keep two drives and two healers from racing on the same leg and the same file, I am leaving #1277 parked behind this ticket until #1620's run gives the video-deploy verdict: green → I lift the edge again and brand-reach fires once on a HEAD known to deploy video; red → the next layer gets fixed once, in that lane.
Five layers deep on a deploy-time
pnpm addfrom a third-party index is itself evidence for defect 1's question (the plugin riding the Nix closure). Still Ben's.Ben RULED defect 1 (in session, 2026-09-19): move the plugin into the closure. Recorded as ADR 0257; landed
c92ca62f(GOTCHAS #264). Not yet proven live.What changed
openid-client,jose,oauth4webapi— fetched by the registry's own sha512 integrity and unpacked into ONE store path in the video module'slet. No npm, pnpm or lockfile.peertube-oidc-plugindoes what PeerTube 8.1.8's installer does, less the package manager (read offplugin-manager.ts): links the store path at<plugins>/node_modules/<name>, upserts the ONEpluginrow on the table's own unique(name, type)index (the newsletterspsqlprecedent), and restarts PeerTube once, only when its public/api/v1/configdoes not list the plugin at this version. It runs beforepeertube-adminandwants(neverrequires) PeerTube.peertube-oidckeeps the kanidm client + the settings PUT, ordered after it. Nothing in the module calls/plugins/installany more.Proven offline: the package builds with Nix from the rendered module; Node loads it through a symlink from the read-only store; the whole module evaluates as a NixOS config against the gateway's nixpkgs pin (PeerTube 8.1.8);
go test ./internal/clangreen.Unproven until a drive runs it: the first-install restart inside
switch-to-configuration, and PeerTube registering from a symlinked store path on the real box.Left in place on purpose: pnpm + its XDG homes +
NODE_OPTIONSstay on the PeerTube unit — PeerTube runspnpm rebuildin the same try-block as plugin registration whenever Node's ABI changes. ADR 0256 (EPERM) stands, but its motivating case is gone — whether to restore the stricter KILL is Ben's.I am lifting this ticket's edge off #1277 so brand-reach fires on
c92ca62f. This ticket closes on a greendeploy-video; if it reds there, the edge goes back and the evidence lands here.response_mode=form_post, which kanidm only tolerates by a remap it says WILL BE REMOVED — a future kanidm bump breaks video sign-in #1626PROVEN LIVE, twice, on two different kinds of box — closing.
20260919T035808Zonc92ca62f(local guest): GREEN 39/39, zero skips, ticket closed by the executor.deploy-videogreen in 174 s (it had been red on every fire since the sign-in half landed),video-healthy,video-wears-kit,remove-videoall green. Frames eyeballed: the control panel shows Video channel · HEALTHY · deployed on gateway, and the PeerTube door wears the community's name and logo.peertube-oidc-pluginran 74 s wall-clock on that box — the wait + one restart + registration path.20260919T042605Z(rented droplet) — reported by that lane: video deployed green,peertube-oidc-pluginlogged1.2.0 registered, and PeerTube's/api/v1/configlists the external auth.So both unknowns from the landing note are settled: the first-install restart works inside
switch-to-configuration, and PeerTube registers the plugin from a symlinked store path.What this ticket does NOT claim: that a person can sign in to video yet. #1620 found the next fault past the deploy — the plugin's default
signature-algorithmis RS256 and kanidm signs ES256 only — and is fixing it in its own lane (one settings line). And #1626 tracks a future break: the pinned 1.2.0 hardcodesresponse_mode=form_post, which kanidm tolerates only by a remap it says it will remove.Still open for Ben, recorded in ADR 0257: ADR 0256's EPERM was ruled so
pnpm addcould install this plugin; that case is gone. Restore KILL, or keep EPERM for operator-installed plugins?response_mode=form_post, which kanidm only tolerates by a remap it says WILL BE REMOVED — a future kanidm bump breaks video sign-in #1626