Repository navigation
Description
code-tidying:[email protected], run as the residue-dissolve step of a repo-sweep on melodic-software/.github (PR #153). detect.sh reported 15 files, T1=3, T2=7. Only 2 of the 7 Tier 2 findings were real.
F1 (medium): pull request in plain prose fires ticket-pr-residue. scripts/lib/comment-shapes.sh:174 includes a bare pull[[:space:]]request alternative. False positives: ci.yml:20, managed-files-guard.yml:14/16/36, cloud-bootstrap.sh:4. Fix, cheapest first:
- Drop the bare alternative.
- Require something to point at:
(pr|issue|mr) ?#N,repo#N/org/repo#N,/pull/Nor/issues/NURLs,(from|on|in) [the] <name> branch, and Jira/Linear keys. A probe matched 11/11 real references and 0/5 prose lines. - Add these prose lines as negative tests.
F2 (low): the skill's own example is not detected. SKILL.md:53 gives "from the feature branch" as an example, but the cue only matches the adjacent words from branch. F1's branch cue fixes this. Add every SKILL.md table example as a test.
F3 (medium): a missing word boundary causes a Tier 1 false positive. The in this commit cue at :143 has no end boundary, so "in this committed" (cloud-bootstrap.sh:183) matches. Append ([^[:alnum:]]|$), the pattern the origin-note cue at :164-165 already uses, and check :133-142 for the same gap.
F4 (medium): real residue is missed. Each miss and why:
- "exactly as before" and "the value this repo has always used" are not caught: history-narration has no
as beforeoralwayscue. - "(ci-perf Phase 6b)" is not caught: the phase cue needs
phase N of/in the planwith a digits-only N, and this phrase wraps across two lines.detect.sh:153-179matches one line at a time. - "the old shared group" is not caught:
the oldonly matches insidereplaces the old. - "dotfiles#647" is not caught: there is no
repo#Ncue.
Fixes: the repo#N cue from F1; the weaker cues added at Tier 2; and matching each comment line joined with the previous one.
F5 (medium): findings land in sync-managed files the consumer cannot edit. managed-files-guard.yml carries SYNC-MANAGED FILE — DO NOT EDIT IN THE CONSUMING REPOSITORY, and .claude/cloud-bootstrap.sh is synced from standards. Both were reported with no annotation, 6 findings in total. The only opt-out is the per-line comment-residue-ignore marker. Fixes:
- Say in SKILL.md that such findings belong upstream.
- Check the first ~10 lines for
sync-managed|do not edit|@generatedand label those findings as upstream rather than hiding them. - Honor
.claude/code-tidying/exclusion-overrides.mdor an--exclude-fromlist.
F6 (low, not reproduced): the TODO/FIXME exemption at :82-84 matches the word anywhere in the comment, not only the TODO(...) form. Anchor it to that form.
Also: skill-quality:check passes with 1 warning, no Gotchas surface.
Untested: the new cue on other languages or a larger set of files, and whether C#7-style text trips repo#N. Whether a bare (#3126) should count is the maintainers' call.
🤖 Generated with Claude Code
Activity
fix(code-tidying): tighten ticket-pr residue cues (#4530) (#4859)
feat(code-tidying): label sync-managed findings and add --exclude-fro…
kyle-sexton commentedon Sep 29, 2026
Reopened. This comes from the 2026-09-29 audit of the Cursor agent run.
What the audit found. PR #4859 described itself as an "F1/F2/F3 slice" but used
Closes, so this issue closed with most of it undelivered.--exclude-from, F6 TODO anchoring, and barerepo#N.What is fixed. PR #5327 (draft, not yet merged) delivers the rest: bounded cues (F3), a tier 2
history-narration-weakshape, wrapped-comment joining andrepo#N/(pr|issue|mr) #Ncues (F4), anupstreamnote for sync-managed or generated files plus--exclude-from(F5), and an anchored TODO/FIXME exemption (F6). Each has negative and positive tests.Closes #4530applies because T5, T6 and T7 all landed.Open maintainer question, untouched. The issue asks whether a bare
(#3126)counts as residue. It is not counted, and that is unchanged; the PR tests it as clean. This remains the maintainers' call.Why
exclusion-overrides.mdwas not reused for F5 item 3..claude/code-tidying/exclusion-overrides.mdlifts tidy's HARD exclusions, so its meaning is the inverse of "exclude these files from the audit". Reusing it would have made one file mean two opposite things, so--exclude-fromwas added instead.