131-a-scaffold-can-pin-its-producer

A scaffold can pin its producer

Lifecycle approvedImplementation completeVerification unknownQualification unknown

Statecraft writes the `spec-spine.toml` that `scaffold_init_json` returns byte for byte, and that file pins nothing: the `[meta]` header and the key are both commented out (055 §3.4), and the example is a caret range. A repository Statecraft initializes is therefore judged by whatever binary a hook finds. This spec adds an opt-in scaffold option, `pinExactVersion`, that emits an active `[meta]` table with `required_version = "=<this producer's version>"`, through a new facade entry `scaffold_init_opts_json(config_json, options_json)` and its Rust form `scaffold_init_opts`. Without the option the output is byte-identical to `scaffold_init_json`'s, measured against 0.25.0 for Statecraft's configuration and the default. The configuration is validated exactly as 129 requires, and an unknown option is refused rather than silently producing an unpinned file.

Read the full pinned specification ↗

Relationships

Claimed units

  • establishes
    {
      "kind": "file",
      "path": "crates/spec-spine-core/tests/scaffold_pin.rs"
    }
  • extends
    {
      "nature": "additive",
      "spec": "092-the-engine-ships-governance-not-an-environment",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/scaffold.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "001-compile-registry",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/lib.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "129-a-json-config-obeys-the-loaders-rules",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/tests/config_facade.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "129-a-json-config-obeys-the-loaders-rules",
      "unit": {
        "kind": "file",
        "path": "docs/api.md"
      }
    }

Source headings

  1. 131: A scaffold can pin its producer
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 3.1 The option
  6. 3.2 The default is unchanged
  7. 3.3 The facade entry
  8. 3.4 Documentation
  9. 4. Out of scope
  10. 5. Resolved decisions
  11. Verification

Frozen anchors

No frozen anchors declared.