127-a-derived-file-is-where-its-path-says
A derived file is where its path says
Spec 126 made every file name derived from a spec id one plain name, so an id can no longer walk a write out of its directory. Two ways past that remained. A symbolic link committed inside the derived tree (git records it like any file) made `compile`, `index` and `attest` write through it and prune `*.json` files wherever it pointed, all with exit 0. And a name that passes 126's lexical rule can still name a Windows device (`CON.json`, `nul.tar.json`), which is not a file at all there. Every path below the repository root that these verbs write, create, remove or prune is now checked for a link before anything moves, a device name is refused on every platform, and a refusal leaves the tree exactly as it was. A repository reached through a link still works.
Read the full pinned specification ↗Relationships
depended on by
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-cli/tests/derived_symlinks.rs" } - extends
{ "nature": "additive", "spec": "022-index-sharding", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/shard.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_compile.rs" } } - extends
{ "nature": "corrective", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_index.rs" } } - extends
{ "nature": "corrective", "spec": "039-per-spec-attestation", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_attest.rs" } }
Source headings
- 127: A derived file is where its path says
- 1. Purpose
- 1.1 Measured, on `main` at `f6afdc61` (spec 126 merged)
- 1.2 Found by reading: a plain name can still be a device
- 2. Territory
- 3. Behavior
- 3.1 What is checked: every component below the repository root
- 3.2 A link refuses the whole run
- 3.3 The preflight covers every output of the run
- 3.4 Directories are created one level at a time
- 3.5 A plain file name is not a device name (amends 126 3.1)
- 3.6 A package slug stays plain
- 4. Out of scope, and the limits of the claim
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.