Skip to content

Waypoint→HexCell migration: restore schema ≡ code, empty the adherence DRIFT map#14

Merged
IanMayo merged 2 commits into
mainfrom
claude/waypoint-hexcell
Jun 16, 2026
Merged

Waypoint→HexCell migration: restore schema ≡ code, empty the adherence DRIFT map#14
IanMayo merged 2 commits into
mainfrom
claude/waypoint-hexcell

Conversation

@IanMayo

@IanMayo IanMayo commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Closes the schema↔code drift that the ADR-0029 adherence guard surfaced (now merged to main via #13). The LinkML schema still modelled several persisted shapes as the square-grid Waypoint{x,y}, even though the app went hex (H3) at ADR-0016. This repoints them at the existing HexCell and fixes two non-hex drifts, so the schema describes the real runtime shapes (DEC-57's "schema ≡ code").

What changed (schema source → regenerated)

Shape Was Now
Asset.position, Constraint.cells Waypoint{x,y} HexCell {h3,lat?,lng?}
StartState, TrajectoryPoint {x,y,…} rebuilt on h3 (+lat/lng)
TideDecision +rv_min (chosen route's RV arrival)
Stamp.appetites Appetite[] axis→setting map

The appetites call is the interesting one: Appetite.axis is made the LinkML identifier and Stamp.appetites inlined (not inlined_as_list), so gen-json-schema emits the compact-dict form that validates {tempo:'balanced', exposure:'balanced'} directly. This matches the runtime map without changing the kernel — chosen deliberately over emitting Appetite[], which would have altered the Stamp's canonical bytes and moved every golden plan id (NF3).

Payoff

  • Deletes the documented interim castmain.js's SteeringDelta write no longer casts hex cells as unknown as Waypoint[] (bugs.md); they're HexCells now.
  • The adherence test drops its DRIFT/strip machinery and validates the ORBAT + Plan instances whole. The undeclared-field assertion still proves it catches new drift.

Verification

  • ✅ Regenerate is idempotent + byte-reproducible (the regen-no-diff check passes).
  • 32 unit tests green (adherence now strict, nothing stripped).
  • Golden plan ids unchanged — the schema is validation-only; it never touches the runtime canonical form, so NF3 holds.
  • 0 typecheck errors (the removed cast was the only app coupling).

Waypoint itself is retained (still the generic grid-location type) but is no longer referenced by these persisted shapes. Out of scope (unchanged): the broader "app imports the generated TS" migration (ADR-0012, its own spec).

Recorded as ADR-0030; bugs.md drift entries marked resolved; prose spine §6, key_facts.md + work-log updated.

https://claude.ai/code/session_01EhtBoKXg6bHnKdquacyknf


Generated by Claude Code

Closes the drift the ADR-0029 adherence guard surfaced. The schema still
modelled several persisted shapes as square-grid Waypoint{x,y} though the app
went hex (H3) at ADR-0016. Repoint to the existing HexCell and fix two non-hex
drifts, so the schema describes the real runtime shapes (DEC-57):

- Asset.position, Constraint.cells -> HexCell; StartState, TrajectoryPoint
  rebuilt on h3 (+lat/lng) instead of x/y
- TideDecision gains rv_min (the chosen route's RV arrival)
- Stamp.appetites modelled as an axis->setting map (Appetite.axis identifier +
  inlined dict), matching the runtime map WITHOUT changing the kernel — so the
  golden plan ids are unchanged (NF3; the schema is validation-only)

Payoff: deletes the documented interim unknown->Waypoint[] cast in main.js
(bugs.md resolved), and the adherence test drops its DRIFT/strip machinery — it
now validates ORBAT + Plan instances whole.

Regenerated (idempotent, regen-no-diff green); 32 unit green; golden ids
unchanged; 0 typecheck errors. ADR-0030. Stacked on #13.

https://claude.ai/code/session_01EhtBoKXg6bHnKdquacyknf
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-16 20:37 UTC

@IanMayo IanMayo merged commit 1c4f251 into main Jun 16, 2026
5 checks passed
@IanMayo IanMayo deleted the claude/waypoint-hexcell branch June 16, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants