FlowWitness

hybrid ui & state verification

Probing Gemini Nano…
#BuildHybridAI · Firebase AI Logic

Catch the green toast that lies, without shipping every screenshot to the cloud.

  1. Beat 0 · 0 ms

    pixelmatch strips anti-aliasing and clusters what really changed.

  2. Beat 1 · on-device

    Gemini Nano melts benign noise locally and flags the rest.

  3. Beat 2 · cloud

    Cloud Gemini names the line and the patch for flagged items only.

Routing plan
Beat 1 triage
prefer_on_device
Beat 2 escalation
prefer_in_cloud
Last inference

No inference yet. Every call will leave a receipt here.

Session receipts
0
calls
0
on-device
0
cloud
0
fallbacks

Firebase AI Logic · gemini-3.5-flash-lite · App Check on

3-Beat Verification Storyboard · H1

Optimistic Save Toast vs Storage Key Reversion

Save persists autosave ON across reload

Expected / optimistic claim

“Save persists autosave ON across reload”

Open contradictions
1

Beat 0 regions awaiting triage

Before320×200
After1 regions
Beat 0 diff mask14,832 px
Composite sprite → model320×64 · 1 tile
  1. 0
    Beat 0

    Deterministic pixel & DOM noise filter

    pixelmatch · threshold 0.1 · includeAA: false · 0 model calls

    0 ms·local
    Raw diff px
    14,832
    AA suppressed
    0
    Meaningful
    14,832
    Clustered regions
    1 / 6 cap · from 1 DOM rects
    Composite sprite
    320×64 · 258 img tokens
    • input[name="autosave"] rendered value / state
      “ON” → “OFF” reverts on reload
  2. 1
    Beat 1

    On-device Gemini Nano triage

    One multimodal sprite · narrow verdict with an explicit unsure exit

    prefer_on_device

    Beat 1 asks the browser's Gemini Nano for one verdict per transition. Benign changes melt away here at $0 and zero uploads; only real contradictions or unsure escalate.

  3. 2
    Beat 2

    Cloud Gemini root cause & patch

    Escalated items only · ≤80-line pre-sliced source · same JSON schema

    prefer_in_cloud

    Only transitions Beat 1 flags (or marks unsure) reach Cloud Gemini, with a deterministic source slice instead of a full screenshot stream.

Why one tier is not enough12-case ground-truth benchmark · recorded verdicts
pixelmatch alone
50.0% precision

Every changed pixel is a bug: 6 of 6 benign controls raised.

Cloud LLM on every screen
12/12 uploads

Every transition would leave the browser and pay cloud latency and image tokens.

Gemini Nano alone
85.7% precision

Its unsure exits stay unresolved: 1 benign control flagged, no root cause line.

FlowWitness hybrid
100.0% P · 100.0% R

7 of 12 transitions escalated (41.7% fewer cloud calls).

Bring your own snapshot / code

Verify a transition from your own app

Drop or paste a Before and an After screenshot, state what should hold, and add up to 80 lines of the component or token source. The same three beats run on it.

12-scenario ground-truth benchmark

Three arms, 6 true bugs, 6 benign controls

Table metrics come from recorded verdicts. Live proof and Verify Live re-run cases through the real hybrid gateway, one at a time, so the free cloud tier is never hammered.