Skip to content

The >50-deleted-lines do-not-auto-merge heuristic misfires on extraction refactors, test migrations, and generated artifacts #124

Open

Description

@dmccoystephenson

The gap

Phase 8's scope gate treats a large deletion count as a signal that a human should look at the change. The heuristic is sound for its intended target (a PR quietly removing behaviour) but it has no exemption for the common cases where a large deletion count is structurally meaningless:

  • Extraction refactors — lines move out of one file into a new module. The deletion count is large; the net behaviour change is zero.
  • Test migrations — a suite is ported to a new runner or fixture style. Deletions are large and entirely mechanical.
  • Generated artifacts — regenerating a lockfile, a vendored bundle, or a generated doc can delete hundreds of lines that no human should be reading line by line.

The result is that instances doing legitimate cleanup work stall on a human gate that carries no information, which trains the operator to wave the gate through — weakening it for the case it actually exists to catch.

Reported independently by: asn1c-dev-loop#7, foodspoilage-dev-loop#8, repo-quality-dashboard-dev-loop#4, parpt-dev-loop#7, kreatures-dev-loop#1.

Suggested resolution

Keep the ceiling, but make it measure net removal rather than raw deletions, and name the exemptions:

The deletion ceiling applies to net removed lines. A diff whose deletions are matched by additions elsewhere in the same PR (an extraction refactor, a file rename, a test migration) does not trip the gate. Paths that are generated rather than authored — lockfiles, vendored trees, generated documentation — are excluded from the count entirely; list them in the instance's generated-paths set at generation time.

Requiring the instance to record its own generated-paths set during Step 2 keeps the exemption honest, rather than letting a cycle decide case by case that its own deletions do not count.


drafted by Claude on behalf of Daniel Stephenson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    template-ruleShould be promoted into create-dev-loop.md

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions