An unresolved `path::member` row (missing or ambiguous) leads to its
file by no edge, so an incremental run never re-resolved the document
when that file changed. Two edits then left a row where a full index
has an edge: a body edit that writes a missing member's name (no
definition added), and a same-named pair of methods shrinking to one
(the name stays, so no removed name reaches the rows).
The closure now also takes the files whose missing or ambiguous rows
with "::" name a changed or deleted file, matched by base name since a
reference may be written relative to the document or to the root. When
memory runs out, every such row's file is taken.
Test: doc_links_md_member_missing_incremental requires incremental ==
full on the closure-repair route for both edits and for dropping the
name again. Without the new closure rule the "member written" step
diverges; with it limited to missing rows the "group shrinks" step
does.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
A `path::member` reference became a missing row whenever the member
lookup found no definition node, but real documentation names members
the file has without a node the lookup binds: a call form
(`src/util.py::clamp()`), a C macro or a prototype in a header, a
TypeScript namespace, a Python enum member, an annotated class
attribute. Those lost their correct file edge and were counted as doc
rot.
A member now reads without a trailing call form, so `clamp()` binds
`clamp`. When no definition matches, the resolver reads the code file
and calls the member missing only when the file does not write its name
at all (a whole identifier, case-sensitive); a member the file writes
keeps the file edge it had before. A file that cannot be read whole
makes no claim. Ambiguous members are unchanged.
Test: doc_links_md_member_written_issue2587 indexes each shape under its
own heading, and two members that stay missing (Color::BLUE, which the
file writes only as LIGHT_BLUE and a lowercase "blue", and
no_such_function). On the previous head all seven shapes are missing
rows; without the call-form trim the call form is; without the
identifier boundary, or with a case-insensitive match, BLUE takes the
file edge.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The search hook gives each Grep, Glob or Bash search the matching graph
symbols, but a session can keep searching text for questions the graph answers
in one call (#509). Once a session has run three searches with no
codebase-memory-mcp tool call, the next augmentation now adds one factual line
saying so. The next note comes after six searches, then twelve, and any graph
tool call resets the count.
- State: a per-session counter in the process that runs hook requests (the
daemon), keyed by the payload's session_id, in a bounded 64-slot table that
evicts the least recently used session, behind a spin lock. Only searches
that reach the graph lookup count. A search without an augmentation still
counts, and the note waits for the next augmentation.
- Reset: Claude's managed PostToolUse entry now matches
"Read|mcp__.*codebase-memory-mcp__.*", covering plain and plugin server
names. The previous Read-only entry, as installs up to v0.12 wrote it, is
recognized as owned, so install replaces it in place and uninstall removes
either.
- Scope: Claude Code only. Codex sends the same event payload with a turn_id
but has no reset hook, so its sessions are not tracked, and payloads without
a session_id are not tracked either.
- Cost: a graph tool call now runs one hook round-trip to the daemon for the
reset, about 130 ms on a local build.
Refs #509
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>