Dam Safety Telemetry System (DSTS)
Description
Dam Safety Telemetry System (DSTS): A Universal Framework for Evidentiary Hydrologic Verification The Dam Safety Telemetry System (DSTS) constitutes the canonical software and evidentiary implementation of the Universal Framework for Sediment, Scour, and Internal Erosion Risk in Hydroelectric Dams. Developed as part of the doctoral dissertation A Universal Framework for Sediment, Scour, and Internal Erosion Risk in Hydroelectric Dams — Systems Modeling and Application to the Medog Hydropower Station, DSTS integrates the methodologies of Harvard Law School’s foreseeability doctrine and the MIT School of Engineering’s reproducibility standards into a unified system of computational accountability. Architecturally, DSTS establishes a complete telemetry and verification chain extending from field sensor acquisition to legal evidentiary record, ensuring that every hydraulic, geotechnical, and ecological data point is both scientifically reproducible and legally discoverable. Each observation is encoded as a Universal Telemetry Packet (UTP)—a machine-verifiable JSON schema containing deterministic metadata (packet ID, station ID, timestamp UTC, payload hash, firmware signature)—and linked through a SHA-256 hash chain to preserve evidentiary continuity. For MIT, DSTS represents a benchmark in reproducible systems engineering: - Modular architecture (Edge → Core → Audit → UI) enabling deterministic data flow; - Verifiable software supply chain through containerized deployments and SBOM-signed builds; - Probabilistic calibration algorithms aligned with USACE and ISO 9001 traceability standards. For the Harvard Law perspective, DSTS transforms foreseeability into an enforceable legal construct. By rendering risk data immutable, time-stamped, and cross-verifiable, it fulfills the standard articulated in Corfu Channel (United Kingdom v. Albania) (1949 I.C.J. 4): that a state bears responsibility for hazards it knew—or ought to have known—and for failing to act upon verifiable knowledge. DSTS thus bridges engineering certainty and juridical accountability, ensuring that data integrity is no longer advisory but compulsory. Appendix G of the dissertation serves as the Technical Manual for DSTS, defining its operational subsystems, data contracts, calibration manifests, and hash-chain verification protocols. It codifies how the DSTS enforces the Foreseeability Doctrine through open, machine-readable telemetry chains, providing a reference model that any sovereign authority may deploy to satisfy both domestic dam-safety mandates and international legal obligations under the no-harm principle. Through DSTS, law and engineering converge: the system stands as the first operational embodiment of evidentiary hydrologic verification—a paradigm where duty of care is measurable, reproducibility is enforceable, and truth is computationally demonstrable.
Files
Steps to reproduce
Prereqs Linux/macOS (WSL2 ok). Docker ≥ 25, Compose ≥ 2.25, Python 3.11+, Node 18+, PostgreSQL 15, Redis. Optional (k8s): kubectl + Helm 3.14. Clone repository: git clone <repo> dsts && cd dsts pip install -U pip==23.1.2 npm i -g npm@10 1 . Build Environment Create `.env` with Postgres credentials. GIT_SHA=$(git rev-parse HEAD) docker build -t dsts-core:$GIT_SHA -f docker/core/Dockerfile . docker build -t dsts-edge:$GIT_SHA -f docker/edge/Dockerfile . docker build -t dsts-audit:$GIT_SHA -f docker/audit/Dockerfile . 2 . Local Compose Stack Minimal `docker-compose.yml`: Postgres + Redis + Edge/Core/Audit containers. docker compose up -d curl -sf http://localhost:8082/health 3 . Seed Reference Schemas and Drivers curl -X POST http://localhost:8082/admin/schemas -d @data/schemas.json curl -X POST http://localhost:8082/admin/drivers -d @data/drivers.json 4 . Send Telemetry Packet curl -X POST http://localhost:8081/telemetry \ -H 'Content-Type: application/json' \ -d @sample_utp.json Verify in Core: curl http://localhost:8082/telemetry?station_id=DAM-MEDOG-001 5 . Audit Seal & Verification curl -X POST http://localhost:8083/audit/seal -d '{"date":"2025-03-21"}' curl http://localhost:8083/audit/verify?date=2025-03-21 6 . Testing & Security Checks pytest -q && coverage run -m pytest && coverage report --fail-under=90 bandit -r . && safety check -r requirements.txt 7 . Replay Scenario (Medog 2025) python tools/replay.py --dataset data/medog_2025.nc --seed 3245879 \ --out outputs/medog_2025.nc sha256sum outputs/medog_2025.nc Compare hash to `docs/expected_hashes.json`. 8 . Generate Evidence Bundle python tools/make_evidence_bundle.py \ --station DAM-MEDOG-001 --range 2025-03-21T00:00Z,2025-03-21T23:59Z \ --out bundles/EBM-20250321.json python tools/verify_bundle.py bundles/EBM-20250321.json 9 . Front-End Dashboards cd ui/operator && npm ci && npm run dev cd ../policy && npm ci && npm run dev Confirm live FoS graphs and policy exports. 10 . Optional Helm Deployment helm upgrade --install dsts-core helm/dsts-core \ --namespace dsts --create-namespace --set image.tag=$GIT_SHA Verification Criteria - All services healthy. - Telemetry record visible and hash-verified. - Daily audit seal passes. - Replay output hash matches reference. - Evidence bundle and policy dashboards valid.