Skip to content

promotion-overview: extracted facts about the assistant go stale and get replayed - #55

Open
alberttwong wants to merge 1 commit into
redis:mainfrom
alberttwong:promotion-extracted-facts-go-stale
Open

alberttwong wants to merge 1 commit into
redis:mainfrom
alberttwong:promotion-extracted-facts-go-stale

Conversation

@alberttwong

@alberttwong alberttwong commented Sep 15, 2026 •

Copy link
Copy Markdown

What this changes

skills/iris-development/references/promotion-overview.md — one added section, before "What if a promotion fails?". Nothing removed.

Why

promotion-overview covers promotion's mechanics thoroughly — the dedup window, eventual consistency, how to poll, what happens on failure. It says nothing about what gets extracted, and there is one category that bites.

Promotion extracts durable facts from a transcript, and a transcript contains both speakers. So some records describe the assistant's capabilities rather than the user:

"the assistant cannot save display preferences"

That reads as a fact and behaves like one. It isn't — it's a claim about a product, and it goes stale the moment the product changes. It was also true when it was written, so nothing about the record looks wrong: not its text, not its memory_type, not its owner_id.

What it did to us

We shipped a display-preferences feature. The store had already extracted the assistant's earlier refusal, and after the feature shipped searchLongTermMemory handed that record back as context — so the assistant told the user:

"I still can't save that"

having just saved it, in the same turn. No error anywhere, and the memory layer working exactly as designed. The record was retrieved correctly; it was simply about a version of the product that no longer existed.

What was added

  • Filter on recall, not on write. Extraction is a managed worker — what it produces is not yours to control, but what reaches a prompt is. With a Python example.
  • The warning that matters more than the filter: keep it narrow, and test it against real records. Our first version also matched said and stated, which dropped genuine user facts — "she said she wants to move into platform work" is exactly the kind of record the store exists to hold. A recall filter that is too aggressive fails the same way the stale record does: quietly, by returning less than it should. That symmetry is the point of including it.
  • Two habits in the same family: a created_at filter keeps last quarter's claims out of this quarter's prompt, and anything the application wrote deliberately belongs in its own namespace so a similarity search over things the user said cannot return configuration as though they had said it (cross-links ltm-organize).

Validation

$ npm run validate
Codex plugin validation passed.
Validation passed.
Vendored plugin skills match skills/ (8 skills, 55 files).
Eval baseline validation passed for 8 suites.

$ npm run validate:skill-structure                  # skill-validator v1.5.6
- skills/iris-development: 0 errors, 0 warnings

The example regex is tested, not eyeballed. I extracted the pattern back out of the rendered markdown and ran it against the cases the prose claims — because a doc example that quietly over-matches would be the exact failure the section warns about:

dropped:  "The assistant cannot save display preferences."
          "the assistant can't search by company"
          "The agent is unable to list connections."
          "The system does not support saving preferences."
kept:     "she said she wants to move into platform work"
          "John stated that he prefers remote roles"
          "User 42 prefers dark mode in the dashboard."
          "Ana can mentor junior engineers."
          "The candidate cannot relocate."
→ 4 dropped, 5 kept

The last two matter: can and cannot appear in both populations, so the pattern has to be anchored on the subject, not the modal.

skills/ edited, plugins/ regenerated via npm run sync:plugins, nothing hand-edited under plugins/.

Evals — not run

Same position as #53 and #54, stated rather than glossed. evals/iris-development/agent-memory/model-matrix.json is 3 models × 2 configurations × 2 repetitions over 6 evals plus a claude-sonnet-5 judge, and the harness needs ANTHROPIC_SKILL_CREATOR_PATH and the claude CLI — real spend I was not in a position to authorize on this account.

No existing eval covers promotion content (#3 is async-promotion-contract, i.e. the timing), so this section is more likely to want a new eval than to move an existing one. Happy to write and run it given a sanctioned budget, or for a maintainer to take it.

Manual validation instead

The incident above is the validation: a real store, a real extracted record, and a user-visible contradiction we had to diagnose. The filter is in production and the narrowing was itself a bug fix — the first version's false positives were caught by a test asserting that ordinary user statements survive recall.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes to iris-development reference material; no runtime or API behavior changes.

Overview
Adds a section to promotion-overview.md (canonical skills/ copy plus vendored plugins/redis-development/) explaining that promotion can persist assistant capability claims from transcripts, which look like user facts but go stale when the product changes and can be replayed into prompts after a fix ships.

The guidance recommends filtering at recall (not blocking writes), with a narrow Python regex example and a warning that over-aggressive filters drop real user facts the same way stale records mislead. It also points readers to created_at cutoffs and deliberate namespace separation, with a link to ltm-organize.md.

Reviewed by Cursor Bugbot for commit 35ee1c2. Bugbot is set up for automated code reviews on this repo. Configure here.

…get replayed

Promotion extracts durable facts from a transcript, and a transcript has two
speakers. So some records describe the *assistant's* capabilities rather than
the user — "the assistant cannot save display preferences". These read as facts
and behave like facts, but they are claims about a product, and they go stale
the moment the product changes. They were also true when written, so nothing
about the record looks wrong.

We shipped a display-preferences feature. The store had already extracted the
assistant's earlier refusal, and after the feature shipped `searchLongTermMemory`
handed that record back as context — so the assistant told the user "I still
can't save that", having just saved it. One turn, no error, memory layer working
exactly as designed.

Adds a section saying to filter these on **recall** rather than trying to stop
them being written: extraction is a managed worker, but what reaches a prompt is
the caller's. With the filter, and with the warning that matters more — keep it
narrow and test it on real records. Our first version also matched `said` and
`stated`, which dropped genuine user facts; "she said she wants to move into
platform work" is exactly what the store exists to hold. A recall filter that is
too aggressive fails the same way the stale record does: quietly, by returning
less than it should.

Also two habits in the same family: `created_at` keeps last quarter's claims out
of this quarter's prompt, and anything the application wrote deliberately
belongs in its own `namespace` so a similarity search over things the user
*said* cannot return configuration as though they had said it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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