Skip to content

fix(lorectl): match report repeats by stem and without filler words - #419

Merged
hsusul merged 1 commit into
mainfrom
fix/report-repeats-stems
Nov 9, 2026
Merged

hsusul merged 1 commit into
mainfrom
fix/report-repeats-stems

Conversation

@hsusul

@hsusul hsusul commented Nov 9, 2026

Copy link
Copy Markdown
Owner

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-memory passes; clippy clean.

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.
@hsusul
hsusul merged commit 88bec1a into main Nov 9, 2026
5 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