fix(state-store): task-scope container credentials, stream large capture lists, validate Update, wire dev's state-store (archie-core-8cda.4.7)
Closes six review findings against .4.6 (PR #775): - daemon.StateStoreGrantIssuer + staterpc.TaskGrants: containers get a per-task credential authorized only for their own Update/Transition/ InsertEvent, never the daemon's administrative token. Issued before Acquire, revoked on Release; fails closed if no issuer is wired. - StreamCaptures/StreamUndispatchedCaptures: new streaming RPCs so a batch of large capture bodies can't exceed gRPC's 4MiB unary cap. The original unary RPCs are kept, unmodified (deprecated) rather than reshaped, so buf breaking stays green for an in-flight rolling deploy. - Update rejects a nil Task with InvalidArgument instead of panicking in the store layer. - RequireHostGateway only forces on for embedded NATS, so an externally reachable NATS/State Store no longer requires a local Docker bridge. - Client-side token resolution now matches the server's (target_token, then STATE_STORE_TOKEN secret/env). - task dev now runs archie-state-store (dev:state-store) alongside archied/archie-gateway/vite; deployments/dev.toml points them at it.
This commit is contained in:
1 parent
33751abe4e
commit
8fef2e7eed
21 files changed
+1917
-596
No files matched your search
+18
-8
@@ -89,27 +89,37 @@ tasks:
|
||||
- npm test
|
||||
|
||||
dev:
|
||||
desc: "Develop: archied live-reload + archie-gateway + Vite HMR together. Open http://localhost:5173"
|
||||
desc: "Develop: archied live-reload + archie-gateway + archie-state-store + Vite HMR together. Open http://localhost:5173"
|
||||
summary: |
|
||||
Runs the dev loop in one terminal:
|
||||
|
||||
* air rebuilds and restarts archied on Go changes
|
||||
* archie-gateway serves ChatContract on 127.0.0.1:8585 (archied
|
||||
dials it for chat; it does not embed a gateway)
|
||||
* vite serves the dashboard with hot reload on :5173,
|
||||
proxying /api and /events through to archied on :8484
|
||||
* air rebuilds and restarts archied on Go changes
|
||||
* archie-gateway serves ChatContract on 127.0.0.1:8585 (archied
|
||||
dials it for chat; it does not embed a gateway)
|
||||
* archie-state-store owns archie.db on 127.0.0.1:9090, loopback,
|
||||
no token (deployments/dev.toml); both archied and
|
||||
archie-gateway dial it -- neither owns the DB
|
||||
in-process (docs/prds/state-store-contract.md §12
|
||||
step 7)
|
||||
* vite serves the dashboard with hot reload on :5173,
|
||||
proxying /api and /events through to archied on :8484
|
||||
|
||||
Open http://localhost:5173 -- not :8484. The Vite server is the one with
|
||||
hot reload; :8484 serves the last built dist/ and will look stale.
|
||||
|
||||
Ctrl-C stops all three.
|
||||
deps: [dev:daemon, dev:gateway, dev:ui]
|
||||
Ctrl-C stops all four.
|
||||
deps: [dev:daemon, dev:gateway, dev:state-store, dev:ui]
|
||||
|
||||
dev:daemon:
|
||||
desc: archied only, live-reloading via air (prefer `task dev`)
|
||||
cmds:
|
||||
- air -build.args_bin="-config-overlay,deployments/dev.toml"
|
||||
|
||||
dev:state-store:
|
||||
desc: archie-state-store only, no live-reload (prefer `task dev`)
|
||||
cmds:
|
||||
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml
|
||||
|
||||
dev:gateway:
|
||||
desc: archie-gateway only, no live-reload (prefer `task dev`)
|
||||
cmds:
|
||||
|
||||
Reference in new issue
Block a user