Skip to content

Encode per-class season windows in tiles and evaluate them per profile token#13

Merged
tylerpearson merged 1 commit into
mainfrom
advisor/005-per-class-windows
Jul 1, 2026
Merged

Encode per-class season windows in tiles and evaluate them per profile token#13
tylerpearson merged 1 commit into
mainfrom
advisor/005-per-class-windows

Conversation

@tylerpearson

Copy link
Copy Markdown
Owner

Executes plans/005-per-class-season-windows.md. Advisor-reviewed: full diff read, 36 vitest + 33 pytest re-run, and the new normalize_feature validated against the real statewide data (46,662 routes; exactly the 2,885 divergent-window routes from the audit get the '(varies by class)' marker; HAY FLAT 10N14H spot-checked — passenger correctly yearlong, OHV classes os_=91/oe_=365).

  • normalize.py emits os_/oe_ only for bounded per-class windows; missing = yearlong
  • legal.ts evaluates each profile token against its own window via coalesce defaults; old tiles degrade gracefully to yearlong-permissive (no hard break between merge and tile rebuild)
  • Post-merge operator step: rebuild + ship tiles (via the data-refresh workflow_dispatch)

🤖 Generated with Claude Code

https://claude.ai/code/session_01HNxgKNjtfeKtxYvN34KbGs

…e token

Each route now carries os_<class>/oe_<class> fields for every permitted,
non-ebike class whose window is bounded (missing means yearlong). isOpen()
evaluates each requested vehicle-profile token against its own window via
coalesce-defaulted MapLibre expressions instead of the route-level
representative window, fixing routes where classes have genuinely
different season windows (e.g. passenger yearlong, motorcycle seasonal).
window_text gets a "(varies by class)" suffix when permitted classes'
parsed windows differ. classPermitted/dateInSeason are removed (folded
into isOpen); representative season/open_start/open_end are kept for
display/back-compat.
@tylerpearson tylerpearson merged commit b5f7dae into main Jul 1, 2026
2 of 3 checks passed
@tylerpearson tylerpearson deleted the advisor/005-per-class-windows branch July 1, 2026 22:31
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.

1 participant