You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix four P1 issues from code review:
1. Async/sync interface mismatch: MemoryStore interface now declares
async methods (Promise return types). FileMemoryStore and
MemoryStoreInMemory both implement the async contract. All consumers
(discovery, resume, handoff, projection) updated to await store calls.
2. adoptMemory self-link bug: adoptMemory now requires a distinct
successor_memory_id and validates that it exists, belongs to the same
goal, and its supersedes field points back to the source. Self-links
(source == successor) are rejected with EffectRuntimeRequestError.
3. No privacy enforcement: discoverMemories now accepts an optional
MemoryViewerContext. Session-scoped records from other sessions are
filtered out when a viewer context is present. createMemoryRecord
defaults public_safe/redaction_verified to false (caller must opt in).
Projection functions only include public_safe records in summaries
and handoff rows.
4. Handoff authority is just text: composeHandoffWithMode now validates
that soft_claim/hard_lease modes require handoff-availability records
that are certified public_safe. Legacy mode remains permissive.
Authority labels are validated against record metadata, not just
returned as opaque strings.
Test count: 64 → 73 (added tests for new validation paths).
Signed-off-by: xiaodeshi <xiaodeshi@users.noreply.github.com>
Signed-off-by: Xiao Deshi <xiaods@gmail.com>
0 commit comments