Skip to content

tidy: say which rules the duplicate check could not read - #17

Merged
MaxonT merged 1 commit into
mainfrom
tidy-unparsed
Nov 16, 2026
Merged

MaxonT merged 1 commit into
mainfrom
tidy-unparsed

Conversation

@MaxonT

@MaxonT MaxonT commented Nov 16, 2026

Copy link
Copy Markdown
Owner

aisync tidy said Likely 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-h0

Cause: in a hub with no topic headings, aisync rule add stores - <timestamp> (agent, project): When: ... Reason: .... rulespec.parse needs the (YYYY-MM-DD · agent, project) tag at the end, so it returns None for those bullets, and duplicates() 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 ids duplicates() 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 prints Not 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).

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T11:29:01.824622Z ea0addc PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@MaxonT
MaxonT merged commit 31adfc3 into main Nov 16, 2026
6 checks passed
@MaxonT
MaxonT deleted the tidy-unparsed branch November 16, 2026 11:30
@MaxonT MaxonT mentioned this pull request Nov 16, 2026
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