standing gateway: a render-affecting internal/clan change never lands durably on an already-standing community (re-supply does not re-render the gateway closure; rented scope is un-baselined) #1275
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#1275
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?
Split off from #1222 (which fixed the specific rehearsal-e residue).
The gap: a render-affecting change under
internal/clan/that changes the gateway's own NixOS closure (e.g. #1214's netbird management/relay env) never lands durably on an already-standing community, because:oc_standing_staleness(scripts/lib/rehearsal-standing-lib.sh) counts "rendered-config drift" only overOC_STANDING_CONFIG_PATHS=drvpath-baseline.txt nix/ flake.nix flake.lock. A netbird.go edit is an agent path, so it scores as binary-only → verdict re-supply. And the rented gateway scope can't be drvpath-baselined at all (it mints fresh random secrets every eval), so the baseline can never catch it either.oc_standing_resupplylands binaries (agent, control-plane, dashboard) + restarts units — it does not re-run the netbird/gateway render. Only founding's "bake takeover-ready config" writesgateway-guest.nix, and no routine op re-bakes it.gateway-guest.nixcomes from the gateway image (last built ~2026-08-31, pre-#1214), so every fresh founding also starts with the old netbird render (repaired live by the /run drop-in) until the image is rebuilt.Consequence: GOTCHAS #92 (derivable != deployed) recurs for the next gateway-closure change. On rehearsal-e it was masked because the box hadn't rebooted; the live repair rides tmpfs
/run.Candidate fixes (a ruling, needs triage):
internal/clanedits by path alone; would need the render code under its own path or an explicit render-fingerprint that the rented scope can commit.Found as a #1222 follow-up; not blocking (the live repair holds until a reboot, and #1222 baked rehearsal-e durably).
Ruled by agent under ADR 0174 — veto anytime
Category:
bug(a durability hole in the standing-community mechanism: a render-affecting gateway-closure change silently regresses on the next reboot — GOTCHAS #92 recurs). State:ready-for-agent.The ruling: take (B), reject (A), and leave (C) to its own rail
The issue asks for a ruling among three candidate fixes. The choice is a two-way door: it's a revertible commit, provable by an existing standing-drive reboot probe (the exact probe #1222 used —
systemctl cat netbird-managementmust show the geolocation env in the unit file, not a/rundrop-in), and it is not on the one-way-door list (no personal credentials, no security-posture widening — landing an already-merged render durably is not a new posture decision — no member-facing trust accept, no data destruction, no non-routine spend). So it's ruled here rather than parked on the human.(B) — give
oc_standing_resupplya re-render + in-place switch step. This is the durable fix and it fits the machinery already in place:internal/clan/change (e.g.netbird.go) is an agent path, sooc_standing_stalenessalready scores it agent-only → verdict resupply (scripts/lib/rehearsal-standing-lib.sh:150-154). The routing is already correct; the hole is purely in the remediation.oc_standing_resupplytoday lands only binaries over SSH (:266-290) and never touches the gateway's own NixOS closure. Adding a "re-render the gateway's own closure + switch it in place" step productises exactly what #1222 did by hand and lands the change durably.(A) — teach the gate to force a re-found — rejected. The issue itself flags it as infeasible:
netbird.gocan't be told apart from non-renderinternal/clanedits by path alone, and the rented scope can't be drvpath-baselined at all. It also forces the heavy hammer (tear-down + fresh rental) for drift re-supply was built to absorb. B makes it unnecessary.(C) — rebuild the gateway image — complementary, not this ticket. C only helps fresh foundings (bake the current render), which is not the case this issue is about (an already-standing community). Fresh-founding staleness of the baked render is the #661 auto-rebuild / snapshot rail's job and rides
snapshot-pending, not this fix. Worth a one-line follow-up if the current image is confirmed pre-#1214, but it does not block or belong to B.Why it's provably reversible: if B misbehaves,
git revertthe lib change; the standing drive re-founds on a red re-supply exactly as it does today (the existingreturn 1 → fall back to the re-foundguards,:299-301, are untouched in spirit). Ben's veto is async.Agent brief — productise re-render + in-place gateway-closure switch into re-supply
Goal. After
oc_standing_resupplylands the current binaries, re-render the standing gateway's own NixOS closure and switch it in place, so a render-affectinginternal/clan/change (thenetbird.goclass) lands durably on an already-standing community instead of riding a reboot-fragile/rundrop-in.Where it lives.
scripts/lib/rehearsal-standing-lib.sh—oc_standing_resupply(:228-308) is the insertion point. The new step goes after the binary landings and before the control-plane health-gate (:292-301), so a failed switch falls back to the re-found exactly like a failed binary landing (reuse thestep/return 1pattern at:258-264).internal/clan/enrollment.go:503-568(enrollment.go:522), which writes the gateway closure (netbird module included). The task is to invoke that render for the standing host's captured facts and apply it (nixos-rebuild switch, or the switch mechanism the founding path already uses) on the live gateway over the existing rent-operator SSH identity (:250-251).Acceptance (the existing probe). On a standing-community drive whose base carries a gateway-closure render change ahead of the founding SHA: after the drive's re-supply,
systemctl cat netbird-managementon the gateway showsNB_DISABLE_GEOLOCATIONin the unit file (not a/rundrop-in) and the relay carries its metrics port natively; the setting survives a gateway reboot. Remove any stale/rundrop-ins as part of the switch.Guardrails.
:298-301): if the switch fails or the control plane doesn't come back active withinOC_STANDING_RESUPPLY_WAIT,return 1and let the caller re-found — never advancefounding_shaon a half-applied switch.oc_standing_resupplyheader comment and the relevant ADR 0208 note: re-supply now also re-renders the gateway's own closure, so ruling 3a's "binary swap in place" is no longer the whole story.scripts/lib/**— not adeploy-pending/snapshot-pendingtree. (The complementary C image rebuild would besnapshot-pending; that's out of scope here.)STATUS.mdand, if the render-durability hazard is newly closed,docs/GOTCHAS.md(the #92 "derivable != deployed" entry) in the same commit.Not blocking (the #1222 live repair holds rehearsal-e until its next reboot), but this closes the recurrence for the next gateway-closure change.
swarm-claim host=matou-dev-server-01 run=18924
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1275 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope