Say which memories the model can actually see

Retrieval has been path-scoped since SP3: a memory on a branch this story
never travelled is never sent to the AI. The drawer listed every memory
alike, so on a fork you read "Fell down the cellar stairs; badly hurt" and
reasonably concluded the model knew it. It does not. That is worse than
either hiding the row or retrieving it — it is the screen claiming
something the engine contradicts.

Hiding them is not the answer either; that was the original comment's
point, and it stands. A memory nobody can list is a memory nobody can
delete, in a phase whose rule is that nothing is removed automatically.

So the whole bank still lists, and the rows off the current path are set
back, dashed, and labelled "another branch". MemoryOut.on_path carries it,
computed from the predicate retrieval itself uses rather than a second
spelling of the same idea — two spellings drift, and the failure mode here
is a badge that says the opposite of what the model gets. Pinning does not
override it: the path clause runs before pinning is considered.

The relationship is asymmetric and there is now a test that says so. A fork
borrows its ancestors, so a memory written on the parent is on the fork's
path too; the reverse never is. Worth pinning before somebody makes it
symmetric on the grounds that it looks wrong.

399 tests, three new, egress ceilings intact — the flag costs one id-only
query. Verified in a browser on tools/branch_fixture.py.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015H5qiyiR7gtFQaoDphHZ3g
This commit is contained in:
parththakkar106
2026-08-18 19:14:07 +05:30
committed by Parth
co-authored by Claude Opus 5
parent 811368d048
commit 1d1367ce3a
7 changed files with 171 additions and 9 deletions
+13 -1
View File
@@ -337,7 +337,8 @@ function MemoryRow({ memory, onChange, onDelete }) {
}
return (
<div className={`memory-row ${memory.forgotten ? 'forgotten' : ''}`}>
<div className={`memory-row ${memory.forgotten ? 'forgotten' : ''}`
+ (memory.on_path === false ? ' off-path' : '')}>
{editText !== null ? (
<div className="action-edit" style={{ margin: 0 }}>
<AutoTextarea autoFocus value={editText} rows={3}
@@ -353,6 +354,17 @@ function MemoryRow({ memory, onChange, onDelete }) {
<div className="memory-meta">
{memory.pinned && <span className="memory-badge">📌 pinned</span>}
{memory.forgotten && <span className="memory-badge">forgotten</span>}
{/* Kept in the list so it stays possible to find and delete, but
said plainly: this one belongs to a branch the story being read
never went down, and it is never retrieved. Pinning does not
override it — the path clause runs before pinning is
considered. */}
{memory.on_path === false && (
<span className="memory-badge off-path"
title="On another branch — this is never sent to the AI while you are reading this one">
another branch
</span>
)}
{!memory.embedded && !memory.forgotten && (
<span className="memory-badge" title="Embedded on the next turn">not embedded yet</span>
)}