131-a-scaffold-can-pin-its-producer
A scaffold can pin its producer
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
depends on
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
- 131: A scaffold can pin its producer
- 1. Purpose
- 2. Territory
- 3. Behavior
- 3.1 The option
- 3.2 The default is unchanged
- 3.3 The facade entry
- 3.4 Documentation
- 4. Out of scope
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.