feat(config): contract to carry dashboard config writes across the UI/daemon boundary #1390

Closed
opened 2026-10-27 13:40:12 +00:00 by sam · 0 comments
Owner

The dashboard's three write routes (PATCH /api/config, POST /api/config/reset,
PATCH /api/config/repos/{owner}/{name}) answer 503 in production because
Server.UpdateConfig, ResetConfig and UpdateRepoField are set only in
internal/webui's own tests. ConfigView.Editable is therefore permanently false
and the SPA hides the controls.

This is a descoped feature, not dead code. The policy behind those routes was
built, tested and deleted in e037b95 (2026-09-10) when the dashboard moved to
the archie-ui process; migration-decisions "Dashboard configuration page"
descoped the writes for Phase 3 and says to revisit when dashboard editing is
picked up as a feature (archie-core-1786637498420-327, GitHub #348). Picking it
up is that bead; this one is the contract that lets it cross the process
boundary.

Constraint from the ratified boundary (docs/prds/ui-service-boundary.md,
"Configuration ownership"): the UI process must never implement the policy by
holding or mutating a shared config.Holder. The daemon stays the configuration
owner. So the UI's UpdateConfig/ResetConfig/UpdateRepoField become remote
callbacks wired to a client, and the func-field shape on webui.Server is
already exactly right for that -- nothing in internal/webui has to change.

Open decision, and the reason this is a design bead rather than a diff: what
carries the write. The register rejected a config admin service on archied on
the grounds that the daemon is purely a gRPC client today (grpc.NewServer
appears only in RunGateway and RunStateStore), and that reasoning has not
changed. Candidates:
a. State Store RPCs, symmetric with the PutConfigSnapshot/GetConfigSnapshot
pair that already carries the read. Costs no new listener, port or token,
but puts daemon-local policy behind the State Store's interceptor and
makes the State Store a proxy for a subsystem it does not own.
b. archied becomes a gRPC server for a narrow ConfigAdmin service. Honest
ownership, at the cost of the daemon's first listener, its own token and
interceptor, and deployment wiring.
c. The Configuration Service the decomposition already anticipates. Correct
end state, largest scope.

Deliverable: a decisive 1-page design doc choosing one, landed in docs/prds/
per CLAUDE.md scope discipline (this is an open decision in
migration-decisions, so design comes before code), then the implementation:
revive the policy from e037b95^ on the daemon side, wire the chosen transport,
set Editable from the wired update path, and unhide the SPA controls.

Note the read half already works and is the parity target: the daemon
republishes the ConfigView snapshot on boot and after every reload
(publishConfigSnapshot), so a successful write must republish too or the page
shows the operator their own edit missing.

Close reason

Closed


Imported from beads archie-core-j28m · GitHub #810 · type task · priority P2 · created 2026-09-11 · closed 2026-09-20

The dashboard's three write routes (PATCH /api/config, POST /api/config/reset, PATCH /api/config/repos/{owner}/{name}) answer 503 in production because Server.UpdateConfig, ResetConfig and UpdateRepoField are set only in internal/webui's own tests. ConfigView.Editable is therefore permanently false and the SPA hides the controls. This is a descoped feature, not dead code. The policy behind those routes was built, tested and deleted in e037b95 (2026-09-10) when the dashboard moved to the archie-ui process; migration-decisions "Dashboard configuration page" descoped the writes for Phase 3 and says to revisit when dashboard editing is picked up as a feature (archie-core-1786637498420-327, GitHub #348). Picking it up is that bead; this one is the contract that lets it cross the process boundary. Constraint from the ratified boundary (docs/prds/ui-service-boundary.md, "Configuration ownership"): the UI process must never implement the policy by holding or mutating a shared config.Holder. The daemon stays the configuration owner. So the UI's UpdateConfig/ResetConfig/UpdateRepoField become remote callbacks wired to a client, and the func-field shape on webui.Server is already exactly right for that -- nothing in internal/webui has to change. Open decision, and the reason this is a design bead rather than a diff: what carries the write. The register rejected a config admin service on archied on the grounds that the daemon is purely a gRPC client today (grpc.NewServer appears only in RunGateway and RunStateStore), and that reasoning has not changed. Candidates: a. State Store RPCs, symmetric with the PutConfigSnapshot/GetConfigSnapshot pair that already carries the read. Costs no new listener, port or token, but puts daemon-local policy behind the State Store's interceptor and makes the State Store a proxy for a subsystem it does not own. b. archied becomes a gRPC server for a narrow ConfigAdmin service. Honest ownership, at the cost of the daemon's first listener, its own token and interceptor, and deployment wiring. c. The Configuration Service the decomposition already anticipates. Correct end state, largest scope. Deliverable: a decisive 1-page design doc choosing one, landed in docs/prds/ per CLAUDE.md scope discipline (this is an open decision in migration-decisions, so design comes before code), then the implementation: revive the policy from e037b95^ on the daemon side, wire the chosen transport, set Editable from the wired update path, and unhide the SPA controls. Note the read half already works and is the parity target: the daemon republishes the ConfigView snapshot on boot and after every reload (publishConfigSnapshot), so a successful write must republish too or the page shows the operator their own edit missing. ### Close reason Closed --- _Imported from beads `archie-core-j28m` · GitHub #810 · type task · priority P2 · created 2026-09-11 · closed 2026-09-20_
sam added the mediumtask labels 2026-10-27 13:40:12 +00:00
sam self-assigned this 2026-10-27 13:40:12 +00:00
sam closed this issue 2026-10-27 13:40:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1390