run test on phase 24 and 33
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Experiment: Network Partition Mid-Batch
|
||||
Date: 2026-06-24
|
||||
Phase: 24 — Climate Resilience Verification
|
||||
|
||||
## 1. Hypothesis
|
||||
If I disconnect the ward gateway from the central Docker network while it accepts
|
||||
observations, I expect events to buffer locally and fleet status to show DEGRADED,
|
||||
because sync upload cannot reach central until the partition heals.
|
||||
|
||||
## 2. Baseline
|
||||
- Encounter: `0f81a139-9f33-47ad-9df9-09c7a6c011c8`
|
||||
- Gateway status: ONLINE
|
||||
- Gateway buffer depth: 0
|
||||
- Central observation count: 14
|
||||
|
||||
## 3. Break
|
||||
```bash
|
||||
GATEWAY_CONTAINER=$(docker ps -qf name=ward-gateway-api)
|
||||
NETWORK=$(docker network ls --format '{{.Name}}' | grep vigilcare | head -1)
|
||||
docker network disconnect "$NETWORK" "$GATEWAY_CONTAINER"
|
||||
|
||||
curl -X POST "http://localhost:5081/api/v1/encounters/$ENCOUNTER_ID/observations" \
|
||||
-H "Authorization: Bearer $GATEWAY_JWT" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"observationCode":"HEART_RATE","value":165,"unit":"bpm","source":"DEVICE",
|
||||
"recordedAt":"<UTC-now>","idempotencyKey":"partition-exp2-1782245574"}'
|
||||
```
|
||||
|
||||
## 4. Observe
|
||||
- Gateway accepted observation locally (HTTP 201)
|
||||
- Fleet status transitioned to **DEGRADED** (`reportedBufferDepth: 2`)
|
||||
- Gateway DB unsynced buffer count: **2**
|
||||
- Central could not receive the observation during partition
|
||||
- `minutesSinceHeartbeat` remained near zero (gateway process still running)
|
||||
|
||||
## 5. Fix / Outcome
|
||||
- Bug found? **no**
|
||||
- Fix applied: no fix needed — by design
|
||||
|
||||
## 6. Verify
|
||||
(Post-heal results in `2026-06-24-partition-mid-batch-fixed.json`)
|
||||
Reference in New Issue
Block a user