073-a-mode-only-or-binary-change-is-a-change

A mode-only or binary change is a change

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`couple` builds its `DiffInput` by parsing `git diff --no-color -U0 --no-renames`, and registers a path only when it meets a `---` or `+++` header. Git prints neither for a mode-only change (`old mode` / `new mode`) nor for a binary change (`Binary files a/x and b/x differ`), so both arrive at the gate as no change at all: an owned binary can change without its spec and `C-001` stays silent, and a mode flip on an unclaimed source file is invisible to `C-002`. Spec 071 met the same blindness while building `delta`, worked around it with a `--name-only` helper, and recorded in D-9 that `couple` is spec 005's territory. This spec unions the name list into the parsed diff: a path git reports and the hunk parser did not register enters `DiffInput` as a whole-file change with no spans, deleted when the status letter says so, and is then judged by the same clearance rules as every other path.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "corrective",
      "spec": "005-coupling-gate",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_couple.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "071-a-change-is-classified-under-the-bases-rules",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_couple.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "029-ownership-coverage",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_couple.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "005-coupling-gate",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/tests/couple.rs"
      }
    }

Source headings

  1. 073: A mode-only or binary change is a change
  2. 1. Purpose
  3. 1.1 The parser reads spans and infers membership from them
  4. 1.2 Git prints no header for two real change shapes
  5. 1.3 The workaround already in the tree
  6. 1.4 Why the name list is the authority for membership
  7. 2. Territory
  8. 3. Behavior
  9. 3.1 The union
  10. 3.2 Deletion is read from the status letter
  11. 3.3 One git invocation shape
  12. 3.4 What a whole-file entry means to the clearance rules
  13. 3.5 `--paths-from` is unaffected
  14. 3.6 The refusal this adds
  15. 3.7 The tests
  16. 4. Out of scope
  17. 5. Resolved decisions
  18. Verification

Frozen anchors

No frozen anchors declared.