Skip to content

Copy the airports generation script to buiild#5

Merged
cwdaniel merged 1 commit into
mainfrom
docker-build-airport-copy
Apr 9, 2026
Merged

Copy the airports generation script to buiild#5
cwdaniel merged 1 commit into
mainfrom
docker-build-airport-copy

Conversation

@cwdaniel

@cwdaniel cwdaniel commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix three code review issues: ICAO case normalization, stale watchlist cleanup, and tile-boundary sampling
  • Fix airports.json missing from Docker image causing situation-api to crash-loop
  • Fix airports unit test to not depend on generated data file (fixes CI)

Changes

  • ICAO normalization (src/situation/ws/aviation.ts): Normalize watchlist ICAOs to uppercase before storing subscriptions, so downstream Redis keys (situation:airport:KORD,
    sismember) match regardless of client casing
  • Stale watchlist cleanup (src/situation/index.ts): syncWatchlist now diffs the Redis watchlist against active WS subscriptions and calls removeFromWatchlist for airports
    with no connected clients, preventing unbounded growth
  • Tile boundary sampling (src/situation/sampling/route-sampler.ts): When a neighborhood sample crosses a tile boundary, load adjacent tiles and sample from the correct one
    instead of discarding out-of-bounds pixels. Fast path (single tile) preserved for the common case
  • Docker build (docker/Dockerfile): Generate airports.json at build time via generate-airports.ts so the situation-api container can start
  • CI fix (tests/unit/situation/airports.test.ts): Mock bundled airport data instead of reading from filesystem, so tests pass without the generated file

@cwdaniel cwdaniel merged commit 4ddd573 into main Apr 9, 2026
1 check passed
@cwdaniel cwdaniel deleted the docker-build-airport-copy branch April 9, 2026 05:33
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