028-registry-freshness-check

Registry freshness: `spec-spine compile --check`

Lifecycle approvedImplementation completeVerification unknownQualification unknown

The committed spec-registry shard tree had no freshness gate. `index check` (spec 004) covers only the codebase-index tree, and `compile` is a validation gate that rewrites the shards without ever asserting the committed copies matched, so editing a spec.md and forgetting to recompile lands stale shardHash values with CI green (this is what PR #61 did to specs 016 and 021). This spec adds `spec-spine compile --check`: a non-writing gate that compiles in memory and compares the result byte-for-byte against the committed shards, exiting 2 on staleness exactly as `index check` does. It closes the registry/index asymmetry with a first-class command rather than a repo-local git tree check, so every adopter that commits its registry gets the same guarantee spec-spine gets.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/compile.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/cmd_compile.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/lib.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-cli/src/main.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "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-core/tests/compile.rs"
      }
    }

Source headings

  1. 028: Registry freshness check
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 3.1 `spec-spine compile --check`
  6. 3.2 Exit codes
  7. 3.3 Output
  8. 3.4 Determinism
  9. 3.5 Relationship to the existing gates
  10. 3.6 Tests (minimum)
  11. 4. Out of scope

Frozen anchors

No frozen anchors declared.