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 f3cb603a22 v0.10.5: dashboard 'Re-send recent events' button with time-window selector (operator-controlled republish across all streams)
Adds a new dashboard card (4th article on the index) where an operator
picks a time window (5 min / 30 min / 1h / 3h / 6h / 12h / 24h), clicks
Re-send, sees a confirmation modal showing the count of events per stream
that would be replayed, then confirms to re-publish them.

Each replayed message keeps its original subject + raw byte payload but
receives a new Nats-Msg-Id of the form {original}:resend:{ts_epoch_ms}
so JetStream's per-stream deduplication window does NOT silently drop
the replay. Consumers with deliver_policy=new see the messages as fresh;
archive UPSERTs on (id, time) so the events table does not grow.

Stream set is derived from central.streams.STREAMS -- only event_bearing=True
entries are touched (CENTRAL_META is excluded so audit/status messages
are not re-broadcast).

The v0.10.2 publish-time monitoring-area bbox filter is NOT applied here --
the operator is intentionally replaying messages that already passed
through it on their original publish.

Audit log: each completed wave emits a meta-event on
central.meta.action.resend with {operator, window_minutes, count, errors,
started_at, finished_at, elapsed_s, by_stream}. No new stream required
(CENTRAL_META filter already captures it).

Modal flow: inline-swap pattern (style A from step-0 design call), no JS
beyond HTMX. CSRF validated on the POST via the standard form-field
pattern mirroring adapters_edit_submit.

Tests: 12 new in tests/test_resend.py covering preview counts, replay
shape (subject + data preserved, suffix-style msg id), per-stream and
per-message failure tolerance, audit-log meta-event emission, audit-log
failure does not sink the operator-visible result, CENTRAL_META exclusion.

Full suite: 1010 passed / 1 skipped under both zvx and central. Ruff
clean on all touched files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-07 01:41:06 +00:00
docs v0.10.3: rip out state_511_atis adapter (superseded by itd_511 v0.10.0; Castle Rock legacy shape EOL per sister-site discovery) (#88) 2026-06-06 14:44:00 -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.3.1: soft-disable state_511_atis* adapters instead of DELETE (FK blocked v0.10.3 migration) (#90) 2026-06-06 18:39:33 -06:00
src/central v0.10.5: dashboard 'Re-send recent events' button with time-window selector (operator-controlled republish across all streams) 2026-06-07 01:41:06 +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.5: dashboard 'Re-send recent events' button with time-window selector (operator-controlled republish across all streams) 2026-06-07 01:41:06 +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.