in reviewhumanPR #68Identity
Hackathon/disaster response engineer KumbhNet 2027
Handle: disaster-response-engineer
Author
@akashtalole
github profile →- Status
- In review
- Opened on
- Jul 5
- Branch
- hackathon/disaster-response-engineer-kumbhnet-2027
Description
The pitch.
# KumbhNet — Crowd Safety Protocol Stack for Nashik Kumbh Mela 2027
**Handle:** `disaster-response-engineer`
**Problems:** 4 (auth) · 8 (datafacts) · 9 (privacy) · 10 (coordination) + gossip registry
---
## Motivation
Centralised dashboards fail at Kumbh Mela. The **2003 Nashik disaster** (39 killed at Ramkund in under 15 minutes) and the **2013 Allahabad stampede** (36 dead) both had functioning control rooms — they failed because the *protocols* for sensor agreement, ambulance dispatch, and evacuation authority were informal and unverified.
Kumbh 2027 Nashik (Simhastha) expects **80 million pilgrims** over 45 days — 22.5 million on a single peak Shahi Snan bathing day. Two sacred sites 30 km apart share one mountain road that drops 30–40% of packets under monsoon rain. This is not a dashboarding problem. It is a **distributed agent coordination problem** with Byzantine sensors, killed inter-city connectivity, 7 overlapping authority layers, and 80 million pilgrims whose medical profiles must remain private even if a single MedEvac agent is compromised.
Each KumbhNet plugin replaces a reference stub that would fail a real adversarial Kumbh scenario. Three scenario YAMLs stress-test all five simultaneously.
---
## What was built
### Plugin 1 — `kumbh_bft_coordination` (Problem 10, Coordination layer)
**Threat:** `contract_net` lets one Byzantine zone agent win every round with bid=0, triggering false evacuations at will.
**Implementation:** PBFT-lite with zone-weighted quorum `⌈2n/3⌉ + 1`. At 12 zone agents, f=4 Byzantine agents are tolerated. Kushavart Kund hard-cap bypass: count > 1,900 triggers immediate closure without a vote.
```python
# Structural constraint — not delegated to agent judgment
if zone == _KUSHAVART_ZONE_ID and count > _KUSHAVART_HARD_CAP:
return Outcome(round_id=round.id, winner=AgentId("close"), ...)
needed = (2 * n) // 3 + 1
if yes_count >= needed:
return Outcome(round_id=round.id, winner=AgentId("close"), ...)
```
**Novel invariant:** Byzantine YES minority `f < n/3` cannot force closure even if it submits before honest agents. Votes are deduplicated by zone ID per round.
---
### Plugin 2 — `pilgrim_selective_disclosure` (Problem 9, Privacy layer)
**Threat:** `noop` leaks full pilgrim medical profiles to every agent. A compromised MedEvac agent can read name, address, and ICU history.
**Implementation:** Per-attribute HMAC-SHA256 key isolation. Each attribute (`cardiac_care`, `name`, `zone_id`, …) has its own symmetric key derived from `HMAC-SHA256(sim_secret, attribute_name)`. The master key is never shared — only per-attribute keys are disclosed to role-matched agents.
| Role | Disclosed attributes |
|---|---|
| `medevac` | `cardiac_care`, `diabetes`, `mobility_impaired`, `blood_group` |
| `lostconnect` | `name`, `photo_hash` |
| `police` | `zone_id` |
| `iccc_operator` | `zone_id`, `name` |
| `public` | (none) |
A compromised MedEvac agent cannot learn a pilgrim's name even with full memory access to its token store.
---
### Plugin 3 — `ndrf_capability_delegation` (Problem 4, Auth layer)
**Threat:** Flat JWT RBAC has no expiry tied to operational windows and no revocation cascade. A leaked `zone:close` token remains valid indefinitely.
**Implementation:** HMAC-SHA256-signed delegation chains with scope containment, depth cap (`MAX_DEPTH = 3`), time-bound expiry at `window_end`, and synchronous revocation cascade. Token IDs are SHA-256 hashes of content — not `uuid4()` — so replays are byte-identical.
Authority chain modelled on the actual Indian NDMA hierarchy:
```
District Collector → NDRF Commander → Zone Commander
```
---
### Plugin 4 — `crowd_density_datafacts` (Problem 8, DataFacts layer)
**Threat:** `datafacts_v1` uses `time.time()` — non-deterministic, non-auditable. Post-incident reconstruction cannot prove what an agent knew at a given moment.
**Implementation:** SHA-256 CID (cont
…Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/68/head:pr-68
git checkout pr-68