Central - data hub spine. Adapters -> NATS/JetStream -> archive.
  • Python 88.6%
  • HTML 9.4%
  • CSS 1.2%
  • Shell 0.6%
  • PLpgSQL 0.2%
Find a file
zvx-echo6 3440b161e7 v0.10.2.1: drop broken incremental where-clause in wfigs adapters (use where=1=1)
Pre-existing bug surfaced by v0.1.2's two supervisor restarts in 12 minutes.
Not a v0.10.2 regression.

Both wfigs adapters used an incremental time filter that silently returned 0
features on every poll after the first:

- wfigs_incidents queried where=ModifiedOnDateTime > timestamp '<last_poll>' --
  but the upstream WFIGS layer renamed the column to ModifiedOnDateTime_dt
  (epoch ms). ArcGIS treated the clause as not-matching.

- wfigs_perimeters queried where=attr_ModifiedOnDateTime_dt > timestamp '<last_poll>'
  -- correct field name, but the column is epoch ms integer, not SQL timestamp,
  so the comparison never matched.

In both adapters the fall-off detector then interpreted the empty result as
'all previously observed fires fell off' and emitted tombstones for every
IRWINID it had observed -- including Summit Creek (1924-acre Idaho WF, 85%
contained at 6/5/26). _last_poll_time was in-memory-only, so every supervisor
restart triggered exactly one valid where=1=1 poll, then broke again.

Fix: drop the incremental branch in both adapters; use where=1=1 every poll.
wfigs_observed + published_ids already de-duplicate the full page, so re-
fetching every poll is correct and idempotent. The vestigial _last_poll_time
state goes too.

Deploy plan (separate, after merge):
  sudo systemctl stop central-supervisor
  sudo -u central sqlite3 /var/lib/central/cursors.db \
    "DELETE FROM published_ids WHERE adapter IN ('wfigs_incidents', 'wfigs_perimeters');"
  sudo systemctl start central-supervisor

Tests: 1029 passed / 1 skipped under both zvx and central. +4 wfigs regression
tests covering where=1=1 invariance + _last_poll_time absence on both adapters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-06 07:55:36 +00:00
docs v0.10.0: ITD 511 official API adapter (events + advisories + cameras) (#85) 2026-06-03 22:36:26 -06:00
etc-templates scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
scripts scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
sql v0.10.0: ITD 511 official API adapter (events + advisories + cameras) (#85) 2026-06-03 22:36:26 -06:00
src/central v0.10.2.1: drop broken incremental where-clause in wfigs adapters (use where=1=1) 2026-06-06 07:55:36 +00:00
systemd feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
tests v0.10.2.1: drop broken incremental where-clause in wfigs adapters (use where=1=1) 2026-06-06 07:55:36 +00:00
.gitattributes chore: normalize line endings to LF 2026-05-16 22:26:12 +00:00
.gitignore feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
.python-version foundation: models, adapter ABC, config, CE wire, schema 2026-05-15 21:08:56 +00:00
CHANGELOG.md docs: add v0.3.0 changelog entry and network bindings reference (#29) 2026-05-18 14:26:09 -06:00
LICENSE scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
pyproject.toml v0.10.0: ITD 511 official API adapter (events + advisories + cameras) (#85) 2026-06-03 22:36:26 -06:00
README.md docs: add test database setup, restore geom to test fixture 2026-05-17 18:26:48 +00:00
uv.lock v0.10.0: ITD 511 official API adapter (events + advisories + cameras) (#85) 2026-06-03 22:36:26 -06:00

Central

Central is the data hub spine for the infrastructure. Adapters normalize upstream sources into a canonical event shape, publish CloudEvents to NATS/JetStream, and archive to TimescaleDB for historical query. Single-LXC deployment.

Status

Phase 0 — scaffold. Not yet operational.

Architecture

  • Python 3.12 (uv-managed)
  • NATS + JetStream for live event bus
  • TimescaleDB + PostGIS for archive and geospatial query
  • One supervisor process managing adapter lifecycle
  • One archive consumer process persisting events to TimescaleDB
  • Both processes systemd-managed

Testing

See docs/test-database.md for test database setup.

License

MIT. See LICENSE.