Build #438 slice 0: MapLoader + MapValidator (pure, no DB) #439

Closed
opened 2026-08-20 14:16:57 +00:00 by jared · 1 comment
Owner

Context

Slice 0 of the map-driven runner rebuild (#438). Build MapLoader,
MapValidator, Map/Node/Edge, and InvalidMapError exactly per the approved
interface sketch — the guard manifest — in docs/os-sdlc-rebuild/interface-
sketches.md. Any class, public method, or signature change not in the
sketch: stop and surface before writing.

Parent

#438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md.

What to build

An invalid map raises InvalidMapError with a named defect symbol at load; a valid 2-node toy map loads and answers entry, node, edge_for, terminal?. Pure objects, no database. The approved interface sketch in docs/os-sdlc-rebuild/interface-sketches.md is the guard manifest: any class, public method, or signature beyond it → stop and comment on this ticket, do not write it.

Blocked by

  • None — can start immediately.

Tasks

[ ] TDD in the sketch's stated order, first red: :unknown_edge_target raises
InvalidMapError with a defect symbol
[ ] All six ADR-0133 load-time proofs implemented in MapValidator (pure;
takes a Map, never a path)
[ ] Tests at tests/runner_map_test.rb (outside the DB-gem-gated
tests/runner/), fixtures under tests/fixtures/maps/
[ ] No existing file modified; no maps/ directory (toy map is a fixture)

Acceptance criteria

[ ] Invalid maps raise InvalidMapError < HarnessError carrying the correct
defect symbol per rule (exit-3 contract preserved)
[ ] Routing-only nodes validated via the single default: edge rule (settled
decision D3)
[ ] Valid 2-node toy map loads and answers entry, node, edge_for, terminal?
[ ] instructions/enrich carried as opaque data, unvalidated

Origin

• Trigger: grilling/pre-flight session on #438, 2026-08-20 — user-directed
decomposition into one ticket per slice
• Improvised this session: none
• Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, ADR-0133; sketch
in docs/os-sdlc-rebuild/interface-sketches.md)
• Root candidate: #438 (parent spec)

## Context Slice 0 of the map-driven runner rebuild (#438). Build MapLoader, MapValidator, Map/Node/Edge, and InvalidMapError exactly per the approved interface sketch — the guard manifest — in docs/os-sdlc-rebuild/interface- sketches.md. Any class, public method, or signature change not in the sketch: stop and surface before writing. ## Parent #438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md. ## What to build An invalid map raises InvalidMapError with a named defect symbol at load; a valid 2-node toy map loads and answers entry, node, edge_for, terminal?. Pure objects, no database. The approved interface sketch in docs/os-sdlc-rebuild/interface-sketches.md is the guard manifest: any class, public method, or signature beyond it → stop and comment on this ticket, do not write it. ## Blocked by - None — can start immediately. ## Tasks [ ] TDD in the sketch's stated order, first red: :unknown_edge_target raises InvalidMapError with a defect symbol [ ] All six ADR-0133 load-time proofs implemented in MapValidator (pure; takes a Map, never a path) [ ] Tests at tests/runner_map_test.rb (outside the DB-gem-gated tests/runner/), fixtures under tests/fixtures/maps/ [ ] No existing file modified; no maps/ directory (toy map is a fixture) ## Acceptance criteria [ ] Invalid maps raise InvalidMapError < HarnessError carrying the correct defect symbol per rule (exit-3 contract preserved) [ ] Routing-only nodes validated via the single default: edge rule (settled decision D3) [ ] Valid 2-node toy map loads and answers entry, node, edge_for, terminal? [ ] instructions/enrich carried as opaque data, unvalidated ## Origin • Trigger: grilling/pre-flight session on #438, 2026-08-20 — user-directed decomposition into one ticket per slice • Improvised this session: none • Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, ADR-0133; sketch in docs/os-sdlc-rebuild/interface-sketches.md) • Root candidate: #438 (parent spec)
Author
Owner

Resolution

Done: Built MapLoader, MapValidator, Map/Node/NodeSpec/Edge and InvalidMapError as pure objects with no database dependency. MapValidator implements the six ADR-0133 load-time proofs, each raising InvalidMapError with a named defect symbol. Valid toy map loads and answers entry, node, edge_for, terminal?. instructions/enrich carried opaque.

Evidence: Commit 329a90a on branch build/438-slice-0. Tests: tests/runner_map_test.rb 9 runs, 22 assertions, 0 failures, 0 errors. Full suite: 802 runs, 2056 assertions, 0 failures, 0 errors. Rubocop: 0 offenses across all slice-0 files. Guard manifest honoured: one deviation surfaced and approved by the user, recorded as D8 in docs/os-sdlc-rebuild/interface-sketches.md.

Follow-ups: Two captured as tickets (see below); the :invalid_yaml defect lacks a dedicated test and was noted in the ticket body as optional.

## Resolution **Done:** Built MapLoader, MapValidator, Map/Node/NodeSpec/Edge and InvalidMapError as pure objects with no database dependency. MapValidator implements the six ADR-0133 load-time proofs, each raising InvalidMapError with a named defect symbol. Valid toy map loads and answers entry, node, edge_for, terminal?. instructions/enrich carried opaque. **Evidence:** Commit 329a90a on branch build/438-slice-0. Tests: tests/runner_map_test.rb 9 runs, 22 assertions, 0 failures, 0 errors. Full suite: 802 runs, 2056 assertions, 0 failures, 0 errors. Rubocop: 0 offenses across all slice-0 files. Guard manifest honoured: one deviation surfaced and approved by the user, recorded as D8 in docs/os-sdlc-rebuild/interface-sketches.md. **Follow-ups:** Two captured as tickets (see below); the :invalid_yaml defect lacks a dedicated test and was noted in the ticket body as optional.
jared closed this issue 2026-08-20 15:30:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#439
No description provided.