Skip to content

fix(server): preserve memory recall for questions and constraints - #145

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/recall-question-constraints
Nov 17, 2026
Merged

ScriptedAlchemy merged 1 commit into
mainfrom
fix/recall-question-constraints

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Problem

The restatement filter merged in #140 suppresses relevant project memory when a question, contradiction, or incomplete statement shares four content words with a saved fact. For example, “Should cache keys include tenant IDs?” lost “Cache keys must include tenant IDs.” Filtering stop words also removed the distinctions needed to preserve negation and qualifications.

Change

Suppress a fact only when the complete message is an exact copy of its complete statement, ignoring outer whitespace. Preserve meaningful internal whitespace, questions, contradictions, omitted qualifications, and overlap in entity names. The existing minimum content-term floor and 8,192-character tokenization bound remain.

The domain now passes the original query to the ranking helper so a truncated prefix cannot be mistaken for a complete copied statement. This deliberately favors retaining a potentially useful fact over removing partially repeated wording in a longer brief.

Validation

  • Reproduced the question/constraint regression against the merged implementation.
  • The domain regression for a copied 8,192-character prefix followed by a question failed before the call-site fix.
  • All 65 tests passed across recallRelevance, ProjectKnowledge, and AgentContextBudget.
  • Scoped changed-file checks passed native build, formatting, lint, both Knip scans, and GraphQL validation.
  • Vite+’s cached typecheck launcher could not initialize its seccomp supervisor in this environment; the exact direct compiler commands passed for server, evals, and scripts.
  • The gate used --skip-tests after its exact selected test files passed through the owning package configuration. The four-file snapshot is clean and committed.

No model-facing prompts changed, and no private replay or live-model quality claims are made. This is the focused follow-up to the issue identified in the earlier review of #140.

Implemented and reviewed with GPT-6 Astra through the Codex harness.

@changeset-bot

changeset-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c6c6f66

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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