feat(webui): show which process is running which settings version

The settings page now reads apply status beside each resource: every known
process with the version it applied, its error if it rejected the edit, and
whether it is still reporting at all. It re-reads after each save, so the page
reflects what the processes did with an edit rather than what was stored.

The server derives liveness only, because it knows whether a record went stale
but not which version the page is showing. The client compares against the
resource it is rendering, which is what turns a live record on an older
version into a pending restart.

A process that stopped re-stamping and one that never reported are separate
rows with separate wording, and neither is an error: the setting may be fine
and the process simply absent, which an operator acts on differently. A failed
apply-status read leaves the previous rows rather than taking the settings
page down with it.

state-store-contract.md gains the pair in its inventory and its count moves
from 45 to 47, with the note that this read is a list rather than the
config-snapshot pair's found=false singleton.

Closes archie-core-pskb.
This commit is contained in:
sam committed 2026-09-21 15:57:46 +10:00
1 parent 48367151f3
commit dcdaa9f451
10 files changed
+358 -5

No files matched your search

+12 -2
View File
@@ -262,9 +262,10 @@ Methods are named after the store methods so the mapping is unambiguous. `workfl
| Dispatch | `ArmedBindingsForSource`, `RecordDispatch`, `ListUndispatchedCaptures` |
| BindingTaskCreator | `EnqueueBindingTask` |
| Config snapshot | `PutConfigSnapshot`, `GetConfigSnapshot` |
| Apply status | `PutApplyStatus`, `ListApplyStatus` |
| Task log | `ReadTaskLog`, `StreamTaskLogContent` |
That is **45 unique contract RPCs** across one service (the `TaskEvents.Close` method is dropped).
That is **47 unique contract RPCs** across one service (the `TaskEvents.Close` method is dropped).
`Close()` is **excluded** from the wire (it is server lifecycle, not a client call) — see §11.
The config-snapshot pair was added by `archie-core-ymut` (see
@@ -275,6 +276,15 @@ neither. `ConfigSnapshot.document` is opaque to this contract — the store neit
validates it, and `schema` names the projection so a reader can refuse a shape it does not
understand.
The apply-status pair was added by `archie-core-pskb` (see
`docs/prds/control-plane-apply-status.md`). It is administrative for the same reason as the
config-snapshot pair, and deny-by-default in `authorizesTaskScopedCall` covers it without a
new rule. Unlike that pair, the read is a list: `ListApplyStatus` returns every process's
record and an empty slice means nothing has reported yet, so the `found=false` convention for
absent single rows does not apply. The rows are keyed on `(process, kind)` and replaced in
place, because each process re-stamps its record on an interval and no reader wants a history
of re-stamps.
The task-log pair was added by `archie-core-iaqx` (see `docs/prds/ui-service-boundary.md`'s
route inventory). It is the one surface whose payload is not a row: the store service reads
them out of the state directory it owns with `internal/logging`'s own reader, so the wire
@@ -664,7 +674,7 @@ an explicit operator decision.
(`workflow.Store` + `workflow.Task`/`Status`/`Source`, per dependency rules #2 and #7);
daemon/webui store surfaces stay **producer-owned** in `internal/store`. `store.WorkflowStore`
is superseded by `workflow.Store`.
- **One `StateStore` gRPC service** (45 contract RPCs, grouped by contract) + narrow Go consumer facades
- **One `StateStore` gRPC service** (47 contract RPCs, grouped by contract) + narrow Go consumer facades
(≤8) on `staterpc.Client` — mirrors the single-`ChatService` precedent.
- **Domain type relocation** (`Task`/`Status`/`Source` → `internal/domain/workflow`) is a
Phase 2 prerequisite, pulled forward from migration-decisions §4 (minimal bound,