Repository navigation
fix: linter was dead in a personal-store-only project - #3
Merged
Merged
Conversation
`verify_refs.main()` bailed whenever the team store directory was missing, even
with `personalStoreDir` set and populated:
$ python plugin/scripts/verify_refs.py --stats
No learnings store at .../learnings - run /lore:init first. (exit 0)
Same for the default mode, --strict, --report and --dupes. Personal-store-only is
a supported setup — it is how you keep notes you do not want published — and in
it recall and capture kept working, so the store looked healthy while /lore:lint,
/lore:stats and /lore:sweep were all silently gone. The early return predates the
personal store and was never revisited when it landed. The advice it printed was
wrong too: the project IS initialized, just personal-only.
Give up only when BOTH stores are absent. The traversal was already fine — an
empty `learnings/` directory made every mode work — so this is the guard clause
only.
Scope is deliberately unchanged: the personal store still feeds --stats and
nothing else, for the reasons documented in `_personal_entries` (not committed,
so nothing to index and no push boundary to scan). Two consequences handled
explicitly rather than left implicit:
- --index is a no-op with a message when there is no team store, instead of
writing a README into a directory that does not exist.
- The check mode no longer reports "all entries have valid frontmatter file
refs" after examining zero entries. A clean bill of health for an unchecked
store is the same failure this commit fixes, one level down.
Six tests in tests/test_verify_refs.py drive main() through the personal-only
project; five of them fail without the guard change, and the sixth pins the
message for a populated team store so the existing output cannot drift.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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.
The bug
verify_refs.main()bailed whenever the team store directory was missing, evenwith
personalStoreDirset and populated:Same for the default mode,
--strict,--reportand--dupes.Personal-store-only is a supported setup — it is how you keep notes you do not
want published — and in it recall and capture keep working. So the store looks
healthy while
/lore:lint,/lore:statsand/lore:sweepare all silentlygone. The printed advice was wrong too: the project is initialized, just
personal-only.
The early return predates the personal store and was never revisited when it
landed.
The fix
Give up only when both stores are absent. The traversal was already correct —
creating an empty
learnings/directory made every mode work, and--statsthenreported
personal store: 2 entries in .lore/personalplus per-entry recallactivity — so this is the guard clause only.
Scope decision
Deliberately unchanged: the personal store still feeds
--statsand nothingelse, for the reasons documented in
_personal_entries(not committed, sonothing to index and no push boundary to secret-scan).
scan_secrets.pyisuntouched — skipping the personal store there is correct by design.
Two consequences are handled explicitly rather than left implicit:
--indexbecomes a no-op with a message when there is no team store, insteadof writing a README into a directory that does not exist.
refs" after examining zero entries. A clean bill of health for a store nobody
checked is the same failure this PR fixes, one level down.
Tests
Six cases in
tests/test_verify_refs.pydrivemain()through a personal-onlyproject via
CLAUDE_PROJECT_DIR. Five fail without the guard change; the sixthpins the message for a populated team store so existing output cannot drift.
Full suite: 168 tests, OK.
Verified exit codes
--strict, broken ref in team store--strict--strict, personal-only