mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
Central - data hub spine. Adapters -> NATS/JetStream -> archive.
- Python 88.6%
- HTML 9.4%
- CSS 1.2%
- Shell 0.6%
- PLpgSQL 0.2%
Same defect/fix as v0.14.3, applied to the sibling wfigs_perimeters adapter.
The dedup key was the bare attr_IrwinID, so a perimeter published once on first
observation and every later geometry refinement was silently deduped at the
supervisor's published_ids gate. Latent until perimeters actually refine.
Fix (one line, wfigs_perimeters.py:292):
id = f"{irwin_id}:{props.get('attr_ModifiedOnDateTime_dt')}". Each genuine
upstream refinement mints a new id and republishes; identical re-polls (same
modified time) still dedup. attr_ModifiedOnDateTime_dt is already read (it's
already mapped into event.data) -- no new field, no new event type, no subject
change, no migration. Note the prefixed field name (attr_*), unlike incidents.
Tests (extend tests/test_wfigs.py, new TestWFIGSPerimetersUpdatePropagation,
mirrors the v0.14.3 incidents matrix via a parallel _perimeter_response helper):
- unchanged perimeter dedups across polls (regression guard)
- modified perimeter republishes with a distinct id (the load-bearing proof)
- subject_for unchanged -> central.fire.perimeter.<state>.<county>
- None attr_ModifiedOnDateTime_dt -> deterministic ':None', no crash (no
monkeypatch needed: perimeters has no recency filter)
Updated the v0.14.3 scope-canary assertion (test_wfigs.py:688) for the new key
shape -- scope is perimeters this time.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| docs | ||
| etc-templates | ||
| scripts | ||
| sql | ||
| src/central | ||
| systemd | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| CHANGELOG.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
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.