feat(staterpc): carry the dashboard's configuration snapshot
archie-core-ymut decided the configuration page reads a projection the daemon publishes rather than reaching into a shared config.Holder. This is the carrier: a single-row store surface plus PutConfigSnapshot/GetConfigSnapshot, taking the contract to 42 RPCs. The document is opaque here. Its shape belongs to the daemon that builds it and the page that renders it, so the store neither parses nor validates it, and schema names the projection so a reader can refuse one it does not understand. It is secret-free where it is built: the projection carries an API key's environment variable name and whether it resolved, never a value. Both RPCs are administrative. authorizesTaskScopedCall is deny-by-default, so a container's task-scoped grant can neither rewrite what an operator reads nor read a projection of the deployment it runs inside; a test pins both. Nothing publishes or reads it yet -- the daemon's publisher and the UI's read path land with the rest of the cutover.
This commit is contained in:
1 parent
4cb912fb97
commit
d32196f664
16 files changed
+1012
-307
No files matched your search
@@ -201,7 +201,7 @@ recorded in [`ui-service-boundary.md`](ui-service-boundary.md).
|
||||
**RATIFIED (2026-09-06, beads archie-core-8cda.4.1).** The authoritative
|
||||
contract boundary & transport design for this is fixed in
|
||||
`docs/prds/state-store-contract.md` (rev. 2c): one `StateStore` gRPC service,
|
||||
40 RPCs; **ownership split** — consumer-owned `workflow.Store` +
|
||||
42 RPCs; **ownership split** — consumer-owned `workflow.Store` +
|
||||
`workflow.Task`/`Status`/`Source` in the workflow domain (dependency rules
|
||||
#2/#7), producer-owned daemon/webui store surfaces in `internal/store`;
|
||||
the `Task`/`Status`/`Source` + interface relocation is a Phase 2
|
||||
|
||||
@@ -248,10 +248,19 @@ Methods are named after the store methods so the mapping is unambiguous. `workfl
|
||||
| Binding | `InsertBinding`, `GetBinding`, `ListBindings`, `UpdateBinding`, `DeleteBinding`, `ApproveBinding` |
|
||||
| Dispatch | `ArmedBindingsForSource`, `RecordDispatch`, `ListUndispatchedCaptures` |
|
||||
| BindingTaskCreator | `EnqueueBindingTask` |
|
||||
| Config snapshot | `PutConfigSnapshot`, `GetConfigSnapshot` |
|
||||
|
||||
That is **40 unique RPCs** across one service (the `TaskEvents.Close` method is dropped).
|
||||
That is **42 unique 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
|
||||
`docs/architecture/migration-decisions.md`, "Dashboard configuration page"). It is the one
|
||||
surface whose writer is the daemon and whose reader is the UI process, and both RPCs are
|
||||
administrative: `authorizesTaskScopedCall` is deny-by-default, so a task-scoped grant reaches
|
||||
neither. `ConfigSnapshot.document` is opaque to this contract — the store neither parses nor
|
||||
validates it, and `schema` names the projection so a reader can refuse a shape it does not
|
||||
understand.
|
||||
|
||||
### Domain types and `values.go` mapping
|
||||
|
||||
`values.go` maps proto ⇄ these types. The task model for the **agent** path is the domain-owned
|
||||
@@ -619,7 +628,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** (40 RPCs, grouped by contract) + narrow Go consumer facades
|
||||
- **One `StateStore` gRPC service** (42 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,
|
||||
|
||||
Reference in new issue
Block a user