=== VERIFY command: npx vitest run src/miniapps/tunnelsafety --reporter=verbose ===

 RUN  v5.1.0 /home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave1


 ❯ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx [queued]

 Test Files 0 passed (2)
      Tests 0 passed (0)
   Start at 14:29:58
   Duration 201ms

 ❯ src/miniapps/tunnelsafety/TunnelMap.test.tsx 1/1
 ❯ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx [queued]

 Test Files 0 passed (2)
      Tests 1 passed (1)
   Start at 14:29:58
   Duration 401ms
 ✓ src/miniapps/tunnelsafety/TunnelMap.test.tsx > TunnelMap (visual QA regression - plan todo 58) > keeps every node's label-anchor position clear of the SVG viewBox edges 29ms

 ❯ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx 1/7

 Test Files 1 passed (2)
      Tests 2 passed (8)
   Start at 14:29:58
   Duration 601ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (QA happy path - hazard report reroutes the live map/feed) > shows a reported hazard in the feed and reroutes the map around it 105ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (QA happy path - hazard report reroutes the live map/feed) > resolving a hazard removes its route closure and restores the direct path 58ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (QA happy path - hazard report reroutes the live map/feed) > accepts a new hazard report submitted through the real form and reflects it in the feed without any mocked write path 61ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (accelerometer corroboration badge - plan todo 4) > renders a Sensor-corroborated badge once a hazard report carries corroborating accelerometer samples 24ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (accelerometer corroboration badge - plan todo 4) > does not render a corroboration badge for a report with no accelerometer samples 23ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (accessible-route toggle - plan todo 4) > reroutes around the stair corridor when the accessible-route toggle is checked 22ms
 ✓ src/miniapps/tunnelsafety/TunnelSafetyScreen.test.tsx > TunnelSafetyScreen (QA failure path - no hazards reported) > renders an honest no-hazard empty state rather than a fabricated/placeholder hazard 11ms

 Test Files  2 passed (2)
      Tests  8 passed (8)
   Start at  14:29:58
   Duration  755ms (environment 40%, tests 34%, import 16%, transform 6%, setup 3%, worker 1%)

=== Supplementary: src/lib tunnelrouting.test.ts + tunnelsafety.test.ts (same lib files changed; includes the append()+readAll() round-trip proof test) ===
VERIFY command: npx vitest run src/lib/tunnelrouting.test.ts src/lib/tunnelsafety.test.ts --reporter=verbose

 RUN  v5.1.0 /home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave1


 ❯ src/lib/tunnelsafety.test.ts [queued]

 Test Files 0 passed (2)
      Tests 0 passed (0)
   Start at 14:30:05
   Duration 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (happy path - reroutes around a closed segment) > takes the direct A-B-C path when nothing is closed 2ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (happy path - reroutes around a closed segment) > reroutes to the correct shortest alternate when the direct segment is closed 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (happy path - reroutes around a closed segment) > accepts a Set for closedSegmentIds equivalently to an array 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (failure path - every path closed) > honestly reports no route rather than returning a closed path 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (failure path - every path closed) > reports no route between nodes that were never connected 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > computes the identical correct route with the accelerometer signal entirely absent 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > computes the identical correct route with the accelerometer signal explicitly disabled (empty map) 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > attaches corroboration as a side annotation without changing the route when samples are supplied 1ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > corroborateWithAccelerometer does not crash on an empty samples array 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > findRoute does not crash when accelerometerSamplesBySegment carries an empty samples array for a closed segment 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accelerometer corroboration is optional) > corroborateWithAccelerometer reports false for a quiet/steady reading 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accessibleOnly excludes stair segments) > takes the shortest (stair) path when accessibleOnly is not set 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accessibleOnly excludes stair segments) > never includes a stepFree:false segment when accessibleOnly is set, even though it is the shortest path 1ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accessibleOnly excludes stair segments) > combines accessibleOnly with closedSegmentIds without crashing when both exclude overlapping segments 0ms
 ✓ src/lib/tunnelrouting.test.ts > findRoute (accessibleOnly excludes stair segments) > reports the existing honest no-route failure, not a crash, when only a stair segment connects the nodes 0ms
 ✓ src/lib/tunnelrouting.test.ts > closedSegmentIdsFromReports > includes only unresolved hazard reports' segment ids 0ms
 ✓ src/lib/tunnelrouting.test.ts > closedSegmentIdsFromReports > findRoute closes the segments named by closedSegmentIdsFromReports 0ms

 ❯ src/lib/tunnelsafety.test.ts 1/12

 Test Files 1 passed (2)
      Tests 18 passed (29)
   Start at 14:30:05
   Duration 201ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (happy path) > persists a correctly-signed event with segment id, status, timestamp, and reporter identity, retrievable via replay 47ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (happy path) > appends a resolving event rather than mutating the original report's history 11ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (happy path) > keeps an unresolved report active and excludes it only once resolved 13ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (accelerometer samples - plan todo 4) > round-trips accelSamples through append()/readAll(), and the resulting live hazard report produces a corroborated route annotation (this test is also the append()+readAll() round-trip proof cited by the manual-QA channel) 7ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (accelerometer samples - plan todo 4) > a report with no captured samples (permission denied/unavailable) omits accelSamples entirely, never a fabricated empty array 5ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (accelerometer samples - plan todo 4) > an empty accelSamples array round-trips without crashing computeHazardReports or findRoute 6ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (failure path - missing segment id) > is rejected client-side before signing rather than persisted malformed 2ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (failure path - missing segment id) > rejects a whitespace-only segment id the same way 2ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (failure path - missing segment id) > validateHazardReportInput throws synchronously without ever calling append 2ms
 ✓ src/lib/tunnelsafety.test.ts > reportHazard (failure path - missing segment id) > rejects an unrecognised hazard status 2ms
 ✓ src/lib/tunnelsafety.test.ts > computeHazardReports > ignores a tampered/forged event injected directly via appendEntry's raw path 5ms
 ✓ src/lib/tunnelsafety.test.ts > computeHazardReports > orders multiple reports by Lamport replay order 12ms

 Test Files  2 passed (2)
      Tests  29 passed (29)
   Start at  14:30:05
   Duration  269ms (tests 52%, setup 17%, transform 15%, import 12%, worker 3%)