Gate level detection on UUID folder-name shape
Only lowercase-hex 8-4-4-4-12 folder names are lane/card candidates; anything else is a stray — skipped with a distinct warning, never descended, never able to fail-fast a load. UUID-shaped folders keep the prior contract (missing index skips, malformed frontmatter fail-fasts). Design resolution from the Redesign board. +5 tests. Claude-Session: https://claude.ai/code/session_018BjQRYBR6jQja3jCRi5S3A
This commit is contained in:
@@ -9,10 +9,13 @@ import Foundation
|
||||
|
||||
/// The immutable identity of a lane or card folder: its exact name, byte-for-byte.
|
||||
///
|
||||
/// Folder names are lowercase UUIDv4 by convention (01-storage-format.md § Fractal layout ▸
|
||||
/// Rules) — "lowercase UUIDv4, immutable, never renamed" — but the model stores whatever the
|
||||
/// folder is actually named. It must round-trip byte-perfect (it is the primary key) and is
|
||||
/// the display-order tie-break (`Ranks.sortedForDisplay`). Deliberately **not** Foundation's
|
||||
/// Folder names are lowercase UUIDv4, gated at load time (01-storage-format.md § Fractal
|
||||
/// layout ▸ Rules, "Name shape gates level detection") — `BoardLoader` only ever promotes a
|
||||
/// UUID-*shaped* folder (lowercase hex, `8-4-4-4-12`; version/variant nibbles unchecked) to a
|
||||
/// `Lane`/`Card` in the first place, so every `ItemID` reaching this type already has that
|
||||
/// shape. The model still stores whatever the folder is actually named rather than
|
||||
/// re-validating or normalizing it: it must round-trip byte-perfect (it is the primary key) and
|
||||
/// is the display-order tie-break (`Ranks.sortedForDisplay`). Deliberately **not** Foundation's
|
||||
/// `UUID`, which normalizes to uppercase and would silently corrupt that round-trip.
|
||||
///
|
||||
/// Board roots don't get one of these: a board's folder name is a human/Finder-assigned
|
||||
|
||||
Reference in New Issue
Block a user