Skip to content

Show a falsified grounding where an agent actually reads it - #14

Merged
MakerViking merged 1 commit into
mainfrom
fix/stale-on-recall-line
Aug 11, 2026
Merged

Show a falsified grounding where an agent actually reads it#14
MakerViking merged 1 commit into
mainfrom
fix/stale-on-recall-line

Conversation

@MakerViking

Copy link
Copy Markdown
Owner

Stale grounding rendered only in full_record — i.e. get. An agent
recalls, reads the ranked lines, and acts on the top hits; it does not then
call get on each one. So the signal shipped last week reached whoever ran
mimir doctor and essentially nobody else.

The compact line now carries stale-link in the bracket, the same one-word
treatment unsure gets, on affected hits only:

m:QJ18BM [gotcha pr:src 08-11 stale-link] retry_with_backoff doubles …
m:A1YRN7 [note pr:src 08-11] unrelated note about the retry budget

Resolved once per page via grounding::stale_ids, not per hit — recall is a
hot path, the marker is usually absent, and a query per result to print
nothing is a bad trade. A test asserts the batch lookup and per-node
grounding() can never disagree; a split-brain between what recall shows
and what get shows would be the supersedes edge-vs-column bug in a new
costume.

Still not a ranking signal, and now there's a number behind that

Measured read-only on a real 714-memory store before deciding:

count share
grounded 10 1.4%
stale 1 0.1%
ungrounded 703 98.5%

Scoring grounding would move eleven records. The store holds 91k symbols,
16.7k doc chunks and 12.3k files, and 247 memories (34.6%) do carry
edges — but to other memories and tags, not to artifacts.

So the ceiling on grounding isn't the ranking policy, it's that
mimir link --scan is a manual per-project command nobody runs. Same shape
as anchors sitting at 0 of 612 adoption. Discoverability work tracked
separately.

Review notes

  • No migration, no schema change, no ranking change.
  • agent_line_for_query gains a stale_grounding flag; agent_line
    delegates with false, so the single-node echo paths (remember, mark,
    list) don't pay for a lookup that would almost always return false.
  • fmt, clippy -D warnings, 385 tests, plus before/after verified against
    the real binary.

Stale grounding rendered only in `full_record` — `get`. An agent recalls,
reads the ranked lines, and acts on the top hits; it does not then call
`get` on each one. So the signal shipped last week reached whoever ran
`mimir doctor` and nobody else, which is close to the failure mode the
flag was supposed to avoid.

The compact line now carries `stale-link` in the bracket, the same
one-word treatment `unsure` gets, on affected hits only:

    m:QJ18BM [gotcha pr:src 08-11 stale-link] retry_with_backoff doubles …
    m:A1YRN7 [note pr:src 08-11] unrelated note about the retry budget

Resolved once per page via `grounding::stale_ids`, not per hit: recall is
a hot path, the marker is usually absent, and a query per result to print
nothing is a bad trade. A test asserts the batch lookup and the per-node
`grounding()` can never disagree — a split-brain between what recall shows
and what `get` shows is exactly the `supersedes` edge-vs-column bug in a
new costume.

Still not a ranking signal. Measured on a real 714-memory store first,
read-only, to check that was still the right call:

    grounded    10   1.4%
    stale        1   0.1%
    ungrounded 703  98.5%

Scoring would move eleven records. The store holds 91k symbols, 16.7k doc
chunks and 12.3k files, and 247 memories (34.6%) do have edges — but to
other memories and to tags, not to artifacts. So the ceiling on grounding
is not the ranking policy, it is that `mimir link --scan` is a manual
per-project command nobody runs. Same shape as anchors at 0 of 612.
@MakerViking
MakerViking merged commit 89263f5 into main Aug 11, 2026
3 checks passed
@MakerViking
MakerViking deleted the fix/stale-on-recall-line branch August 11, 2026 23:59
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