073-a-mode-only-or-binary-change-is-a-change
A mode-only or binary change is a change
`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
depended on by
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
- 073: A mode-only or binary change is a change
- 1. Purpose
- 1.1 The parser reads spans and infers membership from them
- 1.2 Git prints no header for two real change shapes
- 1.3 The workaround already in the tree
- 1.4 Why the name list is the authority for membership
- 2. Territory
- 3. Behavior
- 3.1 The union
- 3.2 Deletion is read from the status letter
- 3.3 One git invocation shape
- 3.4 What a whole-file entry means to the clearance rules
- 3.5 `--paths-from` is unaffected
- 3.6 The refusal this adds
- 3.7 The tests
- 4. Out of scope
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.