Provisioning deploy writes phantom clan-core inventory instances for render-shipping services — one selected docs-editing breaks the whole machine's eval #428

Closed
opened 2026-08-11 06:04:19 +00:00 by ben · 1 comment
Owner

Defect (live repro, Tairea Anau manual drive 2026-08-11)

Deploying Files & documents + Docs editing to the gateway committed attach files (Nextcloud) module (real render, fine) and then attach service docs-editing to gateway as gateway — a clan-core inventory instance naming a module that does not exist:

error: flake input 'clan-core' doesn't provide clan-module with name 'docs-editing'.

That phantom instance breaks evaluation of the entire gateway machine, so nothing deploys — not even the services whose renders are real. Redeploying with only Files selected still fails, because the phantom placement is already committed in the config repo.

Cause

attachCatalogueService (internal/provision/deploy.go:412) routes a service through its real render only when shipsOwnRender says so — and shipsOwnRender (deploy.go:483) returns true only for files. Every other catalogue service falls through to Config().AttachService, the phantom path — exactly the silent lie #351 AC3 outlawed for files.

Meanwhile the renders already exist on the clan seam for every catalogue service: files_attach.go, mail_attach.go, staticsites_attach.go, meetings_attach.go, docsediting_attach.go, chat_attach.go, code_attach.go. AttachDocsEditing even documents its orchestrator join (WOPI pairing: both-placed re-runs AttachFiles with FilesLiveSet.DocsEditing set). Nothing calls them from provisioning.

Fix

  1. Route every render-shipping catalogue service through its real Attach* in attachCatalogueService (docs-editing first — it must also complete the WOPI pair per docsediting_attach.go's contract; the orchestrator holds both live sets).
  2. Until a service's render is routed, it must not be offerable in P4-S2 at all (Ben's ruling, this drive): a selectable service that can only deploy as a phantom is a selectable lie (ADR 0100).

Acceptance

  • Selecting Files + Docs editing on the gateway deploys both: files.nix + docs-editing.nix land, config evaluates, clan machines update actually switches the node, health checks run against deployed services.
  • The richdocuments/WOPI pair completes (files render re-run with DocsEditing set).
  • No code path writes an inventory instance whose module name is not provided by clan-core (regression test at the seam).
  • P4-S2 offers exactly the services provisioning can really deploy.

Sibling: the silent-success masking defect is filed separately (deploy reports success when eval preflight skipped every node).

## Defect (live repro, Tairea Anau manual drive 2026-08-11) Deploying **Files & documents + Docs editing** to the gateway committed `attach files (Nextcloud) module` (real render, fine) and then `attach service docs-editing to gateway as gateway` — a clan-core **inventory instance naming a module that does not exist**: ``` error: flake input 'clan-core' doesn't provide clan-module with name 'docs-editing'. ``` That phantom instance breaks evaluation of the **entire gateway machine**, so nothing deploys — not even the services whose renders are real. Redeploying with only Files selected still fails, because the phantom placement is already committed in the config repo. ## Cause `attachCatalogueService` (`internal/provision/deploy.go:412`) routes a service through its real render only when `shipsOwnRender` says so — and `shipsOwnRender` (`deploy.go:483`) returns true **only for files**. Every other catalogue service falls through to `Config().AttachService`, the phantom path — exactly the silent lie #351 AC3 outlawed for files. Meanwhile the renders **already exist on the clan seam** for every catalogue service: `files_attach.go`, `mail_attach.go`, `staticsites_attach.go`, `meetings_attach.go`, `docsediting_attach.go`, `chat_attach.go`, `code_attach.go`. `AttachDocsEditing` even documents its orchestrator join (WOPI pairing: both-placed re-runs `AttachFiles` with `FilesLiveSet.DocsEditing` set). Nothing calls them from provisioning. ## Fix 1. Route every render-shipping catalogue service through its real `Attach*` in `attachCatalogueService` (docs-editing first — it must also complete the WOPI pair per `docsediting_attach.go`'s contract; the orchestrator holds both live sets). 2. Until a service's render is routed, it must not be offerable in P4-S2 at all (Ben's ruling, this drive): a selectable service that can only deploy as a phantom is a selectable lie (ADR 0100). ## Acceptance - Selecting Files + Docs editing on the gateway deploys both: `files.nix` + `docs-editing.nix` land, config **evaluates**, `clan machines update` actually switches the node, health checks run against deployed services. - The richdocuments/WOPI pair completes (files render re-run with `DocsEditing` set). - No code path writes an inventory instance whose module name is not provided by clan-core (regression test at the seam). - P4-S2 offers exactly the services provisioning can really deploy. Sibling: the silent-success masking defect is filed separately (deploy reports success when eval preflight skipped every node).
Author
Owner

Fixed in 43d1843 (on origin/main).

attachCatalogueService is now a routing switch: files → AttachFiles, docs-editing → AttachDocsEditing (its render existed since #226 but was called by nothing). The WOPI pair completes whichever side attaches second (#413) — the node's final desired service set is threaded in, so docs-editing beside files re-runs AttachFiles with FilesLiveSet.DocsEditing set. docs-editing.nix was added to knownGatewayModuleFiles so ComposeGatewayCohost imports it (recomposed AFTER the module is written) — config evaluates, never a phantom clan-core instance.

Ben's ruling (fix point 2) implemented: a render-shipping service provisioning does not yet route (mail / chat / code / meetings / static-sites) is gated out of P4-S2 (provisionCannotDeploy — shown but not selectable, "not ready to set up here yet"). files + docs-editing are offered; the rest are the sibling frontier (each needs its secret live set + apex-in-test assembled).

Acceptance:

  • ✅ Selecting Files + Docs editing on the gateway routes both real renders (files.nix + docs-editing.nix land, both imported into the gateway entry module, config evaluates) — TestDeploy_DocsEditingDrivesTheRealRenderNotAPhantomInventory, TestComposeGatewayCohost_ImportsTheLandedDocsEditingBesideFiles.
  • ✅ The richdocuments/WOPI pair completes (files render re-run with DocsEditing set).
  • ✅ No code path writes an inventory instance for docs-editing — regression test at the seam asserts no attach-service docs-editing edit; AttachDocsEditing with no apex is refused, never fabricated.
  • ✅ P4-S2 offers exactly the services provisioning can really deploy — TestForRole_GatewayOffersExactlyTheServicesProvisioningCanDeploy.

Deferred follow-ups (noted in STATUS.md / GOTCHAS #14): docs-editing's coolwsd admin-console clan-var secret (WOPI editing works without it); the browser-side edit-a-document leg + docs-editing's own front-door route (the noted e2e follow-up); routing mail/chat/code/meetings/static-sites to their real renders (each exists on the clan seam).

Full suite green (52 packages), pre-push go-ci gate passed.

Fixed in 43d1843 (on origin/main). `attachCatalogueService` is now a routing switch: **files → `AttachFiles`, docs-editing → `AttachDocsEditing`** (its render existed since #226 but was called by nothing). The WOPI pair completes whichever side attaches second (#413) — the node's final desired service set is threaded in, so docs-editing beside files re-runs `AttachFiles` with `FilesLiveSet.DocsEditing` set. `docs-editing.nix` was added to `knownGatewayModuleFiles` so `ComposeGatewayCohost` imports it (recomposed AFTER the module is written) — config evaluates, never a phantom clan-core instance. **Ben's ruling (fix point 2) implemented:** a render-shipping service provisioning does not yet route (mail / chat / code / meetings / static-sites) is gated out of P4-S2 (`provisionCannotDeploy` — shown but not selectable, "not ready to set up here yet"). files + docs-editing are offered; the rest are the sibling frontier (each needs its secret live set + apex-in-test assembled). **Acceptance:** - ✅ Selecting Files + Docs editing on the gateway routes both real renders (files.nix + docs-editing.nix land, both imported into the gateway entry module, config evaluates) — `TestDeploy_DocsEditingDrivesTheRealRenderNotAPhantomInventory`, `TestComposeGatewayCohost_ImportsTheLandedDocsEditingBesideFiles`. - ✅ The richdocuments/WOPI pair completes (files render re-run with `DocsEditing` set). - ✅ No code path writes an inventory instance for docs-editing — regression test at the seam asserts no `attach-service docs-editing` edit; `AttachDocsEditing` with no apex is refused, never fabricated. - ✅ P4-S2 offers exactly the services provisioning can really deploy — `TestForRole_GatewayOffersExactlyTheServicesProvisioningCanDeploy`. **Deferred follow-ups (noted in STATUS.md / GOTCHAS #14):** docs-editing's coolwsd admin-console clan-var secret (WOPI editing works without it); the browser-side edit-a-document leg + docs-editing's own front-door route (the noted e2e follow-up); routing mail/chat/code/meetings/static-sites to their real renders (each exists on the clan seam). Full suite green (52 packages), pre-push go-ci gate passed.
ben closed this issue 2026-08-11 07:00:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#428
No description provided.