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
{{ message }}
Repository navigation
Same-key supersession and the value-update pass can retire another user's memory under a namespace-wide token #723
Under a namespace-wide token, a write that names its user_id can still retire another user's memory through two paths that read the request's scope rather than the write's user:
Same-key supersession under newest_wins: server/memory/app/key_supersession.py, _live_same_key_rows reads request_scope(). A write of key seat for Bob can retire Alice's live seat row.
The value-update pass (detect_updates): server/memory/app/value_updates.py, the peer reads (_peers_many, _peers_joined, _peers_codes_first) use request_scope(). A bulk or set_from_messages write for Bob can mark Alice's dated row superseded.
#701 makes the write-time conflict verdict read and judge the write's user's rows only (_writer_scope in server/memory/app/conflicts.py); these two paths need the same scope.
Does it reproduce on the latest release or main?
Found by reading the code on main during review of #701; not yet reproduced against a running server.
How to reproduce
With a namespace-wide token and the namespace's policy newest_wins, memory.set("seat", "Prefers aisle seats", user_id="alice").
memory.search("seat", user_id="alice"): expected Alice's row; the code suggests it is retired.
For the value-update pass: the same two users, detect_updates on, a dated fact for Alice, then a bulk write for Bob of the same attribute with another value.
Expected behavior
A write that names its user retires only that user's rows, as the conflict verdict does after #701. Another user's row is untouched; a write without a user keeps today's namespace-wide behaviour.
Activity
Memory conflict checks use the writer's user and namespace pins (#701)
Same-key and value-update supersession use the write's user (ClickHou…