128-a-derived-tree-stays-in-its-repository
A derived tree stays in its repository
`[layout] derived_dir` is read from the committed `spec-spine.toml`, and nothing checked where it pointed. `derived_dir = "../outside"`, an absolute path, or `x/../../outside` made `compile`, `index` and `attest` write their shards outside the repository and prune `*.json` files there, all with exit 0, on `main` and on spec 127's build. Spec 127 checks every component below the repository root for links, and stops where a path leaves the root (its D-4), so it did not reach this. A `derived_dir` that is absolute, carries a `..` segment, or uses a Windows path form is now refused when the configuration is loaded, before any verb reads or writes, and the checked writer refuses any path that is not wholly below its root. A repository reached through a link still works.
Read the full pinned specification ↗Relationships
depends on
depended on by
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-cli/tests/derived_dir_contained.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/tests/config.rs" } } - extends
{ "nature": "corrective", "spec": "022-index-sharding", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/shard.rs" } }
Source headings
- 128: A derived tree stays in its repository
- 1. Purpose
- 1.1 Measured, on spec 127's build (`84c4731e`, over `main` at `f6afdc61`)
- 1.2 Found by reading: Windows path forms
- 2. Territory
- 3. Behavior
- 3.1 A `derived_dir` names a directory inside the repository
- 3.2 Every verb that loads the configuration refuses it
- 3.3 The checked writer refuses a path not wholly below its root (amends 127)
- 4. Out of scope, and the limits of the claim
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.