Phase 1 of the decision surface (01 ▸ Malformed input, settled
2026-07-31): BoardLoadFailure aggregates the walk's defects in walk
order — stop-at-first retires. Environmental failures (unreadable root,
not-a-directory) stay immediate single-defect throws: there is no walk
to collect from. A defective root index is recorded and the walk
continues into the children (nothing in the walk consults the parsed
root document — verified); a defective lane, card, or trash-entry index
records and skips its subtree, Re-check's whole-walk re-aggregation
being the designed loop for what hides beneath. load(skipping:) is the
per-open skip channel: a skipped path's item is omitted from the model
and surfaces as LoadWarning.userSkipped; root paths are unskippable by
construction. The reload-breakage banner carries the aggregate ("…and
N more"), single-defect sentences byte-identical to before. Two new
multi-defect fixture boards; suite 2591 green.
Claude-Session: https://claude.ai/code/session_01CqjXB7ASoWtbyoGod68k97
6.7 KiB
Fixture boards
Golden fixture boards for the storage-contract test suite — real on-disk folder trees, not inline strings, so the same fixtures can later drive XCUITests via the --open-board launch hook.
Bundled into the unit-test target as a folder reference (see project.yml). Valid boards live under Valid/, fail-fast cases under Malformed/. Tests live in KanbanTests/FixtureBoardTests.swift.
Hidden fixture files are named .hidden-* rather than .DS_Store: the repo's .gitignore ignores .DS_Store everywhere, so a fixture spelled that way would exist on the authoring machine and vanish from a fresh clone. The loader's rule is .skipsHiddenFiles — it is about the leading dot, not the name.
Lane/card folder names are fixed literal lowercase-UUIDv4-shaped strings (never generated at test time), chosen so their lexicographic order matches the expected tie-break order — usually a leading digit (10000000-..., 20000000-..., …) so folder order reads the same as array-index order in the tests. That is a fixture-authoring convention, not the loader's gate: the identity predicate is shape-only (8-4-4-4-12 hex, any case, any version — 01-storage-format.md § Fractal layout ▸ Rules), and the case/version coverage lives in KanbanTests/BoardLoaderTests.swift rather than here.
Valid/ — one board per tolerated/valid case
| Board | Case |
|---|---|
rich-board.kanban |
A full-breadth well-formed board: 2 lanes, 3 cards, bodies, styling (background/icon/iconColor/width), unknown + reserved frontmatter keys, attachments/ and comments/ with real content. Its attachments/ also carries all four listing shapes — two ordinary files, a hidden one, and a subfolder with a file — so Card.attachments' flat rule (01-storage-format.md § Attachments) is asserted against a real tree. Also the board every index.md in the tree is round-tripped against. |
interrupted-create.kanban |
The motivating skip-not-error case: a UUID-shaped lane folder and a UUID-shaped card folder, each with no index.md yet (folder created, write not yet landed). |
non-uuid-strays.kanban |
Non-UUID-shaped folders at both lane and card depth, with and without index.md — name shape gates candidacy before the file is ever read. |
stray-files.kanban |
Stray (non-directory) files at board, lane, and card level — never level candidates, never warned about. The card-level one (scratch.md) is also the loose-file carve-out's golden case: tolerated everywhere else, it is reported in LoadResult.looseCardFiles for the app to relocate into attachments/ (01-storage-format.md § Fractal layout ▸ Rules, settled 2026-07-28). Detection is read-only, so the file stays put on disk. |
tombstones.kanban |
A tombstoned lane and a tombstoned card, both still on disk and still in the snapshot, flagged (isDeleted) rather than removed. Also proves a tombstoned lane doesn't recursively flag its own un-deleted children. |
duplicate-order-tie-break.kanban |
Three cards sharing one order in one lane, and two lanes sharing one order — both broken by folder name, ascending. |
unknown-key-order.kanban |
Unknown/reserved frontmatter keys interleaved with schema-owned ones at board, lane, and card level — document.unknownFields must preserve exactly the order they were written in. |
coercion.kanban |
Lenient-field coercion and fallback: wrong-type scalars that coerce (title: 2048, iconColor: 42, background: 12345, width: "3") versus ones with no sensible reading that fall back to the default (title: [a, b], background: {x: 1}, width: 1.5), plus a deleted with an unusable timestamp that still tombstones. |
duplicate-top-level-keys.kanban |
A top-level key written twice — at board, lane (the strict order field), and card level. Last occurrence wins; not a fail-fast case (settled, newer than the original card text). Round-tripped to prove the earlier occurrence survives on disk, invisible only to reads. |
board-level-deleted.kanban |
A board-level deleted: key — legal per the frontmatter table but meaningless; ignored + warned, rest of the board loads normally. |
optional-keys.kanban |
order and schema optional below the board root (re-ruled 2026-07-31). One lane holds a ranked card plus every order-less shape — no key, an explicit null, order: banana, order: .nan — which all read as append-at-end in folder-name order; the strip holds a ranked lane, a schema-less one, and an order-less one. Also the golden case for the minimum agent card: a card whose whole frontmatter is a title. |
Malformed/ — one board per fail-fast case
Each board is minimal: one broken thing. The two multi-defect boards at the bottom are the deliberate exceptions — they exist precisely because the loader collects rather than stops (01-storage-format.md § Malformed input, settled 2026-07-31), which is a claim no one-broken-thing board can make.
| Board | Case |
|---|---|
unparseable-yaml.kanban |
An unterminated flow sequence in the board's frontmatter. |
missing-schema.kanban |
Board root index.md has no schema key — the root only; below it a missing schema reads as 1 (Valid/optional-keys.kanban). |
schema-newer-than-app.kanban |
Board root schema: 2, newer than BoardLoader.supportedSchema. |
board-root-missing-index.kanban |
The board root folder itself has no index.md. |
many-defects.kanban |
The collect-all board. A root with no schema, a card with schema: 2, and a lane whose frontmatter will not parse — three fail-fast classes on one board, reported as one BoardLoadFailure in walk order (root, then lanes by folder name with their cards inside them). The broken lane also holds a broken card, which is deliberately not in the aggregate: a broken lane takes its subtree with it, and the repair's re-check is what reveals what it was hiding. Two further lanes load fine, which is what proves the walk kept going. |
skippable-defects.kanban |
The skip channel's board. many-defects.kanban minus the root defect — the root is never skippable, so a board whose defects are all skippable must have an intact root. Skip both (the newer-schema card and the unparseable lane) and it opens: without them, without the broken lane's own perfectly valid card (the subtree goes too), and with a LoadWarning.userSkipped per skip as the loud mark the opened board's notice is written from. |
The four order boards that used to live here — missing-order-lane, missing-order-card, explicit-null-order, non-numeric-order — were retired on 2026-07-31, when order became optional below the board root. Their shapes all live on in Valid/optional-keys.kanban as coercion cases.