Skip to content

P0: Strengthen retrieval eval into an evidence-level acceptance gate #70

Description

@catoncat

Review umbrella: #69

Problem

Sherlog has usable message/session recall, but the public eval path is not yet strong enough to protect future retrieval and ranking changes. The next work should build an evidence-level acceptance gate before tuning ranking, adding bundle output, or hardening more adapters.

This maps directly to the paper's evaluation questions for overall effectiveness and retrieval fidelity. It also supports dynamic update robustness by making stale/missing/coverage failures observable rather than anecdotal.

Local Evidence

  • eval/manual-eval-core.ts:evaluateManualQuery() only supports title_or_summary, cwd, and snippet predicates.
  • eval/dogfood-eval-core.ts:evaluateDogfoodItem() already models stronger private checks: acceptable session UUIDs, cwd, match_source, selected rank/topK, and context mustContain.
  • eval/dogfood-eval-core.ts:desiredContextMode() chooses read-range for message hits and read-page for session-only hits.
  • src/query-session-fields.test.ts verifies session-level title/compact/reasoning recall and explicitly checks matchSource = "session" with matchSeq = null.
  • src/query-flow.test.ts covers the happy path sync -> find -> read-range -> read-page, but that is not yet an evidence-level acceptance suite.
  • AGENTS.md says not to claim a strong gold set, rubric, or error taxonomy exists yet.

Scope

Build a repo-shareable retrieval gate with sanitized/synthetic fixtures. It should verify evidence identity and readability, not just whether a snippet contains a word.

Assertions should cover:

  • source id
  • session ref or session UUID
  • matchSource
  • nullable matchSeq
  • cwd
  • top-k rank
  • context mustContain after read-range or read-page
  • coverage/freshness status where relevant

Fixture cases should include:

  • message hits
  • session-only hits from title/summary/compact/reasoning fields
  • Codex source behavior
  • Claude Code and Pi public source behavior where feasible
  • CJK fallback
  • cwd selectors
  • --sort ended
  • --exclude-session
  • stale/missing coverage nextAction

Acceptance Criteria

Non-Goals

  • Do not tune ranking as part of this issue except when required to make the fixture harness testable.
  • Do not add heavy retrieval systems before the gate exists.

Trace

  • deep review request: cxs_deep_review_correction_20260626T040901Z_api_append
  • issue update request: cxs_update_issues_after_review_20260626T044426Z_api_append

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions