Skip to content

check-uuid-v7: only the LAST UUID on a line is checked (<v4> <v7> passes) #1079

Description

@hyperpolymath

Defect

scripts/check-uuid-v7.sh extracts one UUID per matching line with a greedy sed -nE 's/.*(UUID).*/\1/p'. The leading .* is greedy, so only the last UUID on a line is checked. Any earlier UUID on the same line is never examined.

Reproduction (measured 2026-09-30)

line content rc
<v4> <v7> 0, the v4 passes unseen
<v7> <v4> 1, caught

Acceptance criteria

  • Every UUID literal on a line is checked, e.g. with grep -oEi in place of the single sed capture.
  • scripts/tests/uuid-v7-test.sh gains a <v4> <v7> same-line case that expects exit 1. The fixture must be assembled at runtime, as the existing ones are.
  • That case is red against the current script and green after the fix. That pairing is the mutant proof.

Found while writing #1078.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WPSJ7fBhVAMcpSffCBWUDo

Activity

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

    priority:p2Normal - queue itscope:estateAffects many or all repos across the estate

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions