066-an-attestation-covers-the-territory-it-claims

An attestation covers the territory it claims

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`attest_spec` hashes a unit by opening each resolved location with `read_to_string`. Several unit spellings resolve to a directory rather than to a file, so the read fails with `Is a directory` and the verb exits 3: fourteen of this corpus's eighty-three specs cannot be attested at all, and the failure arrives as an I/O error rather than as a verdict. The dominant spelling is not the obvious one: thirteen of the fourteen are plain `file` units whose path is a subtree (`npm/`, `.claude/skills/`), which spec 000 4.2 defines as resolving identically to an explicit `directory` unit. Spec 039 3.1 already states what should happen, that `units` carries "the content hash of what it resolved to" for every owning unit, without qualifying by kind, so this spec changes nothing 042 requires and supplies the implementation that sentence never had. A directory-resolved location is walked instead of opened: every file beneath it, pruned by `index.resolver_exclusions` and `layout.state_dir` through the indexer's existing walker, folded into the same path-sorted `hash::content_hash` construction the file units already use. The walk is deliberately not extension-filtered, because the coverage universe's source extensions would hash zero files for a markdown-only directory such as `.claude/agents/` and emit a confident hash over nothing. A directory that walks to no files at all hashes its own path as a single piece, so an empty claim cannot attest as SHA-256 of the empty input, a constant every empty claim would otherwise share. No previously emitted payload changes value, because every spec this reaches could not produce one.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "additive",
      "spec": "021-ledger-seal",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/attest.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "021-ledger-seal",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/tests/attest.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "004-codebase-index",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/index.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/tests/cli.rs"
      }
    }

Source headings

  1. 066: An attestation covers the territory it claims
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 3.1 Every owning unit that resolves MUST attest a content hash
  6. 3.2 A directory-resolved location is walked, under one exclusion policy
  7. 3.3 A directory that walks to no files hashes its own path
  8. 3.4 Determinism, and what a recompute mismatch means
  9. 3.5 What must keep working
  10. 4. Out of scope
  11. 5. Resolved decisions
  12. Verification

Frozen anchors

No frozen anchors declared.