catalogue/provisioning: may the gateway co-host catalogue services? — the headroom decision no layer owns (Nextcloud-on-gateway) #352
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.
Depends on
Reference
Matou/idss#352
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?
RULED — DDR 0146 (commit
42d15c6), grilled 2026-08-09The gateway co-hosts by headroom. Six rulings:
Rolesstays ADR 0055's hint.assess.goreplaces the gateway node's role gate ("runs under the helper role") with the headroom gate — the seamcatalogue.go:14-17reserved.backup-copy, refused with the honest reason: a backup copy must live in a different failure domain than the data it copies.deviceReasonstyle. No soft-warning tier — "allowed but tight" lives in S3's LOAD line.p4-s2-select-role-and-services.html, plus the blast-radius line ("everything here shares the front door's machine").no-triageuntil the backups tier makes it real).ADR 0020 stands (services still chosen at provisioning, never founding).
03-fleet-topology.mdamended in the same commit (ADR 0042).Implementation scope (this ticket, now
ready-for-agent)internal/provision/assess.go: for the gateway node, replace the role gate with the headroom gate (formula above); new reason strings — numbers for breaches, the failure-domain line forbackup-copy.GatewayLiveSet(internal/clan/gateway_attach.go): add the Files slot (further slots ride each service's render landing).data-field="headroom"STEADY LOAD line, gated rows, blast-radius line.Blocked by #351 (native dependency): un-greying S2 before the live-set orchestrator lands would let a gateway files-deploy write the phantom
clan-coreinventory module and report success while nothing runs.The original question (for the record)
May the gateway co-host catalogue services — concretely, Nextcloud (
files) on the gateway machine? Ben's practical goal: once the private-path VM's control panel is reachable, provision Nextcloud without needing a second machine. The three blockers were:fileshelper-only + one role per node (catalogue.go:75-81,assess.go:259-260); no Files slot inGatewayLiveSet; and the "headroom decision" punt (catalogue.go:14-17) that no layer implemented. The tension: ADR 0020 /03-fleet-topology/ the founding-to-nextcloud prototype all placed services on other nodes, whilegateway_attach.go's own comment and the health-check wiring half-expected the one-machine community.Sibling: #351 wires provisioning's deploy to the real
Attach*renders.Grilled and ruled 2026-08-09 — DDR 0146
docs/adr/0146-design-the-gateway-cohosts-by-headroom.md, landed+pushed in42d15c6with the P4-S2 ✎ gateway frame and the03-fleet-topologyamendment. Body rewritten with the six rulings and implementation scope; flippedneeds-design→ready-for-agent, blocked by #351. (Renumbered from 0145 at commit time — the kanidm-brand session minted 0145 concurrently; 0140-collision precedent applied, next free is 0147.)Restored
ready-for-agent(the 06:34 automation had knocked it back toneeds-design; the design is done — DDR 0146). Dependency re-pointed: now blocked by #354 (gateway live-set assembly, #351's AC2 split per Ben's option-A ruling) instead of the closed #351 — same honesty rule: no un-greyed checkbox before the gateway assembly can actually land what it promises.Landed in
a8a3ab5(pushed toorigin/main, full pre-push gate green: Go + 985 dashboard tests).DDR 0146 implemented across the three surfaces it names, plus the honest deploy composition:
ForRole(internal/provision/assess.go) replaces the role gate with the headroom gate for a node holding the gateway role — admission by the largest single floor, steady-memory sum ≤ 80% of RAM, disk floors summed;backup-copyis the one principled failure-domain refusal. TheSelectioncarries aHeadroomSTEADY LOAD line + per-rowSteadyBytes; the catalogue is untouched. Tests: headroom gating, already-colocated sum, and the hypothetical-role guard (assess_test.go).GatewayLiveSetgrows aFilesslot, and a newComposeGatewayCohost(internal/clan/gateway_attach.go) re-imports every present gateway module intoconfiguration.nix(additive, idempotent, no founding-facts needed). On theclan.Claninterface + fake + resting composition. Tests: the Files-slot compose + the preserve/idempotency recompose (gateway_attach_test.go).attachCatalogueService(deploy.go) renders files.nix thenComposeGatewayCohostfor the gateway node — so a gateway files co-host is imported beside the front door, never a deploy that succeeds over dead text (the honesty rule the #351/#354 block protected). Test:deploy_test.go.SelectRoleServicesScreen.vue) — fixed role, the STEADY LOAD line that moves as services are ticked, headroom-gated rows, blast-radius line;MATAI_SELECTION_GATEWAYfixture +Headroom/steadyBytestypes. Test:provisionGatewayCohost.test.ts.Move-off stays #353.
STATUS.mdupdated in the same commit.