Skip to content

fix: add amnesia mode and x-lore-no-store to prevent QA contamination in recall#430

Merged
BYK merged 1 commit into
mainfrom
fix-amnesia-no-store
May 20, 2026
Merged

fix: add amnesia mode and x-lore-no-store to prevent QA contamination in recall#430
BYK merged 1 commit into
mainfrom
fix-amnesia-no-store

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 20, 2026

Summary

Adds two mechanisms to suppress temporal storage and background work without affecting Lore's read path (LTM injection, recall tool, gradient transform):

  1. /lore:amnesia:on|off — session-scoped toggle via slash command
  2. x-lore-no-store — per-request header for programmatic use

Also generalizes /lore:* slash command handling so unknown commands get a helpful error instead of being forwarded upstream.

Problem

The eval's QA questions were sent through the gateway as new sessions, creating temporal messages and distillations that contaminated recall search results. When QA question N+1 invoked recall, it found QA session N's responses (which literally contained the question terms) instead of the actual replay session content.

Changes

Gateway (pipeline.ts)

  • handleLoreSlashCommand(): Generic dispatcher for all /lore:* commands — routes to warm/curate/amnesia handlers, returns error for unknown commands
  • handleAmnesiaSlashCommand(): Toggles sessionState.amnesia flag
  • postResponse(): Gates temporal storage and background work on !noStore where noStore = sessionState.amnesia || req.rawHeaders['x-lore-no-store'] === 'true'
  • Refactored warmup handler to use shared slashResponse() helper

Types (translate/types.ts)

  • Added amnesia?: boolean to SessionState

Eval (harness.ts)

  • QA questions sent with x-lore-no-store: true header

Verification

  • 1752 pass, 0 fail across all tests
  • Typecheck clean across all 4 packages

…mination in recall

Adds two mechanisms to suppress temporal storage and background work:

1. /lore:amnesia:on|off slash command — session-scoped toggle for users
2. x-lore-no-store header — per-request flag for programmatic use (eval)

Also generalizes /lore:* slash command handling:
- New handleLoreSlashCommand() dispatcher catches ALL /lore:* commands
- Unknown commands get a helpful error instead of being forwarded upstream
- Shared slashResponse() helper for consistent response format

The eval harness uses x-lore-no-store on QA questions to prevent QA session
responses from contaminating recall search results.
@BYK BYK self-assigned this May 20, 2026
@BYK BYK merged commit 72edf63 into main May 20, 2026
10 checks passed
@BYK BYK deleted the fix-amnesia-no-store branch May 20, 2026 19:44
BYK added a commit that referenced this pull request May 21, 2026
…indow (#435)

Updates marketing copy with the latest eval results from the recall
quality + distillation transparency work (#428, #430, #431, #432, #433,
#434).

### README.md
- Context retention table: Medium 2.3→4.1, Hard 3.3→4.8, Average 3.9→4.6
- Lore vs tail-window delta: +50%→+77%
- Added footnote: Lore scores averaged across multiple runs;
TW/compaction baselines from a prior eval run with the same scenarios
- Added v6 to version history

### docs/index.html
- Hero stat: +50%→+77% vs tail-window
- Detail retention: 4.8→4.6 (overall average across difficulty levels,
multiple runs)

### Review corrections
- Fixed Medium from 4.3→4.1 (honest multi-run average, not
cherry-picked)
- Average row (4.6) now self-consistent with column values:
(5.0+4.1+4.8)/3=4.63≈4.6
- Added footnote clarifying that TW/compaction columns are from a prior
eval run
This was referenced May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant