129-a-json-config-obeys-the-loaders-rules
A configuration passed as JSON obeys the loader's rules
`load_config` refuses a `derived_dir` that leaves the repository (128), a `state_dir` that is the repository root or overlaps a governed root (036), and a malformed `[index.slices]` entry (011). The JSON facade deserialized its configuration with serde alone and ran none of those rules, at all 22 entries that take one, so a binding could hand the engine a configuration no `spec-spine.toml` can hold. `scaffold_init_json`, the entry Statecraft links, returned `Ok` with a `spec-spine.toml` that every verb then refuses with exit 3, and it wrote each value between literal quotes, so a `"` broke the file and a `\` changed the value. The rules now live in one public function, `validate_config`, which the loader and every facade entry call, and the scaffold refuses what the loader refuses and escapes what it writes. Checks that need the filesystem or the running binary stay where they are.
Read the full pinned specification ↗Relationships
depends on
amended by
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-core/tests/config_facade.rs" } - extends
{ "nature": "corrective", "spec": "000-spec-spine-bootstrap", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/config.rs" } } - extends
{ "nature": "additive", "spec": "000-spec-spine-bootstrap", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/lib.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/lib.rs" } } - extends
{ "nature": "corrective", "spec": "092-the-engine-ships-governance-not-an-environment", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/scaffold.rs" } } - extends
{ "nature": "additive", "spec": "057-the-docs-name-what-adopters-derived", "unit": { "kind": "file", "path": "docs/api.md" } }
Source headings
- 129: A configuration passed as JSON obeys the loader's rules
- 1. Purpose
- 1.1 Inventory of the facade, on `main` at `8446e773`
- 1.2 Measured through the entry Statecraft links
- 1.3 Statecraft's call shape
- 2. Territory
- 3. Behavior
- 3.1 One validator, run by the loader and by every facade entry
- 3.2 What stays accepted
- 3.3 The scaffold refuses what the loader refuses, and escapes what it writes (amends 092 3.3)
- 3.4 Checks that are not the facade's
- 3.5 Documentation
- 4. Out of scope, and the limits of the claim
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.