Skip to content

🤖 fix: DRY gate and marker edge cases from the gauntlet stack review #7212

Closed

Description

@ThomasK33

Codex found three P2 edge cases in the DRY gate (scripts/dry/dryer_report.py, #7147) and one in the accept markers (scripts/crap/markers.py, #7149) on the merge-from-main heads. Both gates only warn unless DRY_MODE or MUTATION_MODE is block.

  1. Replacement overflow (thread PRRT_kwDOPxxmWM6vRk3j on 🤖 feat: DRY gate (make dry-check, Quality / DRY) on unclebob/dryer #7147): replaced_line() clamps head lines past base_count to the last base line. A replacement hunk that grows (a function rewritten plus a new copy) gives the new copy the old function as its counterpart, so its pair with a third function stays quiet. Fix: map only the first min(base_count, head_count) lines by position; treat the rest as added.
  2. Same-file reorder (thread PRRT_kwDOPxxmWM6vRk3n on 🤖 feat: DRY gate (make dry-check, Quality / DRY) on unclebob/dryer #7147): moving a function within one file gives a pure deletion and a pure addition, so the moved form has no counterpart and its old pairs report again. Fix: match a pure-addition form against removed forms of the same path (one to one) before calling it new. Cross-file moves stay untracked (the documented limit).
  3. Multiline JSX marker (thread PRRT_kwDOPxxmWM6vRi2T on 🤖 feat: accept markers and block mode for the DRY and mutation gates #7149): {/*\n * mutation-equivalent: reason\n */} leaves { and } on code lines, so reason() misses the marker. Fix: treat a jsx_expression whose only child is a comment as comment-only on all its lines.

Each fix needs a test that fails before it. Owner: ThomasK33. Trigger: before DRY_MODE or MUTATION_MODE is set to block.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $61.08

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 25, 2026
    eec8d1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions