control panel: no way to re-apply a running service's settings after an update changes its render — fixes like #2030 never reach a running community #2034

Closed
opened 2026-10-01 04:32:13 +00:00 by ben · 4 comments
Owner

What

A steward has no way to re-apply a healthy service's settings from the control panel. When a fix changes what a port renders (its module in the config repo), a running community never receives it. Releases update the fleet software but never re-render a deployed port's module (#1881).

Hit on whakatohea-demo, 2026-10-01: #2030 (Paperless signs members straight in through the community sign-in) was installed in the control plane at 18:38 UTC, but the demo's Paperless kept its 29 September settings until I re-rendered paperless.nix by hand and switched. The panel's only "Redeploy" is the rescue ladder's rung, which appears only for a failing service.

The two routes a steward does have are both bad:

  • remove and re-add the service, which can take its data with it;
  • re-run the whole device setup, which re-renders and restarts every service and loses hand state inside containers (e.g. Omeka themes until #1970).

Ask (needs a design decision)

Either:

  1. a per-service Re-apply settings action on a running service's card: re-render that one port's module from the running control plane and switch, touching no other service; or
  2. the release lane re-renders every deployed port's module when the release changed its renderer, and shows the steward which services an update will restart.

Acceptance criteria (option 1)

  • A running service's card offers the action to stewards; it re-renders only that port's module and switches.
  • If the render is unchanged, the action says so and switches nothing.
  • The service's data is untouched; the card shows the deploy steps and health check like a first deploy.
  • Test: a renderer change reaches a running port's module through the action, and only that module changes.
## What A steward has no way to re-apply a healthy service's settings from the control panel. When a fix changes what a port renders (its module in the config repo), a running community never receives it. Releases update the fleet software but never re-render a deployed port's module (#1881). Hit on whakatohea-demo, 2026-10-01: #2030 (Paperless signs members straight in through the community sign-in) was installed in the control plane at 18:38 UTC, but the demo's Paperless kept its 29 September settings until I re-rendered `paperless.nix` by hand and switched. The panel's only "Redeploy" is the rescue ladder's rung, which appears only for a failing service. The two routes a steward does have are both bad: - remove and re-add the service, which can take its data with it; - re-run the whole device setup, which re-renders and restarts every service and loses hand state inside containers (e.g. Omeka themes until #1970). ## Ask (needs a design decision) Either: 1. a per-service **Re-apply settings** action on a running service's card: re-render that one port's module from the running control plane and switch, touching no other service; or 2. the release lane re-renders every deployed port's module when the release changed its renderer, and shows the steward which services an update will restart. ## Acceptance criteria (option 1) - [ ] A running service's card offers the action to stewards; it re-renders only that port's module and switches. - [ ] If the render is unchanged, the action says so and switches nothing. - [ ] The service's data is untouched; the card shows the deploy steps and health check like a first deploy. - [ ] Test: a renderer change reaches a running port's module through the action, and only that module changes.
Author
Owner

Ruling (Ben, 2026-10-01, in session): Option 2 with Option 1's button.

  1. Updates re-apply settings automatically. When a release changes a deployed service's render (its module in the config repo would differ from what's committed), the update re-renders that service's module and switches, in the community's update window, alongside the fleet software (consistent with ADR 0259's unattended restarts in the window). Only services whose render actually changed are touched.
  2. The steward sees it beforehand. The pending update names which services it will re-apply and restart.
  3. A "Re-apply settings" button on each running service's card lets a steward apply it now, outside the window. It re-renders only that service; if nothing changed it says so and switches nothing.

Constraints:

  • A re-apply never touches a service's data.
  • A re-apply overwrites hand changes made inside a container (e.g. Omeka themes and CSS until #1970). Land #1970 before (or with) the automatic half, or have the pending-update notice name the services whose hand state it will lose.
  • Record the ruling in an ADR (or amend ADR 0259), and update STATUS.md.

Needs a short design pass for the card button and the pending-update wording (wireframe), then tickets.

**Ruling (Ben, 2026-10-01, in session): Option 2 with Option 1's button.** 1. **Updates re-apply settings automatically.** When a release changes a deployed service's render (its module in the config repo would differ from what's committed), the update re-renders that service's module and switches, **in the community's update window**, alongside the fleet software (consistent with ADR 0259's unattended restarts in the window). Only services whose render actually changed are touched. 2. **The steward sees it beforehand.** The pending update names which services it will re-apply and restart. 3. **A "Re-apply settings" button** on each running service's card lets a steward apply it now, outside the window. It re-renders only that service; if nothing changed it says so and switches nothing. Constraints: - A re-apply never touches a service's data. - A re-apply overwrites hand changes made inside a container (e.g. Omeka themes and CSS until #1970). Land #1970 before (or with) the automatic half, or have the pending-update notice name the services whose hand state it will lose. - Record the ruling in an ADR (or amend ADR 0259), and update STATUS.md. Needs a short design pass for the card button and the pending-update wording (wireframe), then tickets.

swarm-claim host=matou-dev-server-01 run=37009
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=37009 (automated multi-host claim — lowest live claim id works this ticket)

Slice plan (agent, following Ben's ruling above). Shipping option 1 — the per-service "Re-apply settings" button — as this vertical slice, end to end: the backend re-render-one-port-and-switch engine (with the byte-identical no-op), the control-plane endpoint, and the P4-S5 Active card action backed by it; plus an ADR 0259 amendment recording the ruling and a STATUS update. The four acceptance criteria in the body are all option 1, so this closes the ticket's stated contract.

Design-tier accept (ADR 0174 — veto anytime). Amending the P4-S5 Active wireframe (docs/ux/wireframes/p4-provisioning/p4-s5-active.html) to add the data-action="reapply-settings" action on a healthy, render-bearing service card, and the "settings already current — nothing to re-apply" result wording. Two-way door: a wireframe edit, revertible by a later commit, proven by the dashboard unit test + the seam tests. Not on the one-way-door list (no security widening, no data touch — a re-apply never touches a service's data, and #1970/#1680's Omeka theme pinning has landed, so the hand-state constraint in the ruling is already met).

Split out as a follow-up: option 2's automatic half — the release lane re-rendering every deployed port module in the maintenance window (today #1881 re-renders only the gateway's own modules) and the pending-update notice naming which services it will re-apply/restart. That half needs its own wireframe pass (the pending-update wording) + spec, exactly as Ben's ruling notes ("a short design pass … then tickets"); filing it separately rather than overloading this slice.

**Slice plan (agent, following Ben's ruling above).** Shipping **option 1 — the per-service "Re-apply settings" button — as this vertical slice**, end to end: the backend re-render-one-port-and-switch engine (with the byte-identical no-op), the control-plane endpoint, and the P4-S5 Active card action backed by it; plus an ADR 0259 amendment recording the ruling and a STATUS update. The four acceptance criteria in the body are all option 1, so this closes the ticket's stated contract. **Design-tier accept (ADR 0174 — veto anytime).** Amending the P4-S5 Active wireframe (`docs/ux/wireframes/p4-provisioning/p4-s5-active.html`) to add the `data-action="reapply-settings"` action on a healthy, render-bearing service card, and the "settings already current — nothing to re-apply" result wording. Two-way door: a wireframe edit, revertible by a later commit, proven by the dashboard unit test + the seam tests. Not on the one-way-door list (no security widening, no data touch — a re-apply never touches a service's data, and #1970/#1680's Omeka theme pinning has landed, so the hand-state constraint in the ruling is already met). **Split out as a follow-up:** option 2's **automatic** half — the release lane re-rendering every deployed *port* module in the maintenance window (today #1881 re-renders only the gateway's own modules) and the pending-update notice naming which services it will re-apply/restart. That half needs its own wireframe pass (the pending-update wording) + spec, exactly as Ben's ruling notes ("a short design pass … then tickets"); filing it separately rather than overloading this slice.

close-report for #2034 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 2034,
  "status": "success",
  "commits": [
    "7373b2795e32b97a2f232fa2a4fcfe4c16971ef9"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/provisioning/ActiveScreen.vue",
    "dashboard/src/components/provisioning/SetupSurface.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/src/lib/provision.ts",
    "dashboard/tests/fakes/provision.ts",
    "dashboard/tests/unit/provisionReapply.test.ts",
    "docs/adr/0259-the-gateway-restarts-its-own-control-plane-to-finish-an-update-only-when-nothing-else-is-deploying.md",
    "docs/ux/wireframes/p4-provisioning/p4-s5-active.html",
    "internal/clan/testing/fake.go",
    "internal/controlapi/provision.go",
    "internal/controlapi/provision_reapply_integration_test.go",
    "internal/provision/deploy.go",
    "internal/provision/health.go",
    "internal/provision/reapply.go",
    "internal/provision/reapply_test.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./internal/provision/... ./internal/clan/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go test ./... (whole-repo, via the pre-push gate)",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/provision/... ./internal/controlapi/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/provision/... ./internal/controlapi/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "dashboard: vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/eslint . (repo TS lint gate)",
      "exit_code": 0
    },
    {
      "command": "dashboard: vitest run tests/unit/provisionReapply.test.ts tests/unit/provisionActive.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A running service's card offers the action to stewards; it re-renders only that port's module and switches": "P4-S5 ActiveScreen.vue adds data-action=\"reapply-settings\" on a healthy, reapplicable card -> emits reapply-service -> SetupSurface.onReapplyService -> source.reapplyService -> POST /provision/devices/{id}/services/{service}/reapply -> Orchestrator.ReapplyService re-renders only the named port via attachCatalogueServiceWith (deployServicesOnly forceReattach) then clan.Deploy switches the node. Proof: internal/provision/reapply_test.go TestReapplyService_ChangedRenderSwitchesOnlyThatModule (AttachPort called once for that service, no other service's module; node-scoped Deploy with RestartChanged); dashboard/tests/unit/provisionReapply.test.ts (card offers + emits)",
    "If the render is unchanged, the action says so and switches nothing": "deployServicesOnly short-circuits when run.Revision == the config tip (Config().Head) after the forced re-render -> run.ReapplyUnchanged, seed/deploy/health skipped, no clan.Deploy. Proof: TestReapplyService_UnchangedRenderSwitchesNothing (render attempted, zero deploys, ReapplyUnchanged); provision_reapply_integration_test.go unchanged path; provisionReapply.test.ts shows the 'nothing to re-apply' note and no deploy screen",
    "The service's data is untouched; the card shows the deploy steps and health check like a first deploy": "ReapplyService calls no DetachPort/DetachFiles/RemoveNode — only a re-render + the node-scoped switch + healthGate; the run carries the same commit/seed/deploy/health steps a first deploy does. Proof: TestReapplyService_ChangedRenderSwitchesOnlyThatModule asserts zero detaches, run.Outcome active, and the deploy+health steps present",
    "Test: a renderer change reaches a running port's module through the action, and only that module changes": "internal/provision/reapply_test.go TestReapplyService_ChangedRenderSwitchesOnlyThatModule — the one port is re-rendered on AttachPort and switched, no sibling service module attach fired; the fake's AttachNoChange models the unchanged counter-case"
  },
  "summary": "A steward can Re-apply a running service's settings from the P4-S5 card: the control plane re-renders only that port's module and switches (no-op when unchanged, data untouched) — option 1 of Ben's #2034 ruling, with option 2 filed as #2035.",
  "unproven_by_seam": "The seam tests use the fake clan (AttachNoChange models the byte-identical no-op); they do not exercise a real config-repo git-clean re-render on a live community nor the actual clan machines update switch — the live leg that pins #2030 reaching whakatohea-demo's Paperless through this action is outstanding.",
  "blockers": []
}
**close-report** for #2034 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 2034, "status": "success", "commits": [ "7373b2795e32b97a2f232fa2a4fcfe4c16971ef9" ], "changed_files": [ "STATUS.md", "dashboard/src/components/provisioning/ActiveScreen.vue", "dashboard/src/components/provisioning/SetupSurface.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/provisionClient.ts", "dashboard/src/lib/provision.ts", "dashboard/tests/fakes/provision.ts", "dashboard/tests/unit/provisionReapply.test.ts", "docs/adr/0259-the-gateway-restarts-its-own-control-plane-to-finish-an-update-only-when-nothing-else-is-deploying.md", "docs/ux/wireframes/p4-provisioning/p4-s5-active.html", "internal/clan/testing/fake.go", "internal/controlapi/provision.go", "internal/controlapi/provision_reapply_integration_test.go", "internal/provision/deploy.go", "internal/provision/health.go", "internal/provision/reapply.go", "internal/provision/reapply_test.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./internal/provision/... ./internal/clan/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "go test ./... (whole-repo, via the pre-push gate)", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/provision/... ./internal/controlapi/... ./internal/clan/...", "exit_code": 0 }, { "command": "golangci-lint run ./internal/provision/... ./internal/controlapi/... ./internal/clan/...", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "dashboard: vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "node_modules/.bin/eslint . (repo TS lint gate)", "exit_code": 0 }, { "command": "dashboard: vitest run tests/unit/provisionReapply.test.ts tests/unit/provisionActive.test.ts", "exit_code": 0 } ], "criteria": { "A running service's card offers the action to stewards; it re-renders only that port's module and switches": "P4-S5 ActiveScreen.vue adds data-action=\"reapply-settings\" on a healthy, reapplicable card -> emits reapply-service -> SetupSurface.onReapplyService -> source.reapplyService -> POST /provision/devices/{id}/services/{service}/reapply -> Orchestrator.ReapplyService re-renders only the named port via attachCatalogueServiceWith (deployServicesOnly forceReattach) then clan.Deploy switches the node. Proof: internal/provision/reapply_test.go TestReapplyService_ChangedRenderSwitchesOnlyThatModule (AttachPort called once for that service, no other service's module; node-scoped Deploy with RestartChanged); dashboard/tests/unit/provisionReapply.test.ts (card offers + emits)", "If the render is unchanged, the action says so and switches nothing": "deployServicesOnly short-circuits when run.Revision == the config tip (Config().Head) after the forced re-render -> run.ReapplyUnchanged, seed/deploy/health skipped, no clan.Deploy. Proof: TestReapplyService_UnchangedRenderSwitchesNothing (render attempted, zero deploys, ReapplyUnchanged); provision_reapply_integration_test.go unchanged path; provisionReapply.test.ts shows the 'nothing to re-apply' note and no deploy screen", "The service's data is untouched; the card shows the deploy steps and health check like a first deploy": "ReapplyService calls no DetachPort/DetachFiles/RemoveNode — only a re-render + the node-scoped switch + healthGate; the run carries the same commit/seed/deploy/health steps a first deploy does. Proof: TestReapplyService_ChangedRenderSwitchesOnlyThatModule asserts zero detaches, run.Outcome active, and the deploy+health steps present", "Test: a renderer change reaches a running port's module through the action, and only that module changes": "internal/provision/reapply_test.go TestReapplyService_ChangedRenderSwitchesOnlyThatModule — the one port is re-rendered on AttachPort and switched, no sibling service module attach fired; the fake's AttachNoChange models the unchanged counter-case" }, "summary": "A steward can Re-apply a running service's settings from the P4-S5 card: the control plane re-renders only that port's module and switches (no-op when unchanged, data untouched) — option 1 of Ben's #2034 ruling, with option 2 filed as #2035.", "unproven_by_seam": "The seam tests use the fake clan (AttachNoChange models the byte-identical no-op); they do not exercise a real config-repo git-clean re-render on a live community nor the actual clan machines update switch — the live leg that pins #2030 reaching whakatohea-demo's Paperless through this action is outstanding.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#2034
No description provided.