Verify State Store end-to-end and close migration #1147

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

Add real-process smoke coverage for archie-state-store and consumers, including a combined dashboard view spanning task/event/capture data, remote error/deadline behavior, restart/recovery, and single-owner SQLite assertions. Update docs, Taskfile/CI/release artifacts, run task check plus race-relevant tests, audit for leftover direct internal/store imports, then close the Phase 2 issue only with clean evidence.

Notes

Progress this session (commits f94e484, accb987 on main):

  • Fixed 6 findings from an adversarial review of .4.2-.4.6: task-scoped
    container credentials (RegisterTaskGrant/RevokeTaskGrant + per-RPC
    authorization), streaming capture RPCs (StreamCaptures/
    StreamUndispatchedCaptures, fixing a >4MiB batch overflow), nil-Task
    validation on Update, RequireHostGateway no longer forced for external
    NATS, client/server token resolution parity, task dev now runs
    archie-state-store.
  • Added restart/recovery test (TestStateStoreDataSurvivesRestart) and a
    single-owner-SQLite assertion (TestOpenStoresNeverOwnsTaskDB).
  • Audited internal/webui + friends for direct internal/store use: clean,
    only narrow contract interfaces are imported.
  • Updated docs/prds/state-store-contract.md's token-lifecycle and
    payload-limit sections to match what's implemented now.
  • task check (incl. -race on the touched packages) is clean.

