Fix merged State Store runtime, authorization and deployment regressions #1703
Notifications
Due Date
No due date set.
Reference: sam/archie#1703
Reference in new issue
Block a user
Resolve six review findings in merged PRs #754/#770-775: scoped revocable agent credentials; Update validation; capture batches beyond unary receive limit; consistent token resolution; external network topology; complete task dev orchestration. Add regression tests, run task check, commit and push main as requested.
Close reason
All six review findings verified landed on main (f94e484 + accb987); regression tests pass. Only residual: nil-Task Update regression test, filed as a follow-up.
Imported from beads
archie-core-zs27· GitHub #776 · type bug · priority P1 · created 2026-09-07 · closed 2026-09-11sam wrote (originally 2026-09-11):
Triage of the six review findings (issue description) against main @ 1f4ce05. All six were fixed by commit f94e484 ("Closes six review findings against .4.6") with follow-up accb987; verified by code + targeted tests.
task devdeps include dev:state-store; deployments/dev.toml points [services.state] at 127.0.0.1:9090.Conclusion: all six landed; only residual is the missing nil-Task Update regression test (finding 2).
sam wrote (originally 2026-09-11):
Correction to the triage comment above: finding 3 was landed but wire-broken, and is now fixed in 93e36f5.
The capture batch reads were moved onto server-streaming RPCs (StreamCaptures/StreamUndispatchedCaptures) to get past gRPC's 4 MiB unary cap, but staterpc.Dial installed only a unary client interceptor, while the server's TaskGrants.StreamInterceptor demands the administrative token. Every token-protected (non-loopback) listener -- every container-mode deployment profile -- refused the call with PermissionDenied, and the unary fallback those reads replaced is no longer taken. Blast radius was wider than 'a large batch': on that topology every capture list failed, both the daemon's undispatched-capture dispatch and the dashboard's /api/captures inspector.
Neither existing test could see it: the bufconn conformance harness built a plain grpc.NewServer with no interceptors, and the real-process smoke started archie-state-store on loopback with no token. Fixed by adding StreamClientTokenInterceptor and installing it in Dial, routing the agent's duplicate dial through Dial too, and adding regression coverage that goes through the production Dial under a token-protected listener (unit + real binary). task check green.