provision: the co-host files route is attached ONLY on the private path — own-VPS front door never learns files.<apex>, probes 0-byte forever (deploy.go:580, the #529 stale-flag class) #557
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.
Blocks
Reference
Matou/idss#557
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?
What breaks — the last standing cause of every public-path files-healthy red
Drive
20260815T014915Z(#556's per-probe logs live): all 36 warm-up probes across the full 360s budget returnedgot 0 B— not a warm-up race. The droplet harvest shows why, conclusively:127.0.0.1:8084(droplet-units.txt) — the Nextcloud module deployed fine,front-door.nixcarries no files route (only kanidm var-path mentions).https://files.<apex>/status.phpfalls through the wildcard vhost to an empty response: HTTP-with-0-byte-body, forever, no error logged anywhere. Exactly what #536 named "layer-3 silence" on drive 171114Z.Cause — one stale flag, the same class #529 already ruled on
internal/provision/deploy.go:580(co-host tail):The route attach is keyed on
privateFrontDoor. The own-VPS (public) gateway co-hosts Caddy just the same, so the route never lands there. This is IDENTICAL in shape to #529's nginx-loopback bug one function below, whose landed comment says verbatim: "keying the override off the private-path flag left nginx on :80…coHostedIS the true co-host detection." The route kept the stale key.Fix directed
coHosted, on BOTH paths: public live set = Gateway/Apex/IDPHost +Services: [{FilesSlug, NextcloudLoopbackTarget}],Privateonly when the private flag stands (the public render's route loop + forward_auth/exempt-path machinery already exists — renderRoute is shared; ADR 0150's ungated-files posture applies per path as today).ComposeGatewayCohost, so the switch carries the changed front-door config and restarts Caddy.files.<apex>handler proxying127.0.0.1:8084(assert on the rendered nix, both paths); plus pin that a co-host switch changes the caddy unit's config (the restart is what delivers the route).Why confidence is high
This explains the ENTIRE public files-healthy history in one stroke: #527 (exempt paths) and #529 (port) were real neighbors; #536's "silence" and tonight's 0-byte probes are the missing route itself. The private path never saw it because its deploy takes the
privateFrontDoorbranch. Every upstream tooth (finish/cert race, warm-up budget) is now proven fixed — this is the last gate before the door/branded-login/oidc-admin/branded-chrome legs.Frontier tooth of #492 (blocks it). Evidence:
test-results/drive-droplet/20260815T014915Z/(droplet-units.txt LISTEN table, droplet-caddy.txt absence-of-proxy, per-probe journal lines 02:0x, front-door.nix).swarm-claim host=elitebook-distributed-server-03 run=6565
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #557 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope
Blocked: needs a human ruling — the directed public-path fix would regress the founding front door
I picked this up (run 6564) and did the forensics. The directed fix — attach the files route on BOTH paths with the public live set
Gateway/Apex/IDPHost + Services: [{FilesSlug, NextcloudLoopbackTarget}]— cannot be implemented as written without regressing the public front door. A human ruling is needed on how the route should land.Why the literal fix regresses
AttachFrontDoorrewritesfront-door.nixwhole from the passed live set (its own doc: "rewrites the module WHOLE from the live set every run").renderPrivateFrontDoorreconstructs the entire door fromapex/IDPHost+ routes alone — it declares noservices.kanidm(the guest baseline owns it) and noforward_auth/gateURL (ungated, ADR 0150). So{Gateway, Apex, IDPHost, Private, Services}is complete.RenderFrontDoor(public branch) emitsrenderKanidmLoopback(needsKanidm.Port/CertPath/KeyPath), theforward_authgate (needsGateURL), and mail streams (needsMailProxy). The orchestrator holds none of these —provision.gocarries onlyapex/webPort/privateFrontDoor; the facts live as constants ininternal/founding(publicKanidmLoopbackPort/publicKanidmCertPath/publicKanidmKeyPath/publicGateURL,ownvpspath.go:225-228), used at founding, never threaded to the runtime deploy (confirmed:GatewayFacts/AttachGatewayare not referenced anywhere in the control-plane runtime orinternal/provision).So a partial public live set would rewrite
front-door.nixwithbindaddress = "127.0.0.1:0", emptytls_chain/tls_key, andforward_auth http://""— killing the IdP and every gated route, and dropping the mail TCP proxy if mail is co-hosted. That is a worse red than the missing-route it fixes.The existing seam test
TestDeploy_PublicGatewayFilesBindsLoopbackButAddsNoPrivateRoute(deploy_test.go:610) currently asserts the public path adds no front-door route — it was written deliberately, "route-on-deploy for the public front door is out of this arc's scope."The decision needed — how should the public route land?
internal/foundingreferences them), and have the deploy build the full public live set fromapex+ those + the files route. Smallest change, matches the whole-rewrite/idempotent philosophy, unblocks the public files route now. Caveat: a public gateway that also co-hosts mail would lose its mail proxy on re-render (the deploy doesn't know mail is placed) — I'd file that as an out-of-scope follow-up + GOTCHA.AttachFrontDoorto merge — read the existingfront-door.nix/ a persisted live set, add-or-replace only this service's route, preserve the rest. A clan-seam contract change, but robust to mail/other services.My recommendation: (A) for this ticket, with the mail-co-host gap filed as a follow-up — unless (B)/(C) is preferred.
I asked on Mattermost (thread
xkkuwjkbftbr3mnkxxm3u3djfo) but got no reply in 20 min, so I'm handing this back rather than guessing a judgement call. A late reply in that thread is not lost. Re-arm withready-for-agentonce a path is chosen.