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 822d4c93e8 v0.10.5.1: fix inactive_threshold unit (seconds, not nanoseconds) — silent verification failure
v0.10.5 passed int(30e9) to ConsumerConfig(inactive_threshold=...)
thinking the value was already in nanoseconds. nats-py treats the field
as float SECONDS and multiplies by 1e9 internally before sending to the
server. The server received 30e18 -- out of int64 range -- and rejected
the consumer creation with err_code=10025 ("invalid JSON: json: cannot
unmarshal number 30000000000000000000 into Go struct field
ConsumerConfig.config.inactive_threshold of type time.Duration").

preview_resend caught the per-stream exception and returned 0 across
every stream. The operator saw "0 events" in the modal regardless of
window. No data corruption, no error popup, just a silent feature
failure caught during the v0.10.5 live verification.

Fix: rename _INACTIVE_THRESHOLD_NS -> _INACTIVE_THRESHOLD_S and set
value to 30.0 (float seconds). One callsite updated. Module comment
explains the unit confusion for future maintainers.

Regression guard: tests/test_resend.py gains
test_pull_subscribe_inactive_threshold_within_nats_range -- captures the
config kwarg passed to pull_subscribe on a real resend call, asserts the
threshold is in [1, 3600] seconds AND its nanosecond-equivalent fits in
int64. The exact v0.10.5 bug (int(30e9)) would trip both assertions.
This was the test gap that let v0.10.5 ship -- _mk_js's MagicMock
swallowed any config shape without validating it.

Full suite: 1011 passed / 1 skipped (was 1010; +1 regression guard).
Ruff clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-07 01:50:35 +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.1: fix inactive_threshold unit (seconds, not nanoseconds) — silent verification failure 2026-06-07 01:50:35 +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.1: fix inactive_threshold unit (seconds, not nanoseconds) — silent verification failure 2026-06-07 01:50:35 +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.