Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c9a944b
Merge main (v0.17.0) back into dev
stevenpickles Nov 30, 2026
6be8e85
Merge pull request #368 from stevenpickles/back-merge/v0.17.0
stevenpickles Nov 30, 2026
3b9ca7a
docs: data-revision atomicity; upgrade waits on /ready
stevenpickles Nov 30, 2026
4429b84
docs: gate frontend start on /ready, precise DDL wording, roadmap cri…
stevenpickles Nov 30, 2026
008408d
docs: print READY in the upgrade block; split failure cases
stevenpickles Nov 30, 2026
03d103d
feat(map): bring the aircraft into view from every selection path
stevenpickles Nov 30, 2026
6dcbded
docs(roadmap): mark slice 129 merged
stevenpickles Nov 30, 2026
1ee063f
fix(feeders): read readsb's lossy Beast-output warning as degraded, n…
stevenpickles Nov 30, 2026
97cb9ef
feat(api): map read-pool exhaustion on /api/v1 to 503 read_pool_exhau…
stevenpickles Nov 30, 2026
0d788b8
chore(roadmap): mark slice 127 merged
stevenpickles Nov 30, 2026
9aa3439
chore(roadmap): mark slice 123 merged
stevenpickles Nov 30, 2026
718e574
fix(map): keep the deep-link focus from being undone by the receiver …
stevenpickles Nov 30, 2026
4028453
feat(metadata): scheduled metadata updates every 30 days
stevenpickles Nov 30, 2026
d0b07fd
feat(settings): show the next automatic metadata update
stevenpickles Nov 30, 2026
5730df8
docs(feeders): amend ADR-0017 and 077 design for the Beast-output kin…
stevenpickles Nov 30, 2026
0e5295a
fix(api): let a busy read pool through T0's broad catch; harden slice…
stevenpickles Nov 30, 2026
0a7e73a
fix(alerts): rare-type counts include airframes heard since the last …
stevenpickles Nov 30, 2026
bd9231e
docs: rare-type counts have one definition and two readers
stevenpickles Nov 30, 2026
eaa3b27
chore(roadmap): mark slice 128 merged
stevenpickles Nov 30, 2026
637a090
docs: SPEC §27 owner amendment and ADR-0021 for scheduled metadata up…
stevenpickles Nov 30, 2026
359a160
chore(roadmap): mark slice 131 merged
stevenpickles Nov 30, 2026
2a29ff8
Merge pull request #370 from stevenpickles/130-migration-atomicity-re…
stevenpickles Nov 30, 2026
ec6416c
Merge origin/dev into 129-focus-every-selection-path
stevenpickles Nov 30, 2026
7f38d9c
docs(metadata): record the owner's confirmation that the first import…
stevenpickles Nov 30, 2026
3196f1f
Merge origin/dev into 131-scheduled-metadata-updates
stevenpickles Nov 30, 2026
8540c5a
fix(metadata): idle flag survives a re-read; rare-type review follow-ups
stevenpickles Nov 30, 2026
1ff4f9c
fix(metadata): keep sources imported together in one scheduled run
stevenpickles Nov 30, 2026
740f692
docs(metadata): note a source may run up to 24 h early when coalesced
stevenpickles Nov 30, 2026
cb9c1c1
Merge pull request #371 from stevenpickles/129-focus-every-selection-…
stevenpickles Nov 30, 2026
8aa2d46
Merge origin/dev into 127-beast-output-lossy-lines
stevenpickles Nov 30, 2026
a9e47e7
Merge pull request #372 from stevenpickles/127-beast-output-lossy-lines
stevenpickles Nov 30, 2026
4a5436f
Merge origin/dev into 123-read-pool-exhaustion
stevenpickles Nov 30, 2026
2063e00
Merge pull request #373 from stevenpickles/123-read-pool-exhaustion
stevenpickles Nov 30, 2026
7aedade
Merge origin/dev into 128-rare-type-live-counts
stevenpickles Nov 30, 2026
ba99e6a
Merge pull request #378 from stevenpickles/128-rare-type-live-counts
stevenpickles Nov 30, 2026
7ab9eae
Merge origin/dev into 131-scheduled-metadata-updates
stevenpickles Nov 30, 2026
a2a6d32
Merge pull request #379 from stevenpickles/131-scheduled-metadata-upd…
stevenpickles Nov 30, 2026
61a7f4f
chore(release): v0.18.0 — version bumps, lockfile refresh, changelog,…
stevenpickles Nov 30, 2026
fec1f4e
docs(release): v0.18.0 changelog fixes per Fable review
stevenpickles Nov 30, 2026
1d8018c
ci: temporary Firefox axe crash repro (#383)
stevenpickles Nov 30, 2026
46e7ac3
ci: temporary repro round 2 (#383)
stevenpickles Nov 30, 2026
a3d4f2e
fix(e2e): pin Playwright 1.64.1 to stop Firefox axe page crashes
stevenpickles Nov 30, 2026
8664684
ci: temporary proof run on the pinned Playwright (#383)
stevenpickles Nov 30, 2026
9b6d6c3
chore(roadmap): slice 132 merged; drop the temporary repro workflow
stevenpickles Nov 30, 2026
6feed31
Merge pull request #387 from stevenpickles/132-firefox-axe-crash
stevenpickles Nov 30, 2026
c0b0adc
Merge origin/dev (slice 132) into release/v0.18.0
stevenpickles Nov 30, 2026
fd46b2e
docs(release): v0.18.0 changelog and release theme include slice 132 …
stevenpickles Nov 30, 2026
129c8d8
docs(release): v0.18.0 changelog — the Playwright 1.65 crash wording …
stevenpickles Nov 30, 2026
8fbb463
docs(release): rewrap the v0.18.0 Playwright bullet
stevenpickles Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ updates:
# @types/node tracks the Node 24 runtime; lift with the next LTS move.
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
# Playwright 1.65.x ships Firefox build 1572 (Firefox 159), whose content
# process segfaults when `ariaLabelledByElements` is read from both the
# page (axe-core) and Playwright's isolated world (a named getByRole):
# Mozilla bug 2090055, microsoft/playwright#43967 and #44135, fixed by
# microsoft/playwright#43982 for 1.66 (issue #383, roadmap slice 132).
# 1.64.1 (Firefox 157) is pinned until then. Remove this rule when
# Dependabot offers 1.66.0, and take that bump only once the Firefox
# axe scans in e2e pass on it.
- dependency-name: "@playwright/test"
versions: [">= 1.65.0, < 1.66.0"]
groups:
# @playwright/test is pinned exactly and must stay in lockstep with the
# container image in .github/workflows/visual.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# different browser builds. scripts/visual.mjs fails the run if the
# installed Playwright and this image disagree.
container:
image: mcr.microsoft.com/playwright:v1.65.1-noble
image: mcr.microsoft.com/playwright:v1.64.1-noble
# Chromium's default 64 MB /dev/shm is too small for the full-page
# screenshots of the Analytics and Receiver pages.
options: --ipc=host
Expand Down
116 changes: 116 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,122 @@ follows [Keep a Changelog](https://keepachangelog.com/); versions follow
[Semantic Versioning](https://semver.org/) (`0.x.y` during pre-1.0 development).
This file is updated only on release branches (see `docs/RELEASE.md`).

## [0.18.0] — 2026-11-30

Metadata that keeps itself current, and feeder status you can believe after a restart.
FlightSite now runs "Update Aircraft Metadata" on its own every 30 days (an owner
amendment to SPEC §27). ADS-B Exchange and AeroDataBox no longer show as offline after a
backend restart because of a routine readsb warning. "Locally rare type" rules stop
matching every airframe of a newly heard type. Every way of selecting an aircraft on the
Live Map now brings it into view, and a full read pool answers with a clear, retryable 503
instead of a 500. The end-to-end suite no longer crashes in Firefox. No database migration.

### Added
- **Scheduled metadata updates** (SPEC §27 owner amendment, 2026-11-30; ADR-0021): each
metadata source is updated automatically once its last successful update is older than
`metadata.auto_update_days` (new optional setting; default 30, `0` turns it off, otherwise
7–365). There is no Settings control yet (#381), so edit `config.yaml` and restart the
backend to change it.
- Sources that fall due within a day of each other are updated together in one run, so a
source may be updated up to 24 h before the date shown for it. A failing source that is
waiting out its back-off does not join.
- The first import of each source stays manual, so a fresh or offline install never
starts a download nobody asked for.
- A failed source is retried after 24 h, then weekly once it has been overdue a week.
- Nothing starts in the first 30 minutes after the backend starts.
- A run is skipped, with one Activity entry a day, when the volume holding the data
directory (`/opt/flightsite/data`) has less than 2 GiB free.
- Never in demo mode.
- Settings shows the next automatic update, overall and for each source. Activity marks
automatic and skipped runs. A manual update and an automatic one never run at once.
- **`read_pool_exhausted`** (roadmap 123; ADR-0020 amended): when every read connection is
busy, an `/api/v1` request now waits at most 5 s for each read and then answers `503` with
error code `read_pool_exhausted` and `Retry-After: 5`, instead of failing after 30 s with
an unmapped 500. The pages retry it as before. Background work keeps the long wait.
Events are counted as `read_pool_exhaustions` in `/api/v1/health` and diagnostics.
`/api/v1/receiver` and the "Since T0" views answer the same way rather than treating a
busy pool as an unknown T0.

### Fixed
- **ADS-B Exchange and AeroDataBox shown as offline after a restart** (#369): readsb's
periodic "Bad connection, dropping data (connection lost N% of data)" warning was read as
a disconnect, so after a restart those feeds showed down, Health went Degraded and two
"Feed offline" self-alerts were raised, until readsb next reconnected.
- Only readsb's real connect and disconnect lines now decide whether a Beast output is
connected; the wording is taken from readsb's own source.
- The warning can only mark a feed degraded: when it is at most 15 minutes old and reports
at least 1.0% lost. It never marks a feed down. readsb counts that figure over the
connection's whole life, so the message says "N% lost since it connected".
- An unrecognised readsb line keeps the previous status and is logged once as a warning.
- **"Locally rare type" rules matched every airframe of a newly heard type** (#364): the
per-type airframe count was refreshed only at start-up and after a metadata import.
- The count for a type is now re-read whenever a new airframe of that type is saved, and
the rule waits until the count includes it.
- This runs only while an enabled rule has a rare-type condition, so installs without one
pay nothing.
- No rule on the reference install uses a rare-type condition, so no data clean-up is
needed.
- **Selecting an aircraft did not always bring it into view** (#362): picking one from the
Interesting list, cycling with the keyboard, or opening a `?selected=` link now moves the
map to it. Interesting-list rows and keyboard cycling move the map only when the aircraft
is off screen; on a phone, the area under the bottom sheet counts as off screen.
Clicking a marker still only selects it.
- A `?selected=` link opened on a fresh page load is no longer pulled back to the
receiver when the configuration arrives.

### Documentation
- **Upgrade check** (#366): `docs/INSTALL.md` §8.1's backend-first upgrade waits on
`/api/v1/health`, then checks `/api/v1/ready` once. It starts the frontend only when that
answers 200, and says what to do after a failed migration or a failed integrity check.
- `docs/DEVELOPMENT.md` explains when a data-only Alembic revision is atomic and asks each
one to carry a rollback test.
- ADR-0017 and the Feeders page design note how Beast-output lines are now read.
`docs/DATA_MODEL.md` records that `aircraft` rows are never deleted.

### Development
- New end-to-end spec `04-selected-deep-link-focus` checks that a `?selected=` link brings
the aircraft into view.
- The end-to-end suite's Playwright is pinned to 1.64.1 (#383, slice 132). Under
Playwright 1.65, Firefox crashes when an accessibility scan and Playwright both read an
element's ARIA references (Mozilla bug 2090055), which failed the Receiver and Health
scans intermittently. Playwright 1.64 does not read them that way, so it does not
trigger the crash. Dependabot skips 1.65.x; the fix arrives with Playwright 1.66.

### Upgrade notes
- No migration; a plain `docker compose pull && docker compose up -d` is enough. Taking a
backup first is still recommended.
- **Automatic metadata updates are on by default** (every 30 days) for sources you have
imported at least once.
- An install whose metadata is older than that starts its first automatic update about
30 minutes after the backend starts. It runs the same import as the Settings button,
so expect the same download size and run time.
- FlightSite now contacts the metadata sources (and OpenSky, if you enabled and imported
it) on its own; `docs/SECURITY.md` lists them.
- To keep updates manual, set `metadata.auto_update_days: 0` in `config.yaml` and restart
the backend. Do this on an install with no internet access: otherwise every due source
fails once a day for a week and weekly after that, each failure adding an Activity
entry and turning Health's metadata section Degraded.
- `read_pool_exhaustions` is a new counter in `/api/v1/health` and diagnostics.
- The host SDR watchdog's version moves to 0.18.0 with FlightSite but its code is
unchanged; re-running its installer is optional.

### Known issues
- #309: TypeScript 7 waits for typescript-eslint support.
- #374: on desktop, an aircraft hidden under the detail or Interesting panel counts as in
view, so keyboard cycling does not move the map to it.
- #375: the Beast-output loss figure covers the connection's whole life, not a current
rate.
- #376: readsb's DNS-failure lines are not matched, and "Ignoring this DNS reply" warns at
every retry.
- #377: diagnostics reports a busy read pool as "database unreachable".
- #380: Aircraft detail: the type count on a newly heard type reads 0 until the next
metadata load (the alert rule itself is fixed).
- #381: there is no Settings control for the automatic-update interval; edit `config.yaml`
and restart.
- #382: the Mictronics and routes downloads are held in memory while they are imported.
- #386: the Settings metadata-sources loading placeholder carries an `aria-label` without a
role; the Settings accessibility scan can flag it if it runs before the status loads.

## [0.17.0] — 2026-11-29

Alerts you can trust again, and list queries that cannot run away. The "First-ever
Expand Down
2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "flightsite"
version = "0.17.0"
version = "0.18.0"
description = "FlightSite backend: self-hosted ADS-B observatory API and ingestion service."
readme = "README.md"
requires-python = ">=3.12,<3.13"
Expand Down
7 changes: 7 additions & 0 deletions backend/src/flightsite/activity/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ class ImportOutcome:
rows_rejected: int = 0
dataset_version: str | None = None
error: str | None = None
#: The scheduler started the run, not a person (slice 131, ADR-0021).
automatic: bool = False
#: The automatic run was skipped before it began; ``error`` says why.
skipped: bool = False
#: Every source a skipped run would have updated. A skip is one outcome
#: for the whole run (``source`` is these names joined), not one per source.
sources: tuple[str, ...] = ()


@dataclass(frozen=True, slots=True)
Expand Down
27 changes: 19 additions & 8 deletions backend/src/flightsite/activity/producers.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,27 @@ def import_events(outcomes: Iterable[ImportOutcome]) -> ActivityBatch:
``interesting`` rather than ``info`` so the feed can lift it, and the
``error`` carried is the importer's own short reason — these sources are
unauthenticated public datasets, so it holds no credential to leak.

Slice 131 adds ``automatic`` — the scheduler started the run (ADR-0021) —
and ``skipped``: an automatic run that was due but did not start, with
the reason in ``error`` and ``ok`` false. A skip is one event for the
whole run: its ``source`` is the due sources joined with ``", "`` and its
payload adds the list as ``sources``. Additive per ``docs/API.md`` §6.
"""
events: list[NewActivityEvent] = []
for outcome in outcomes:
payload: dict[str, Any] = {
"source": outcome.source,
"ok": outcome.ok,
"rows_imported": outcome.rows_imported,
"rows_rejected": outcome.rows_rejected,
"dataset_version": outcome.dataset_version,
"error": outcome.error,
"automatic": outcome.automatic,
"skipped": outcome.skipped,
}
if outcome.skipped:
payload["sources"] = list(outcome.sources)
events.append(
NewActivityEvent(
type=ActivityEventType.METADATA_UPDATED,
Expand All @@ -550,14 +568,7 @@ def import_events(outcomes: Iterable[ImportOutcome]) -> ActivityBatch:
ActivityEventType.METADATA_UPDATED.value, outcome.source, outcome.finished_ms
),
severity=Severity.INFO if outcome.ok else Severity.INTERESTING,
payload={
"source": outcome.source,
"ok": outcome.ok,
"rows_imported": outcome.rows_imported,
"rows_rejected": outcome.rows_rejected,
"dataset_version": outcome.dataset_version,
"error": outcome.error,
},
payload=payload,
)
)
return ActivityBatch(events=tuple(events))
Expand Down
18 changes: 18 additions & 0 deletions backend/src/flightsite/activity/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,22 @@ async def record_import(self, run: ImportRun) -> None:
service's own transaction, so a feed failure can never turn a
successful import into a failed request.
"""
if run.skipped:
# Slice 131: a skipped automatic run is one piece of news — "the
# update did not happen, and why" — not one failure per source.
names = tuple(result.source for result in run.results)
self._pending_imports.append(
ImportOutcome(
source=", ".join(names),
ok=False,
finished_ms=run.finished_ms,
error=run.results[0].error if run.results else None,
automatic=True,
skipped=True,
sources=names,
)
)
return
for result in run.results:
self._pending_imports.append(
ImportOutcome(
Expand All @@ -355,6 +371,8 @@ async def record_import(self, run: ImportRun) -> None:
rows_rejected=result.rows_rejected,
dataset_version=result.dataset_version,
error=result.error,
automatic=run.automatic,
skipped=run.skipped,
)
)

Expand Down
Loading
Loading