# Output of shift/run_cache_demo.sh — 2026-10-15T03:57:39Z, gcc 13, cargo 1.97.0 (c980f4866 2026-06-30), OpenSSL 3.0.13
# (Temporary paths and timings vary per run.)

== P1. 20,000 time requests, cache OFF (ask the bridge every call)
  helper: bridge contacted 20000 time(s)
  20000 calls on 1 thread(s) in 0.758 s: 20000 answered, 0 refused, 0 went backward

== P2. Same 20,000 requests, cache ON (freshness limit 1000 ms)
  helper: bridge contacted 1 time(s)
  20000 calls on 1 thread(s) in 0.013 s: 20000 answered, 0 refused, 0 went backward

== P3. Time keeps moving between bridge asks (cache 1000 ms, calls 300 ms apart)
  call 1 at +0 ms: program sees 908423860.116335069
  call 2 at +300 ms: program sees 908423860.416561480
  call 3 at +600 ms: program sees 908423860.716826526
  helper: bridge contacted 1 time(s)

== P4. Bridge stops at about +300 ms (cache 1000 ms, calls 600 ms apart)
   expected: call 2 answered from cache (within the limit); call 3 refused (limit passed, bridge gone)
  call 1 at +0 ms: program sees 908423861.023416382
  call 2 at +600 ms: program sees 908423861.623632846
  helper: REFUSED - bridge unreachable at /tmp/tmp.wOSdhA2fdr/bridge.sock
  call 3 at +1200 ms: REFUSED (no time given)
  helper: bridge contacted 2 time(s)

== P5. Bridge's own time source freezes (test clock frozen). The BRIDGE must declare the fault.
   Cache 200 ms, calls 300 ms apart. Expected: answered at first (holding, never backward);
   after the 1 s stall limit the bridge declares FAULT; the helper relays it and refuses from then on.
  call 1 at +0 ms: program sees 1329307200.000000000
  call 2 at +300 ms: program sees 1329307200.000000000
  call 3 at +600 ms: program sees 1329307200.000000000
  call 4 at +901 ms: program sees 1329307200.000000000
  helper: FAULT declared by bridge: time source stalled for 1201 ms
  call 5 at +1201 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 6 at +1502 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 7 at +1802 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 8 at +2102 ms: REFUSED (no time given)
  helper: bridge contacted 5 time(s)

== P5b. A faulty bridge that does NOT check itself keeps sending one fixed time.
   The HELPER must notice the bridge has stopped advancing and declare the fault itself.
  call 1 at +0 ms: program sees 1329307200.000000000
  call 2 at +300 ms: program sees 1329307200.000000000
  call 3 at +601 ms: program sees 1329307200.000000000
  call 4 at +901 ms: program sees 1329307200.000000000
  helper: FAULT declared by helper: bridge time has not advanced for 1201 ms; refusing until restart
  call 5 at +1202 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 6 at +1502 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 7 at +1802 ms: REFUSED (no time given)
  helper: REFUSED - fault latched; restart required
  call 8 at +2102 ms: REFUSED (no time given)
  helper: bridge contacted 5 time(s)

== P6. 8 threads x 5,000 requests at once (cache 1000 ms): no refusals, nothing backward
  helper: bridge contacted 1 time(s)
  40000 calls on 8 thread(s) in 0.019 s: 40000 answered, 0 refused, 0 went backward
