Repository navigation
fix(lorectl): match report repeats by stem and without filler words - #419
Merged
Merged
Conversation
The only repeat the owner's report found was "in each pr make sure to add images" against "Give each change its own PR" (shared: each, pr), while "don't ask me for permissions again" was missed against "Don't ask for permission". Words now compare by stem, and how-a-rule-applies words and the agent/person boilerplate of every lesson statement are not counted.
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.
What
lorectl report's Repeats estimate compares stemmed content words (lore_memory::index::stem, as the index does), and leaves out filler that says how a rule applies (each, every, make, own) and the words every lesson statement uses (agent, person, want).Why
On the owner's archive (
--since 2026-10-01, 284 rule-flagged corrections) the report found one repeat, a false one: "in each pr make sure to add images" vs "Give each change its own PR", shared {each, pr}. It missed "ok i set on bypass, don't ask me for permissions again" (11-04), a day after "Don't ask for permission to proceed" was accepted, because "permissions" ≠ "permission" unstemmed.After: 3 repeats, all against that note: the permissions one (true), "go ahead and start merging our prs" (plausible: the go-ahead the note says not to need), and "can we start merging some of my older prs" (borderline, shares the note's own merge/PRs clause). The filler list is local to the report; changing the shared stopwords changed receipt selection (
mem_receipts), so it was kept out.Test
New
repeats_compare_stems_and_skip_filler: the permissions correction repeats its note, the each-PR one does not. Fails on main (reports the PR note, misses the other).cargo test --no-fail-fast -p lorectl -p lore-memorypasses; clippy clean.