Skip to content

Sweep the change set, not only the file you noticed the defect in - #91

Merged
MikeGrier merged 1 commit into
mainfrom
mikegrier/sweep-the-change-set
Sep 14, 2026
Merged

MikeGrier merged 1 commit into
mainfrom
mikegrier/sweep-the-change-set

Conversation

@MikeGrier

Copy link
Copy Markdown
Owner

One sentence, added inside CONTRACT INTEGRITY rule 3.

And sweep the change set, not only the file you noticed it in: when you fix a defect of any kind in one file of a commit, grep the commit's other files for the same defect before committing -- the file you happened to be reading is a sample of your own change too.

What earned it

The review of #90 found two defects that had survived a sweep I had already done.

Peeling a probe onto main brought prose written against an older state. I swept the design notes for links whose targets no longer existed, found three, fixed them -- and committed without asking whether the source files moving in the same commit had the same defect. They did: the module doc named the same absent checklist, and three sites named a queue module that had since been renamed.

Why it goes inside rule 3, not beside it

Rule 3 is the natural home and already says "the reported site is a sample, not the population." But neither half of it fires on this:

rule 3 this case
trigger a change to a stated contract rule a dangling link -- not a contract
population the component and its dependents, by grep the commit in front of you

Two different triggers, two different populations -- so this is a gap rather than a restatement. Landing it as one sentence inside rule 3 keeps a single sweeping rule; two rules about sweeping would be precisely the restatement drift that section exists to prevent.

Deliberately narrow

Worth stating plainly: this is mechanical and cheap, and it would have caught both prose defects in #90.

It would not have caught that review's most valuable finding -- that enabling two non-default features on a workspace member removed the default-features build from CI. That needed a reviewer reasoning about feature unification, and no amount of grepping one's own diff surfaces it.

A narrow win, taken because it is nearly free, not because it addresses the class of thing that cost the most.

Earned by the review of PR #90, where two defects survived a sweep I had
already done.

Peeling a probe onto `main` brought prose written against an older state. I
swept the design notes for links whose targets no longer existed, found three,
and fixed them -- then committed without asking whether the SOURCE FILES moving
in the same commit had the same defect. They did: the module doc named the same
absent checklist, and three sites named a queue module that had been renamed.
A reviewer found both.

CONTRACT INTEGRITY rule 3 is the natural home and already says "the reported
site is a sample, not the population", but neither half of it fires here. Its
trigger is a change to a stated CONTRACT rule, and a dangling link is not one;
its population is the component and its dependents, reached by grep, not the
commit in front of you. So this is a gap rather than a restatement, which is
why it lands as one sentence inside rule 3 rather than as a second sweeping
rule somewhere else -- two rules about sweeping would be exactly the
restatement drift this section exists to prevent.

Deliberately narrow, and worth saying so: this is mechanical and cheap, and it
would have caught both prose defects in that PR. It would NOT have caught the
same review's most valuable finding -- that enabling two non-default features
on a workspace member removed the default-features build from CI -- which
needed a reviewer reasoning about feature unification, and which no amount of
grepping one's own diff would surface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 14, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues remain.

Pull request overview

Adds contributor guidance to sweep all files in a commit for repeated defects.

Changes:

  • Extends CONTRACT INTEGRITY rule 3.
  • Documents change-set-wide defect sweeps.
File summaries
File Description
.github/copilot-instructions.md Adds change-set sweep guidance.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@MikeGrier
MikeGrier merged commit a148bc0 into main Sep 14, 2026
26 checks passed
@MikeGrier
MikeGrier deleted the mikegrier/sweep-the-change-set branch September 14, 2026 20:20
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.

2 participants