Skip to content

fix(review): the hallucinations catalog learns from unreliable invalidations and never forgets #514

Closed

Description

@dan-petty

Part of #509.

Problem

The common hallucinations catalog learns from unreliable teachers and never forgets:

  • Learning sources: it records LLM invalidations (verification.py:1161) and weak deterministic checks, including evaluation replays from prompt_eval.
  • Builtin pollution: an invalidation scoring ≥ 0.5 against a builtin entry adds up to 30 of the finding's words to that entry's keywords and persists a copy that shadows the shipped entry.
  • Ledger scope: the ledger lives under the current directory's repository, not the review target's.
  • No lifecycle: last_seen is never read, and nothing lists or prunes entries.

It also has weak ground truth and prompt leakage:

  • Weak ground truth: SYNTAX_GRAMMAR entries pass whenever the file parses. The CWE-400 builtin plus BOUNDARY_ERRORS ground truth invalidates a real attacker-controlled read_text out of the box.
  • Prompt leakage: the legacy persona loop injects the top learned entries into every prompt as "disproved".

In this worktree the block currently lists four real injected defects.

Acceptance criteria

  • Only deterministic invalidations with real ground truth are learned, and builtin entries are never modified at runtime.
  • Learned entries can be listed and removed.
  • Every category that can invalidate has a ground truth that checks the finding's claim.
  • A regression test runs real-defect findings against the catalog.

Activity

  1. added this to the v0.2.23 milestone on Sep 24, 2026
  2. added
    type/bug
    scope/review
    priority/p1-high
    on Sep 24, 2026
  3. dan-petty commented on Sep 24, 2026

    @dan-petty
    OwnerAuthor

    Closed by #523, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

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

    priority/p1-highscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions