Skip to content

Enhancement: review memory freshness after code changes #411

Duplicate

Description

@WhollyMindless

User need

A command, implementation detail, or code-dependent assumption can become outdated after a refactor while its memory remains available to later sessions. Users need a way to review that relationship before relying on the old information.

Proposed experience

Provide a memory freshness review after relevant code changes:

  • Identify code-dependent memories whose referenced files, symbols, or commands may have changed since the memory was recorded or last checked.
  • Where available, show the source reference, the basis of the previous check, and the relevant change. Mark missing verification information as unknown.
  • Offer reconfirm, update, or retire decisions, preserving history and recoverability.

A changed file is a reason to review a memory, not proof that the memory is false. Likewise, age alone does not invalidate a user preference, decision, or durable fact.

The desired outcome is making potentially stale guidance visible while avoiding unnecessary retirement of still-useful knowledge. Verification coverage and uncertainty should be explicit.

Existing context

The plugin already checks supported references and handles stale references in its write gates. This proposal asks for a user-facing review of existing knowledge as the repository evolves, building on those mechanisms. It is recorded separately so the freshness capability remains visible even if the maintainer later integrates it into a broader memory optimization workflow.

Recorded as an enhancement for consideration. Priority, design, decomposition, and implementation ownership remain with the maintainer.

Activity

  1. added
    proposal
    retrieval
    severity:low
    on Nov 14, 2026
  2. abogartz commented on Nov 19, 2026

    @abogartz
    Owner

    Evidence from a live case, and one hazard this proposal should cover

    Found while running scripts/ref-fixer.ts in dry-run over the maintainer's store on 2026-11-19, after #445 and #450 merged (main at 5e03d6c). It is a concrete instance of what #411 asks for, and it shows the failure mode is worse than "stale".

    The row. 2026-10-30T19:43:52.704Z, learning/workflow/ci-attribution. It cites src/lock.ts, which has since moved to src/store/lock.ts. The rename is clean — R99, basename unchanged, the old path gone, the path never reused — so the fixer selects it and would repoint it.

    Two of its claims are false about the current tree:

    the row asserts current code changed in
    DEFAULT_TIMEOUT_MS is 5000 const DEFAULT_TIMEOUT_MS = 10_000 6aab5d9 (2026-11-14)
    default degraded mode "PROCEEDS UNLOCKED" const DEFAULT_ON_TIMEOUT = "fail" 7f53267 (2026-11-04)

    The second one is not drift. 7f53267 landed four days before the row was written, so the row was wrong at capture. No freshness mechanism of any kind would have caught it, because it was never true.

    The hazard: repairing the path makes the wrong row more dangerous. While the cited path is dead the row reads as history — the reader cannot open the file, so the prose is understood as a snapshot of an old state. Repoint it at a live file and it reads as a current description of code that asserts the opposite. The plausible bad outcome is a later session reading "proceeds unlocked is the default" and trying to fix a bug that was retired two weeks earlier.

    This is not a criticism of the fixer, whose header states it repairs pointers and reports everything else. It is a gap between two mechanisms that each work:

    • ref-fixer validates where a row points.
    • The write gate validates that the path resolves (ref_path_missing). It passed, correctly — the new path exists.

    Neither asks whether the row's claims about the file are true. So a factually wrong row can be promoted from "obviously historical" to "verified against a live file" by a tool whose whole purpose is repair.

    What this implies for the design in #411. The proposal's framing — identify memories whose files changed, offer reconfirm / update / retire — is the right shape, and I'd add two constraints from this case:

    1. A freshness pass must be able to say "this row should not have been repointed." The cheap signal is: the row cites a file that changed after the row was written. That does not prove the row is wrong, exactly as the issue says, but here it would have flagged the only row the fixer wanted to touch.
    2. Path repair and content review are coupled, and the coupling is one-directional. Repairing a pointer raises a row's apparent authority. So a repoint should either be suppressed when the same row is already flagged as unreviewed-and-changed-underneath, or leave a marker that the pointer was repaired while the prose was not re-read.

    Scope of the evidence, stated plainly. One row, one store — the maintainer's, which is currently the only store this plugin has. The mechanism is general (a moved file plus a changed constant is an ordinary sequence in any repository) but the instance is n=1, and the two refused-then-left-alone rows nearby turned out to carry no comparable claims.

    No code change proposed here; #411 remains the design owner. Filing the case so the hazard is in the issue before anyone builds the pass.

  3. added
    tier:micro
    enhancement
    tier:full
    and removed
    tier:micro
    on Nov 23, 2026
  4. WhollyMindless commented on Nov 25, 2026

    @WhollyMindless
    ContributorAuthor

    Note

    🤖 GPT-6.2 Sol responding on behalf of WhollyMindless

    A useful first version would be an on-demand, local, read-only report for saved memories owned by the current repo. Report cited references that are missing, likely moved, or changed when a Git comparison is available. Show the path and the basis for the flag. A citation that resolves should be labeled as such, with the accuracy of the claim left unverified.

    Positive example. A memory says the queue retries three times and cites src/queue.ts. A refactor moves that code to src/jobs/queue.ts. Show the old citation and likely new path, and ask the user to check the retry claim before updating the entry.

    Negative example. An edit that only changes a comment in the cited file does not justify retiring the memory. An entry without a supported citation is unchecked. The scan leaves the store untouched, and any correction uses the existing update or retire flow.

    Implementation ownership. We’ll wait for the maintainer to explicitly approve us taking this on or assign it to us before claiming it or starting implementation.

  5. abogartz commented on Dec 1, 2026

    @abogartz
    Owner

    Closed as a duplicate. Both tickets are fully specified now, and this one's scope sits inside #412's area 3 — its own body already says it can incorporate the separately proposed freshness review. One review surface should have one ticket: the staleness scanner described here (cited file changed after writing, flagged even when the pointer resolves, path repair suppressed on such a row) is the acceptance criteria to carry over, not a second programme of work.

    The work belongs to the ticket named above, which stays open. Anything recorded here that the other ticket lacks is worth moving over before this thread stops being easy to find.

    Superseded by #412.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementproposalretrievalseverity:lowtier:full

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions