Merge branch 'main' into feat/typed-ai-chat

This commit is contained in:
manjunath22466 committed 2026-11-03 22:02:28 +05:30
commit 9d4d7b3ee0
28 files changed
+1320 -218

No files matched your search

+59 -12
View File
@@ -1235,12 +1235,12 @@ addition to the locally accumulated trail, never a promise of complete coverage.
Snapshot coverage, completeness and freshness are separate fields. A partially
admitted aircraft snapshot retains absent contacts for up to five minutes before
the usual missed-poll eviction. An OpenSky row with an ICAO24 address but null
longitude and latitude is a contact without a position, not a malformed row: it
leaves the snapshot complete and is listed in `retainIds`, so civil flights
retain that aircraft under the same five-minute bound, unless it is likely
landed, while other absent aircraft fade and leave on the missed-poll limits. A
nonempty snapshot with no positioned rows is still malformed. Military readsb
admission is unchanged. Unknown snapshot times remain unknown in stats. An invalid nonempty
longitude and latitude, or a readsb row with a hex but no `lat`/`lon`, is a
contact without a position, not a malformed row: it leaves the snapshot complete
and is listed in `retainIds`, so civil and military flights retain that aircraft
under the same five-minute bound, unless it is likely landed, while other absent
aircraft fade and leave on the missed-poll limits. A nonempty snapshot with no
positioned rows is still malformed. Unknown snapshot times remain unknown in stats. An invalid nonempty
snapshot retains the previous display. Empty vessel refreshes retain the existing
first-connect grace and warm-data behavior. Known source failures have bounded
messages; arbitrary HTTP response bodies are not surfaced as diagnostics.
@@ -3312,9 +3312,15 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with
> first later successful fetch. Smaller chunks reduce timeout risk; complete
> camera batches still wait for their sequential requests, and unresolved
> placement continues to use the existing prior until real heights arrive.
> - **Overpass cache admission:** `/api/overpass` refuses cross-site and forwarded
> POSTs through the shared local-request gate, then limits requests to 300/min
> per socket peer and 900/min globally before reading or validating bodies.
> - **Overpass cache admission:** `/api/overpass` refuses cross-site POSTs
> through the keyless same-site gate (reverse-proxy forwarding headers are
> admitted, as for `/api/terrain/heights`), then limits requests to 300/min
> per peer — IPv6 peers keyed by /64 — and 900/min across all remote peers
> before reading or validating bodies. Direct loopback (no forwarding
> headers) has its own 300/min window outside that global; a local reverse
> proxy's requests carry forwarding headers and are counted as remote, keyed
> `proxied:<socket peer>`, so they cannot spend the owner's window. Upstream
> quota stays shared, so owner cache misses can still hit 429.
> Tag-filter brackets are scanned once; nested or unmatched brackets return 400.
> It then checks fresh memory, identical in-flight work, and fresh disk entries
> before invoking its separate local 90/min upstream limiter. Cache and
@@ -4754,8 +4760,9 @@ programmatic activation do not trigger this reveal.
Radio directory admission is atomic on both sides of the proxy boundary. A
refresh is healthy only when it reaches the minimum accepted-query and station
coverage; schema-valid responses with zero normalized stations count as failed
queries rather than inflating refresh health. Each specialist query also needs
coverage from broad/specialist queries; their schema-valid responses with zero
normalized stations count as failed queries rather than inflating refresh health.
Optional priority-country outcomes do not gate catalog health. Each specialist query also needs
an accepted station whose normalized tags match that requested category; rows
tagged only for another category remain usable catalog data but do not earn
specialist health credit. A partial cold result remains
@@ -5748,7 +5755,7 @@ pins and share links already supply complete boxes.
- Fleet model eligibility is distance-based with on-screen priority and hard caps (`MODEL_MAX`, `MODEL_MAX_ALL`) to avoid draw-call explosions. Each model owns its own `modelMatrix`; shared scratch matrices are forbidden because they caused stacking/flicker.
- Tracked aircraft use standalone model primitives driven from the already-settled dead-reckoned display position, while the tracked Cesium entity remains billboard-backed so `viewer.trackedEntity` always has a ready bounding sphere.
- Flights and military layers mirror the same tracking invariants: no warm-up freeze/jump, altitude-scaled framing, trail head glued to the displayed plane, no pull-out when switching targets, and no cross-layer orphan when switching between commercial and military tracks.
- Regression surface: `npm run test:track` drives the real app headless with synthetic aircraft feeds and asserts the tracking invariants without depending on live OpenSky/adsb data. Arrival-rotation checks observe the first reveal within a bounded wall-clock window before the one-second idle fallback, rather than assuming the 80 ms fleet cadence fits inside four rendered frames; an incorrect first orientation fails immediately. `src/data/trackedModelRegime.test.mjs` pins the tracked contact's threshold math, the enter/exit asymmetry, and the default-on / cockpit / TR-3B / deselect wiring in both layers.
- Regression surface: `npm run test:track` drives the real app headless with synthetic aircraft feeds and asserts the tracking invariants without depending on live OpenSky/adsb data. Arrival-rotation checks observe the settle frame and then the first reveal frame, each within a 500 ms wall-clock budget that sits inside the one-second idle fallback, rather than assuming the 80 ms fleet cadence fits inside four rendered frames; an incorrect first orientation fails immediately. Only an inconclusive timeout is retried (once); a timeout keeps every angle it measured (the settle frame before a reveal timeout, and the late frame itself, which is read before the deadline check), so a measured wrong angle fails without retry. `src/data/trackedModelRegime.test.mjs` pins the tracked contact's threshold math, the enter/exit asymmetry, and the default-on / cockpit / TR-3B / deselect wiring in both layers.
### TR-3B conversion Easter egg (August 2026)
@@ -6356,6 +6363,46 @@ Existing catalog validation, category filters, tuning and voice playback behavio
remain unchanged. Audio connects directly to the broadcaster after an explicit
play action; the source does not relay or record streams.
### Radio priority-country coverage
Optional `RADIO_PRIORITY_COUNTRIES` is a server-owned comma-separated list of
up to eight ISO alpha-2 codes (for example `IN,PL`). Restart after changing it.
The `UK` alias is canonicalized to `GB` before deduplication and querying.
It needs no API key and adds no POWER UP entry. An empty list preserves the
existing global/tag-based directory. Invalid configuration fails at startup.
Each country adds one Radio Browser search capped at 200 rows, with existing
HTTPS/geolocation/codec validation and an additional matching-country check.
Up to 40 unique accepted stations per country are seeded before the specialist
tag queries and global popularity fill, within the unchanged 750-station cap.
No country gets exhaustive coverage. A valid, in-limit country response with
zero eligible stations succeeds with zero selected stations.
The response's `coverage.priorityCountries` reports accepted query status and
selected counts when configured. The existing broad/specialist health policy
still applies separately. Country outcomes are advisory: failed, malformed or
oversized country queries report unsuccessful coverage but cannot degrade or
block admission of an otherwise healthy global catalog. Queries share the existing
three-worker pool, single-flight refresh and 45-minute cache.
Structurally malformed rows are skipped and counted in the upstream
`rejectedStationCount` diagnostic; mixed country responses retain their valid
rows, while an entirely malformed nonempty country response reports unsuccessful
coverage. The diagnostic does not block catalog admission.
For every installation, including those with no priority countries configured,
at most three mirrors are tried per request; fallback mirrors beyond the first
three candidates are not attempted. Failed or partial catalog refreshes retry
after one minute, so a cold-start failure can continue returning 503 for that
minute even if upstream recovers sooner. Healthy catalogs retain the 45-minute
cache. The seven-day last-good expiry and known-station-only click reporting
remain in force.
Validation: `node --test src/data/radioProxy.test.mjs` covers configuration,
country quotas under global popularity pressure, duplicate records, concurrency,
cache reuse, country mismatch/oversize/empty/ineligible responses, failure isolation on cold
and warm refreshes beyond seven days, and retry/backoff recovery both with and
without configured countries. `node scripts/qa-radio.mjs --url http://localhost:4173` covers the existing
750-station browser presentation and playback contract.
## Local RTL-SDR and Local ADS-B
The Radio panel holds a Local RTL-SDR card below internet radio. One browser