RAGE #131: principal-scoped conversation and memory isolation #148
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/zara!148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rage/131-principal-isolation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
RAGE implementation for #131 under daemon epic #127.
Immutable RAGE start:
71615bcd4cdece940db433cb79ea46fe9ad085e3.Implemented and regression-proven:
ConversationStorewith owner columns and owner-scoped read/write/search paths;MemoryManager, per-principal vector namespaces, owner metadata/filtering, and guest/ephemeral local-only state;PrincipalContextis threaded through the default supervisor → backend →AgentManagerpath;ConversationManagercontext now carries that same canonical principal and remains instance-isolated per runtime;Latest TDD slice: test-only
46a8330f453def30f060af9dc4fb9bfa283dc684produced the expected red (1 failed, 890 passed) because live conversation context had no principal. Minimal production wiring at4880f2adb2b66265b70d860c64378c4f7d804d6epassed the complete repository/Nix/packaging gate in CI #371. The RAGE work log records all red/green evidence and the final exact-head gate requirement.Closes #131.
RAGE review against #131 acceptance, while treating this branch as the architectural baseline for the next daemon/client work.
Blocking findings before #131 can be called complete:
The authenticated principal is not wired into the default daemon backend/memory path.
RuntimeSupervisor._build_default_host(_principal, bus)currently discards_principal;RuntimeHostbuilds the normalAgentRuntimeBackend;AgentManagerthen callsbuild_memory_manager(memory_config)without a principal. The new principal-boundMemoryManagerAPI is therefore proven in direct tests but not structurally enforced by the production daemon path. Please threadPrincipalContextthrough the runtime/backend construction and add a test that starts two real supervisor runtimes and proves their managers are owner-bound without test-only dependency injection.The durable conversation boundary is not on the daemon agent path. #148 hardens
ConversationStore, but the defaultAgentManagerstill ownsConversationManager, whose history is an in-memory list. Nothing in the current branch connects the authenticated principal/runtime to the owner-bound durable conversation store. #131 acceptance says daemon conversation persistence and private state are principal-scoped, so either wire the canonical persistent boundary into the runtime path in this issue or explicitly prove/reconcile the intended daemon conversation owner before closing #131. Direct store tests alone do not prove the service path.Exact-head CI is red because the new runtime-isolation test violates the event contract. In
test_principal_event_subscriptions_do_not_cross_runtime_buses, the fakePublishingHostpublishes the submittedSubmitTurnRuntimeCommanddirectly toRuntimeEventBus; that bus correctly accepts onlyRuntimeEvent, producing the current TypeError. Make the fake emit a real provider-neutral runtime event (or observe commands separately) so the test proves cross-principal event isolation without weakening the bus type boundary. Current exact-head run #352 is 884 passed / 1 failed; platform jobs and the 91 protocol tests are green.Hardening that should be covered while touching these seams:
MemoryManagerconstruction require/validatePrincipalContextrather than arbitraryAny-shaped objects, preserving only a deliberate compatibility default if needed;guest/ephemeral) rather than keying persistence behavior to one magic kind string;ALTER TABLEafter both observe the pre-migration schema.None of these findings argue against the owner-column / per-principal namespace design. They are integration and lifecycle gaps: #131 should prove the actual daemon construction path inherits those boundaries, not only the persistence classes in isolation.