diff --git a/.omo/evidence/coherence-audit/assembly-qr-sneakernet-e2e.json b/.omo/evidence/coherence-audit/assembly-qr-sneakernet-e2e.json new file mode 100644 index 0000000..b3122c5 --- /dev/null +++ b/.omo/evidence/coherence-audit/assembly-qr-sneakernet-e2e.json @@ -0,0 +1,37 @@ +{ + "task": "Assembly coherence gap: wire the QR-sneakernet air-gapped fallback into the shipped screen", + "tool": "Playwright (chromium), real shipped Assembly screen UI; camera round trip via Chrome --use-file-for-fake-video-capture fed a real Y4M video built (via ffmpeg-static) from the real PNG bytes the export UI rendered", + "run_command": "node e2e/assemblyQrSneakernet.e2e.mjs", + "timestamp": "2026-11-20T22:50:46.415Z", + "results": { + "exportRealQr": { + "scenario": "export-real-qr", + "steps": { + "frameCount": 1, + "allFramesDecoded": true, + "decodedMatchesExpected": true + }, + "pass": true + }, + "cameraRoundTrip": { + "scenario": "camera-round-trip", + "steps": { + "videoBuilt": true, + "successText": "Synced via QR - 1 frame received.", + "reportedFrameCount": true, + "proposalsMatch": true, + "rosterMatches": true + }, + "pass": true + }, + "permissionDenied": { + "scenario": "permission-denied", + "steps": { + "errorText": "No camera was found on this device.", + "noVideoElement": true + }, + "pass": true + } + }, + "pass": true +} \ No newline at end of file diff --git a/e2e/assemblyQrSneakernet.e2e.mjs b/e2e/assemblyQrSneakernet.e2e.mjs new file mode 100644 index 0000000..dca6ee2 --- /dev/null +++ b/e2e/assemblyQrSneakernet.e2e.mjs @@ -0,0 +1,449 @@ +// Assembly QR-sneakernet air-gapped fallback acceptance test (coherence +// audit fix: .omo/evidence/coherence-audit/assembly.md, gap 2(c)/3). +// +// Drives the REAL shipped Assembly screen (/miniapp/assembly) through its +// own rendered "Export state as QR" / "Scan a device's QR" controls only - +// no `window`-level bypass of the UI for the behavior under test. Two +// genuinely separate browser instances stand in for two separate physical +// devices (separate profiles - separate IndexedDB, separate identity). +// +// Scenario A (export renders real, scannable QR images): seeds a proposal +// + roster entry on device A via the real `putProposal`/`putRosterEntry` +// production functions, clicks the real "Export state as QR" button, reads +// every cycled frame's rendered `` data URL straight off the DOM, and +// decodes each one THROUGH THE REAL `scanFrameFromImage` (the exact +// function the scan side uses) run inside the same browser page - proving +// the export UI emits genuinely scannable QR codes, not just "an image +// appeared". +// +// Scenario B (the camera round trip, device A -> device B): takes the real +// PNG bytes captured in Scenario A, assembles them into a raw YUV4MPEG2 +// video (via the `ffmpeg-static` dependency already in this project) where +// each QR frame is held on screen for ~2s, then launches a SECOND, separate +// Chromium instance for device B with Chrome's +// `--use-file-for-fake-video-capture=` flag - the standard mechanism +// for deterministic fake-camera-feed testing this task calls for. Device B +// clicks the real "Scan a device's QR" button, which requests +// `getUserMedia` (auto-granted via `--use-fake-ui-for-media-stream` + +// `context.grantPermissions`), gets the synthetic video feed as its +// "camera", and runs the real `