Skip to content

feat(doctor): scan memory notes for dead paths under the rig's own roots - #3

Merged
xantorres merged 3 commits into
mainfrom
feat/memory-note-pointers
Sep 17, 2026
Merged

xantorres merged 3 commits into
mainfrom
feat/memory-note-pointers

Conversation

@xantorres

Copy link
Copy Markdown
Owner

Memory notes become a pointer source, scanned narrowly, and 0.7.0 is cut.

A note is recalled into a session and acted on, so a dead script or plan path in one misleads like a dead rule. It is also a dated record, so a note gets the path rule alone, only under doctor.pointers.memory_roots (the rig's own trees by default).

Evidence from a working rig with the full grammar: 86 findings. The 35 own-tree paths were all dead. The other 36 paths were mostly another host's filesystem. The 15 names were live project-scoped skills or history.

  • Tests: table tests for the root scope, the defaults and the name kinds. make check passes except reap --selftest, which fails the same way on the current main build on this host.
  • Release: 0.7.0, minor, because a default install now reports findings it did not before.

A memory note is recalled into a session and acted on, so a note pointing at
a deleted script or plan misleads the same way a dead rule does, and until now
nothing noticed: notes were not a pointer source, and stale ones were found by
hand.

A note is also a dated record, so it is scanned narrowly. Adding the memory
glob with the full grammar reported 86 findings on a working rig. The 35 paths
under the rig's own trees were all genuinely dead. The 36 other paths were
mostly another host's filesystem, facts about that host. Of the 15 names, the
five skills were live project-scoped skills the rig-wide skill roots cannot
see, and the labels, model id, plugin ids, agent and server were history.

So the memory glob joins the default sources, a note gets the path rule
alone, and only for paths under doctor.pointers.memory_roots, which defaults
to the rig's own trees. A note that records a path as retired names it
without its root, so a root-anchored path in a note always claims it exists.
Minor rather than patch: memory notes join the default pointer sources, so a
default install reports findings it did not report before, and doctor gains
the lever regression check.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8361be67dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_doctor_checks.py
…e root

The path grammar reads an absolute home path only when homes have a parent
directory, so on a host whose home sits directly under the root, as a root
user's does in many containers, a fixture spelled as an absolute home path is
never extracted and the test sees no findings. The new memory-root test and
three older pointer tests were spelled that way.

The fixtures now use the tilde form, which every host reads. The absolute form
keeps its own test, skipped where the grammar deliberately drops it, and a
table test pins that drop.
@xantorres
xantorres merged commit 08d0aa2 into main Sep 17, 2026
8 checks passed
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