077-one-hash-one-construction-one-name

One hash, one construction, one name

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`registry show` prints `contentHash: <h> (sha256 of this spec.md)`, and approved spec 048 §3.4 says the same thing in prose: "`contentHash` is SHA-256 over that spec's `spec.md` alone". It is neither. The value is the shard hash, which is SHA-256 over the repo-relative POSIX path, a NUL, and the normalized bytes, so for `specs/069-.../spec.md` the printed value is `a4a0098235e9...` while the digest of the file's bytes is `ae0144ca7e4a...`, the value `attest --spec` reports as `specSourceHash`. 048 §3.3 exists for consumers who reimplement the normalization to pin against the ledger, and one adopter does exactly that, so a gloss naming the wrong construction is the whole defect. This spec amends 048 §3.4 to state the construction the code has always used, makes the printed line say it, and adds the test that pins both digests so the two cannot drift again.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "corrective",
      "spec": "048-the-ledger-answers-what-consumers-rebuild",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_registry.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "048-the-ledger-answers-what-consumers-rebuild",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/tests/cli.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/Cargo.toml"
      }
    }

Source headings

  1. 077: One hash, one construction, one name
  2. 1. Purpose
  3. 1.1 The measurement
  4. 1.2 The approved prose says it too
  5. 1.3 Who the gloss is for, and what it costs them
  6. 2. Territory
  7. 3. Behavior
  8. 3.1 The construction, stated once and correctly
  9. 3.2 The printed line names the construction it prints
  10. 3.3 The unframed digest has a name already, and keeps it
  11. 3.4 The pin
  12. 3.5 Documentation
  13. 4. Out of scope
  14. 5. Resolved decisions
  15. Verification

Frozen anchors

No frozen anchors declared.