feat(doctor): scan memory notes for dead paths under the rig's own roots - #3
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
💡 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".
…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.
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.
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.
make checkpasses exceptreap --selftest, which fails the same way on the current main build on this host.