catalogue: files-port — Nextcloud's full three-part port: module, reconciler, themed for real #220
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
Depends on
Reference
Matou/idss#220
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?
Parent
Provisioning spec #17 (the catalogue's first real service) + ADR 0062 (a catalogue port ships three parts). Contract-gap sweep 2026-07-30, filed on Ben's request.
What's true today
files/Nextcloud is the closest-to-real catalogue service and still ships only two fragments of its contract: a health check (/status.php, #204) and the member-orbit reconciler port over a hand-set URL (OURCLOUD_NEXTCLOUD_URL, #213). There is no NixOS module that deploys Nextcloud —AttachServicerecords the instance in the config repo, and the clan render layer renders inventory and takeover network/disk config, never a service module.nextcloud-theming.confis compiled and committed on every brand apply and consumed by nothing (grep hits onlyinternal/brandkit/surface.go) — matching the theming seam's accepted strain: "coverage says 'applied', not 'the service demonstrably shows it'". DDR 0007 promises Nextcloud strong fidelity.What to build
The full ADR 0062 contract for
files:filesis assigned, rendered through the clan adapter's templating layer (ADR 0102).nextcloud-theming.confreaches the running instance so the login and skin carry the community's kit — coverage's "applied" becomes demonstrably true.OURCLOUD_NEXTCLOUD_URLstops being hand-set: derived from the one hostname authority once a node holdsfiles.Part 3 (the health check) already exists — it becomes the gate this deploy actually passes.
Acceptance criteria
filesin the whole composition, When the deploy completes, Then Nextcloud serves, its real health check passes, and only then does it activate and publishTask manifest
Blocks
Likely the real evidence for #183 leg B·3 (branded Nextcloud login) — left unlinked for Ben to judge on his closeout.
Landed in
b879e08onorigin/main.The files port's remaining ADR 0062 parts are built, mirroring the front-door port's render/attach shape (#219 render + #251 attach):
internal/clan/files.go,RenderFiles(FilesConfig)): the files node'sfiles.nixthrough the clan adapter's templating layer (ADR 0102 §4) —services.nextcloudon its ruled host behind https, admin identity + DB password on clan-var paths (the secret never lands in the store), and the declarative Postgres backing store. This node opens no public port; the front door fronts it over the mesh (ADR 0074).nextcloud-theming.conf, until now committed on every brand apply and read by nothing, now reaches the running instance through anextcloud-brandoneshot that applies each theming key viaocc theming:config. The conf is a Nix path literal +restartTrigger, so a brand re-apply rewrites its bytes → its store hash changes → the oneshot re-runs and re-themes the live login/skin without restarting Nextcloud (occ is a live change).lib.mkIf (builtins.pathExists …)omits it honestly with no applied kit.internal/nextcloud) keeps owning runtime people over the OCS API and never reprovisions them (ADR 0105).internal/clan/files_attach.go,(*Adapter).AttachFiles): derives the ruled host from the one hostname authority (hostnames.Service(apex,"files")→files.<apex>, ADR 0113) and writes the module intomachines/<node>/under the single writer — node-only, deterministic, idempotent (byte-identical re-render → no churn); a missing apex is refused, never fabricated.OURCLOUD_NEXTCLOUD_URLretired): the whole composition deriveshttps://files.<apex>once through the authority and shares it across the deploy-time/status.phphealth check and the reconciler port, so all three parts drive the same instance through one URL. Absent an apex the files service rests (ADR 0100).Part 3 (the health check, #204) is unchanged — it becomes the gate this deploy passes.
Evidence: seam tests at the clan seam over a real single-writer repo + a fake live set —
internal/clan/files_test.go(6 render checks: daemon on ruled host, secrets via clan vars, backing store w/o runtime people, theming consumed onto the running instance + re-theme trigger, determinism, package default/override) andinternal/clan/files_attach_test.go(4 attach checks: derived host, missing-apex refused, node-only write, idempotency); plus the composition derivation seam incontrol-plane/cmd/control-plane/offboard_catalogue_test.go.go build/vet/test+golangci-lint run ./...green undernix develop .#go-ci. STATUS.md updated.Acceptance mapping:
/status.phppass.occ theming:configconsumption + path-literal restart trigger.files.<apex>shared by module hostName, health check, and reconciler base.Follow-up (deferred, not this slice): the manifest's live clan-lab smoke ("assign files → deploy → health-pass → branded login" on a real 3-node lab) needs this landed module wired into provisioning's deploy path plus a
smoke-*harness — deferred exactly as #251 deferred the front-door wildcard smoke (a separate smoke slice, per the engine-adapters "smokes are slices, not CI" ruling). This render/attach/wiring slice is the offline seam-tested substrate that smoke would then prove on hardware. Left unlinked from #183 leg B·3 for Ben's closeout, as the ticket asked.