Repository navigation
tidy: say which rules the duplicate check could not read - #17
Merged
Merged
Conversation
A fresh hub has no topic headings, so rule add stores a bullet the parser cannot read (timestamp first, no trailing (date · agent, project) tag). duplicates() dropped those rules silently, so tidy reported 'Likely duplicates (0)' for two near-identical rules (aisync-cli 0.2.9). The report now carries not_compared and the text says how many rules were skipped and why. Agent: claude-code
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
aisync tidysaidLikely duplicates (0)for two rules with the same When and a Do at 0.79 similarity (the line is 0.72). Reproduced in a throwaway hub on aisync-cli 0.2.9: https://dev.to/maxont/two-nearly-identical-rules-and-aisync-tidy-said-zero-duplicates-h0Cause: in a hub with no topic headings,
aisync rule addstores- <timestamp> (agent, project): When: ... Reason: ....rulespec.parseneeds the(YYYY-MM-DD · agent, project)tag at the end, so it returns None for those bullets, andduplicates()drops every rule it cannot parse before comparing. The check saw no rules and said "none".This PR does the smaller fix: the report now has
not_compared(the idsduplicates()cannot read) and the text under "Likely duplicates" says how many rules were skipped and why, with their ids. The stored rule format is untouched, so no existing hub changes. Teaching the parser the legacy bullet is a separate, larger change.Tests: two new cases in
tests/test_tidy.py(legacy bullets are reported as not compared; nothing is reported when every rule parses). Full suite: 466 passed, 1 skipped.tools/privacy_scan.py: 0 hits. I also ran the real CLI in a fresh temp hub: it now printsNot compared: 5 of 5 rules are not in the When/Do/Not shape ....Not covered: the version number is not bumped here, and the fix has not been released to PyPI.
I maintain aisync, and this change was written and tested by an AI agent (Claude Code).