129-a-json-config-obeys-the-loaders-rules

A configuration passed as JSON obeys the loader's rules

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`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

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

  1. 129: A configuration passed as JSON obeys the loader's rules
  2. 1. Purpose
  3. 1.1 Inventory of the facade, on `main` at `8446e773`
  4. 1.2 Measured through the entry Statecraft links
  5. 1.3 Statecraft's call shape
  6. 2. Territory
  7. 3. Behavior
  8. 3.1 One validator, run by the loader and by every facade entry
  9. 3.2 What stays accepted
  10. 3.3 The scaffold refuses what the loader refuses, and escapes what it writes (amends 092 3.3)
  11. 3.4 Checks that are not the facade's
  12. 3.5 Documentation
  13. 4. Out of scope, and the limits of the claim
  14. 5. Resolved decisions
  15. Verification

Frozen anchors

No frozen anchors declared.