link --scan --all-projects, and a doctor nudge to run it - #15
Merged
Conversation
Grounding shipped last week and then sat at 1.4% on a real 728-memory
store. The reflex fix was a README line. Measuring first said otherwise.
93% of those memories are *global*, and `link --scan` compares memories
against the graph of the project you are standing in — so the same global
Rust gotcha only ever meets one project's symbols per run. Mimir has 1,147
symbols; ARIA has 61,704. Scanning one project is not a smaller version of
scanning all of them, it is a different question.
Measured on a copy of the real store, never on the live one:
baseline 10 grounded 1.4%
scan in Mimir only 19 2.6%
scan --all-projects 151 20.7% (563 links, 24 projects)
So the fix is `--all-projects`, iterating every project that has a graph.
The edge set is now read once rather than per project — the inner loop asks
"already linked?" per candidate, and re-reading it 24 times over a store
with 91k symbols was the dominant cost.
Also `doctor`: it now says when you have code graphs and have never
scanned, and stays quiet once you have, coming back only when the last scan
is 30 days stale. `last_link_scan` is recorded the same way `consolidate`
records its own run. This is the part that actually drives adoption —
anchors sat at 0 of 612 not because the feature was missing but because
nothing said so at a moment anyone was listening, and a README is read
once while `doctor` is read when you already suspect something is off.
Spot-checked precision before recommending any of it: `send_message_atomic`
against a Supabase gotcha, `segCross` against a sketch-split note,
`getSupabaseAdminClient` against a SUPABASE_INTERNAL_URL warning. A few
land on platform builtins (`preventDefault`, `ExitStatus`) rather than
project code — the relation is `mentions`, which is honestly named for that
strength of evidence.
The README section states the ceiling rather than selling the number: 308
gotchas, 186 insights and 170 notes mostly describe environments, decisions
and people that name no code. ~20% may be close to the natural maximum, and
that is a further argument for grounding staying a flag rather than a
ranking signal.
fmt, clippy -D warnings, 386 tests, plus the full before/after exercised
against a copy of the real store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Grounding shipped last week and then sat at 1.4% on a real 728-memory
store. The reflex fix was a README line. Measuring first said otherwise.
93% of those memories are global, and
link --scancompares memoriesagainst the graph of whichever project you're standing in — so the same
global Rust gotcha only ever meets one project's symbols per run. Mimir has
1,147 symbols; ARIA has 61,704. Scanning one project isn't a smaller version
of scanning all of them, it's a different question.
Measured on a copy of the real store (never the live one):
--all-projects563 links across 24 projects.
What's in it
mimir link --scan --all-projects— iterate every project that has agraph. The edge set is read once instead of per project; the inner loop
asks "already linked?" per candidate, and re-reading it 24 times over 91k
symbols was the dominant cost.
doctornudge that says when you have code graphs and have neverscanned, records
last_link_scanthe wayconsolidaterecords its ownrun, and goes quiet until the scan is 30 days stale. This is the part that
drives adoption: anchors sat at 0-of-612 not because the feature was
missing but because nothing said so when anyone was listening. A README is
read once;
doctoris read when you already suspect something is off.Precision
Spot-checked before recommending any of it —
send_message_atomicagainst aSupabase gotcha,
segCrossagainst a sketch-split note,getSupabaseAdminClientagainst aSUPABASE_INTERNAL_URLwarning. A fewland on platform builtins (
preventDefault,ExitStatus) rather thanproject code; the relation is
mentions, which is honestly named for thatstrength of evidence.
The ceiling, stated rather than sold
308 gotchas, 186 insights, 170 notes — mostly environments, decisions and
people that name no code. ~20% is probably near the natural maximum, and
that's a further argument for grounding staying a flag rather than becoming
a ranking signal.
Review notes
graphs, speaks when never scanned, quiet after a recent scan, returns when
stale). The scan itself is verified end-to-end against a copy of a real
728-memory store rather than a fixture.
-D warnings, 386 tests.