Still open before this can close:

  • CI/release artifacts: archie-state-store has no Dockerfile/CI build
    and isn't in RELEASING.md's two-component split (tools/release.sh
    only tracks cmd/archied and cmd/archie-agent). Unclear if that's
    intentional (native-binary/systemd deployment per deployments/*.toml)
    or a gap -- needs Sam's call, not an assumption.
  • "Close the Phase 2 issue" (archie-core-8cda.4) also needs .4.2-.4.6
    reconciled: those are all still bd-OPEN despite matching commits
    already on main (62e6936, dd335d3, 5b0d85f, 7dcb1b3, 8a24546) --
    pre-existing tracker/git divergence, not caused by this session, but
    blocks a clean close of the parent.

Close reason

All acceptance items closed out:

  • Real-process smoke coverage, combined task/event/capture dashboard
    view, and remote error/deadline behavior: TestStateStoreConformance
    (local+grpc modes) plus TestTokenInterceptorRejectsMissingOrInvalidToken,
    pre-existing from PR #775.
  • Restart/recovery: TestStateStoreDataSurvivesRestart.
  • Single-owner SQLite assertion: TestOpenStoresNeverOwnsTaskDB
    (openProductionTaskStore is called exactly once, from
    state_store.go's openStateStore, never daemon/gateway composition).
  • Docs: docs/prds/state-store-contract.md's token-lifecycle and
    payload-limit sections updated to match what's implemented
    (RegisterTaskGrant/RevokeTaskGrant scoping, streaming capture RPCs);
    AGENTS.md/CLAUDE.md's State Store section corrected (stale
    in-process-listener and daemon.StateStoreTokens references removed).
  • Taskfile: dev:state-store added so task dev runs all four
    processes.
  • CI/release artifacts: archie-core-8cda.4.7.1 (distribution zip in
    deploy.yml), closed.
  • task check plus -race on the touched packages: clean.
  • Audit for leftover direct internal/store imports: clean -- only
    narrow contract interfaces are imported outside archie-state-store's
    own composition.

Also fixed along the way: task-scoped State Store credentials
(RegisterTaskGrant/RevokeTaskGrant, replacing the daemon's admin token
being forwarded to every container), streaming capture RPCs (fixing a

4MiB unary response overflow), Update RPC nil-Task validation,
RequireHostGateway no longer forced for external NATS.

Commits: f94e484, accb987, 4e1efd5, d687f05.


Imported from beads archie-core-8cda.4.7 · GitHub #757 · type task · priority P2 · created 2026-09-06 · closed 2026-09-07

Add real-process smoke coverage for archie-state-store and consumers, including a combined dashboard view spanning task/event/capture data, remote error/deadline behavior, restart/recovery, and single-owner SQLite assertions. Update docs, Taskfile/CI/release artifacts, run task check plus race-relevant tests, audit for leftover direct internal/store imports, then close the Phase 2 issue only with clean evidence. ### Notes Progress this session (commits f94e484, accb987 on main): - Fixed 6 findings from an adversarial review of .4.2-.4.6: task-scoped container credentials (RegisterTaskGrant/RevokeTaskGrant + per-RPC authorization), streaming capture RPCs (StreamCaptures/ StreamUndispatchedCaptures, fixing a >4MiB batch overflow), nil-Task validation on Update, RequireHostGateway no longer forced for external NATS, client/server token resolution parity, task dev now runs archie-state-store. - Added restart/recovery test (TestStateStoreDataSurvivesRestart) and a single-owner-SQLite assertion (TestOpenStoresNeverOwnsTaskDB). - Audited internal/webui + friends for direct internal/store use: clean, only narrow contract interfaces are imported. - Updated docs/prds/state-store-contract.md's token-lifecycle and payload-limit sections to match what's implemented now. - task check (incl. -race on the touched packages) is clean. Still open before this can close: - CI/release artifacts: archie-state-store has no Dockerfile/CI build and isn't in RELEASING.md's two-component split (tools/release.sh only tracks cmd/archied and cmd/archie-agent). Unclear if that's intentional (native-binary/systemd deployment per deployments/*.toml) or a gap -- needs Sam's call, not an assumption. - "Close the Phase 2 issue" (archie-core-8cda.4) also needs .4.2-.4.6 reconciled: those are all still bd-OPEN despite matching commits already on main (62e6936, dd335d3, 5b0d85f, 7dcb1b3, 8a24546) -- pre-existing tracker/git divergence, not caused by this session, but blocks a clean close of the parent. ### Close reason All acceptance items closed out: - Real-process smoke coverage, combined task/event/capture dashboard view, and remote error/deadline behavior: TestStateStoreConformance (local+grpc modes) plus TestTokenInterceptorRejectsMissingOrInvalidToken, pre-existing from PR #775. - Restart/recovery: TestStateStoreDataSurvivesRestart. - Single-owner SQLite assertion: TestOpenStoresNeverOwnsTaskDB (openProductionTaskStore is called exactly once, from state_store.go's openStateStore, never daemon/gateway composition). - Docs: docs/prds/state-store-contract.md's token-lifecycle and payload-limit sections updated to match what's implemented (RegisterTaskGrant/RevokeTaskGrant scoping, streaming capture RPCs); AGENTS.md/CLAUDE.md's State Store section corrected (stale in-process-listener and daemon.StateStoreTokens references removed). - Taskfile: dev:state-store added so `task dev` runs all four processes. - CI/release artifacts: archie-core-8cda.4.7.1 (distribution zip in deploy.yml), closed. - task check plus -race on the touched packages: clean. - Audit for leftover direct internal/store imports: clean -- only narrow contract interfaces are imported outside archie-state-store's own composition. Also fixed along the way: task-scoped State Store credentials (RegisterTaskGrant/RevokeTaskGrant, replacing the daemon's admin token being forwarded to every container), streaming capture RPCs (fixing a >4MiB unary response overflow), Update RPC nil-Task validation, RequireHostGateway no longer forced for external NATS. Commits: f94e484, accb987, 4e1efd5, d687f05. --- _Imported from beads `archie-core-8cda.4.7` · GitHub #757 · type task · priority P2 · created 2026-09-06 · closed 2026-09-07_
sam added the mediumtask labels 2026-10-27 13:39:12 +00:00
sam self-assigned this 2026-10-27 13:39:12 +00:00
sam closed this issue 2026-10-27 13:39:13 +00:00
sam added a new dependency 2026-10-27 13:42:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1147