Waypoint→HexCell migration: restore schema ≡ code, empty the adherence DRIFT map#14
Merged
Conversation
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
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the schema↔code drift that the ADR-0029 adherence guard surfaced (now merged to
mainvia #13). The LinkML schema still modelled several persisted shapes as the square-gridWaypoint{x,y}, even though the app went hex (H3) at ADR-0016. This repoints them at the existingHexCelland fixes two non-hex drifts, so the schema describes the real runtime shapes (DEC-57's "schema ≡ code").What changed (schema source → regenerated)
Asset.position,Constraint.cellsWaypoint{x,y}HexCell{h3,lat?,lng?}StartState,TrajectoryPoint{x,y,…}h3(+lat/lng)TideDecisionrv_min(chosen route's RV arrival)Stamp.appetitesAppetite[]axis→settingmapThe appetites call is the interesting one:
Appetite.axisis made the LinkMLidentifierandStamp.appetitesinlined(notinlined_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 emittingAppetite[], which would have altered the Stamp's canonical bytes and moved every golden plan id (NF3).Payoff
main.js'sSteeringDeltawrite no longer casts hex cellsas unknown as Waypoint[](bugs.md); they'reHexCells now.DRIFT/strip machinery and validates the ORBAT + Plan instances whole. The undeclared-field assertion still proves it catches new drift.Verification
Waypointitself 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