feat(demo): restructure the full-feature video into a problem-first 3-act narrative

- Add showActTitleCard() inter-act cards (Act I/II/III) reusing the
  existing titleCardHtml()/TITLE_CARD_CSS grammar, played through the
  same continuous recording as the main tour.
- Fix Water Watch beat sensor ids to real kiosk ids from
  DEFAULT_PIPE_NETWORK so pipe-graph leak localization resolves a
  suspected origin instead of staying unmapped.
- Wipe the main-scene video tmp dir before recording so a stale webm
  from a prior aborted render can no longer corrupt the next one.
- Regenerate evidence: the-commons-hollow-full-demo.mp4 (71.28s),
  beat-log.json (41 main beats + 5 assembly-sync beats), and all
  main-*/assembly-sync-* screenshots.
This commit is contained in:
OmO Orchestrator committed 2026-11-18 15:19:25 -05:00
1 parent 7de89e1efb
commit d94887ba30
54 files changed
+500 -265

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

+217 -133
View File
@@ -1,252 +1,336 @@
{
"recordedAt": "2026-11-18T15:10:11.717Z",
"finalVideoPath": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/the-commons-hollow-full-demo.mp4",
"durationSeconds": 50.8,
"mainSceneBeatCount": 29,
"recordedAt": "2026-11-18T20:10:43.138Z",
"finalVideoPath": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/the-commons-hollow-full-demo.mp4",
"durationSeconds": 71.28,
"mainSceneBeatCount": 41,
"assemblySceneBeatCount": 5,
"beats": [
{
"scene": "main",
"label": "cold-start",
"note": "fresh local Ed25519 identity resolved, honest empty home grid + wallet",
"sceneRelativeMs": 920,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-00-cold-start.png"
"sceneRelativeMs": 895,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-00-cold-start.png"
},
{
"scene": "main",
"label": "admin-seed",
"note": "Load Hollow demo clicked - signed seed.* events appended (roster, proposal, housing, mentor, wallet balance)",
"sceneRelativeMs": 2540,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-01-admin-seed.png"
"sceneRelativeMs": 2794,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-01-admin-seed.png"
},
{
"scene": "main",
"label": "act1-title",
"note": "Act I - \"A Crisis, Verified Twice\": A bad reading could be noise. It takes two independent sensors to be sure.",
"sceneRelativeMs": 5028,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-02-act1-title.png"
},
{
"scene": "main",
"label": "waterwatch-no-false-alert",
"note": "flat 2nd reading (7.0 -> 7.05) did NOT fire a false alert - state is \"clean\", not \"alert\"",
"sceneRelativeMs": 5378,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-02-waterwatch-no-false-alert.png"
"sceneRelativeMs": 8790,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-03-waterwatch-no-false-alert.png"
},
{
"scene": "main",
"label": "waterwatch-corroborating",
"note": "genuine spike (7 -> 50) correctly flagged - awaiting a second independent sensor",
"sceneRelativeMs": 6827,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-03-waterwatch-corroborating.png"
"sceneRelativeMs": 10310,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-04-waterwatch-corroborating.png"
},
{
"scene": "main",
"label": "waterwatch-alert",
"note": "independent sensor-B corroborated the spike - real signed alert, Fair Share re-solve triggered",
"sceneRelativeMs": 8277,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-04-waterwatch-alert.png"
"note": "independent kiosk-2 corroborated the spike - real signed alert, Fair Share re-solve triggered",
"sceneRelativeMs": 11839,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-05-waterwatch-alert.png"
},
{
"scene": "main",
"label": "waterwatch-localization",
"note": "real pipe-graph leak localization named a suspected origin node, with a live per-tap arrival countdown for the selected tap",
"sceneRelativeMs": 13131,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-06-waterwatch-localization.png"
},
{
"scene": "main",
"label": "fairshare-water",
"note": "Fair Share's water tile reflects the honesty-anchor chain's re-solved CEEI allocation",
"sceneRelativeMs": 9829,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-05-fairshare-water.png"
},
{
"scene": "main",
"label": "farms-forecast",
"note": "real GDD + LP optimizer forecast (1 temp reading, 1 plot, 1 crop) -> 200.00 kg",
"sceneRelativeMs": 11565,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-06-farms-forecast.png"
},
{
"scene": "main",
"label": "fairshare-food",
"note": "Farms' real forecast fed Fair Share's second cross-mini-app integration edge - food tile re-solved",
"sceneRelativeMs": 12912,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-07-fairshare-food.png"
},
{
"scene": "main",
"label": "fairdraw-reveal",
"note": "real commit -> reveal -> verify cycle: \"Winner: You\", badge state \"verified\"",
"sceneRelativeMs": 14582,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-08-fairdraw-reveal.png"
},
{
"scene": "main",
"label": "fairdraw-wallet-live",
"note": "WalletCard balance updates live on the same route, no reload, from the real Fair Draw win",
"sceneRelativeMs": 15820,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-09-fairdraw-wallet-live.png"
},
{
"scene": "main",
"label": "fairdraw-history-row",
"note": "full transaction history now shows the real signed wallet.issue credit row",
"sceneRelativeMs": 16899,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-10-fairdraw-history-row.png"
},
{
"scene": "main",
"label": "wallet-sig-verified",
"note": "independent verifyEntrySignature() re-check confirms the entry's Ed25519 signature is genuine",
"sceneRelativeMs": 17940,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-11-wallet-sig-verified.png"
},
{
"scene": "main",
"label": "wallet-sig-expanded",
"note": "raw Ed25519 signature + author public key bytes are directly inspectable, not just a claimed verification",
"sceneRelativeMs": 18893,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-12-wallet-sig-expanded.png"
},
{
"scene": "main",
"label": "housing",
"note": "Housing shows a real assigned room slot from the seeded assignment cycle, not a permanent empty state",
"sceneRelativeMs": 20613,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-13-housing.png"
},
{
"scene": "main",
"label": "mentor",
"note": "Mentor shows a real at-risk skill card (deduped dependents count) from the seeded skill-holder data",
"sceneRelativeMs": 21980,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-14-mentor.png"
},
{
"scene": "main",
"label": "healthpost-triage",
"note": "real WHO-IMCI classification from a full exam: \"Needs treatment\"",
"sceneRelativeMs": 23660,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-15-healthpost-triage.png"
},
{
"scene": "main",
"label": "sky-post",
"note": "posted to the memory wall; a fast double-click produced exactly one entry, not two (GAP-20 fix)",
"sceneRelativeMs": 25406,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-16-sky-post.png"
"sceneRelativeMs": 14879,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-07-fairshare-water.png"
},
{
"scene": "main",
"label": "tunnelsafety",
"note": "real hazard report appended for the selected corridor segment",
"sceneRelativeMs": 26959,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-17-tunnelsafety.png"
"sceneRelativeMs": 16700,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-08-tunnelsafety.png"
},
{
"scene": "main",
"label": "findfamily",
"note": "on-device private-set-intersection search resolved - the query never left the device",
"sceneRelativeMs": 28354,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-18-findfamily.png"
"sceneRelativeMs": 18159,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-09-findfamily.png"
},
{
"scene": "main",
"label": "act2-title",
"note": "Act II - \"Running the Town\": Farms, floor plans, mentors, the clinic, the midnight shift - every decision replayable from one signed log.",
"sceneRelativeMs": 19445,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-10-act2-title.png"
},
{
"scene": "main",
"label": "farms-forecast",
"note": "real GDD + LP optimizer forecast (1 temp reading, 1 plot, 1 crop) -> 200.00 kg",
"sceneRelativeMs": 22619,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-11-farms-forecast.png"
},
{
"scene": "main",
"label": "fairshare-food",
"note": "Farms' real forecast fed Fair Share's second cross-mini-app integration edge - food tile re-solved",
"sceneRelativeMs": 24198,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-12-fairshare-food.png"
},
{
"scene": "main",
"label": "housing",
"note": "Housing shows a real assigned room slot from the seeded assignment cycle, not a permanent empty state",
"sceneRelativeMs": 25808,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-13-housing.png"
},
{
"scene": "main",
"label": "housing-report-idle-space",
"note": "a resident reported a real idle space through the real form - available to the next assignment cycle",
"sceneRelativeMs": 27365,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-14-housing-report-idle-space.png"
},
{
"scene": "main",
"label": "housing-run-cycle",
"note": "the resident-facing 'Run assignment cycle' button recorded a new real housing.assignment cycle against the current fairness-debt ledger",
"sceneRelativeMs": 28515,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-15-housing-run-cycle.png"
},
{
"scene": "main",
"label": "mentor",
"note": "Mentor shows a real at-risk skill card (deduped dependents count) from the seeded skill-holder data",
"sceneRelativeMs": 29957,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-16-mentor.png"
},
{
"scene": "main",
"label": "mentor-apprentice-match",
"note": "rating yourself 'Again' on the at-risk skill created a real apprentice need; the real matching engine scores the mentor pool honestly rather than fabricating a match",
"sceneRelativeMs": 31430,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-17-mentor-apprentice-match.png"
},
{
"scene": "main",
"label": "healthpost-triage",
"note": "real WHO-IMCI classification from a full exam: \"Needs treatment\"",
"sceneRelativeMs": 33251,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-18-healthpost-triage.png"
},
{
"scene": "main",
"label": "healthpost-send-to-clinician",
"note": "the referral-eligible result's real 'Send to clinician' button posted a signed healthpost.referral event to the clinician queue",
"sceneRelativeMs": 34568,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-19-healthpost-send-to-clinician.png"
},
{
"scene": "main",
"label": "lightclock-manual-fallback",
"note": "no motion sensor available - the real sensor-first/manual-fallback contract switched to the manual log form",
"sceneRelativeMs": 29740,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-19-lightclock-manual-fallback.png"
"sceneRelativeMs": 35979,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-20-lightclock-manual-fallback.png"
},
{
"scene": "main",
"label": "lightclock",
"note": "manual sleep/wake log entry added and circadian status computed",
"sceneRelativeMs": 29854,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-20-lightclock.png"
"sceneRelativeMs": 36172,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-21-lightclock.png"
},
{
"scene": "main",
"label": "theclimb",
"note": "real shaft/wave-demand/surface-capacity schedule fed to the min-cost-flow congestion engine",
"sceneRelativeMs": 31433,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-21-theclimb.png"
"sceneRelativeMs": 37918,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-22-theclimb.png"
},
{
"scene": "main",
"label": "act3-title",
"note": "Act III - \"Who Decides\": Quadratic votes, a commit-reveal lottery, a town's honest mood - decided in the open, not behind a server.",
"sceneRelativeMs": 39178,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-23-act3-title.png"
},
{
"scene": "main",
"label": "assembly-seeded",
"note": "demo-seeded roster (Aria, Kade) and an open proposal visible cold, no manual setup",
"sceneRelativeMs": 32789,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-22-assembly-seeded.png"
"sceneRelativeMs": 42131,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-24-assembly-seeded.png"
},
{
"scene": "main",
"label": "assembly-create-proposal",
"note": "a new proposal was created through the real form",
"sceneRelativeMs": 33902,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-23-assembly-create-proposal.png"
"sceneRelativeMs": 43314,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-25-assembly-create-proposal.png"
},
{
"scene": "main",
"label": "assembly-add-resident",
"note": "a new resident was added to the roster through the real form",
"sceneRelativeMs": 34893,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-24-assembly-add-resident.png"
"sceneRelativeMs": 44351,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-26-assembly-add-resident.png"
},
{
"scene": "main",
"label": "assembly-vote",
"note": "a direct vote was cast on the new proposal and the status readout updated live",
"sceneRelativeMs": 35859,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-25-assembly-vote.png"
"sceneRelativeMs": 45347,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-27-assembly-vote.png"
},
{
"scene": "main",
"label": "assembly-qv-tally",
"note": "a real quadratic-vote ballot was cast on the roster - the QV tally is no longer stuck at zero (Wave-1 fix: QV credit granted on the real roster/proposal lifecycle)",
"sceneRelativeMs": 46613,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-28-assembly-qv-tally.png"
},
{
"scene": "main",
"label": "fairdraw-commit",
"note": "a signed commit hash was published BEFORE any reveal - \"5a6af386957ffb6d...\" - re-rolling after this point is auditable and rejected",
"sceneRelativeMs": 48103,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-29-fairdraw-commit.png"
},
{
"scene": "main",
"label": "fairdraw-reveal",
"note": "real commit -> reveal -> verify cycle: \"Winner: You\", badge state \"verified\"",
"sceneRelativeMs": 49659,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-30-fairdraw-reveal.png"
},
{
"scene": "main",
"label": "fairdraw-wallet-live",
"note": "WalletCard balance updates live on the same route, no reload, from the real Fair Draw win",
"sceneRelativeMs": 50953,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-31-fairdraw-wallet-live.png"
},
{
"scene": "main",
"label": "fairdraw-history-row",
"note": "full transaction history now shows the real signed wallet.issue credit row",
"sceneRelativeMs": 52088,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-32-fairdraw-history-row.png"
},
{
"scene": "main",
"label": "sky-post",
"note": "posted to the memory wall; a fast double-click produced exactly one entry, not two (GAP-20 fix)",
"sceneRelativeMs": 53331,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-33-sky-post.png"
},
{
"scene": "main",
"label": "sky-mood-pulse",
"note": "a real signed mood/morale pulse was posted - the town's honest mood is now visible, aggregated from real signed events",
"sceneRelativeMs": 54763,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-34-sky-mood-pulse.png"
},
{
"scene": "main",
"label": "epilogue-title",
"note": "Epilogue - \"Trust, Made Verifiable\": Every balance checks its own signature. Anyone can ship a new mini-app - no gatekeeper required.",
"sceneRelativeMs": 56100,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-35-epilogue-title.png"
},
{
"scene": "main",
"label": "wallet-sig-verified",
"note": "independent verifyEntrySignature() re-check confirms the entry's Ed25519 signature is genuine",
"sceneRelativeMs": 58997,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-36-wallet-sig-verified.png"
},
{
"scene": "main",
"label": "wallet-sig-expanded",
"note": "raw Ed25519 signature + author public key bytes are directly inspectable, not just a claimed verification",
"sceneRelativeMs": 60002,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-37-wallet-sig-expanded.png"
},
{
"scene": "main",
"label": "upload-form-filled",
"note": "real manifest form filled + a real HTML file attached via the real file input",
"sceneRelativeMs": 37095,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-26-upload-form-filled.png"
"sceneRelativeMs": 61888,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-38-upload-form-filled.png"
},
{
"scene": "main",
"label": "upload-success",
"note": "the real uploadMiniapp() storage path accepted the package",
"sceneRelativeMs": 38077,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-27-upload-success.png"
"sceneRelativeMs": 62929,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-39-upload-success.png"
},
{
"scene": "main",
"label": "upload-tile-appears",
"note": "the uploaded mini-app now appears as a real tile on the home grid",
"sceneRelativeMs": 39116,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/main-28-upload-tile-appears.png"
"sceneRelativeMs": 64001,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/main-40-upload-tile-appears.png"
},
{
"scene": "assembly-sync",
"label": "boot",
"note": "two genuinely isolated devices (separate storage origins) open the real Assembly screen; sync is honestly off by default",
"sceneRelativeMs": 597,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-00-deviceA-boot.png",
"screenshotDeviceB": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-00-deviceB-boot.png"
"sceneRelativeMs": 671,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-00-deviceA-boot.png",
"screenshotDeviceB": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-00-deviceB-boot.png"
},
{
"scene": "assembly-sync",
"label": "connected",
"note": "real WebRTC transport connected over a local signaling server - both devices see a live peer count",
"sceneRelativeMs": 1886,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-01-deviceA-connected.png",
"screenshotDeviceB": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-01-deviceB-connected.png"
"sceneRelativeMs": 1958,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-01-deviceA-connected.png",
"screenshotDeviceB": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-01-deviceB-connected.png"
},
{
"scene": "assembly-sync",
"label": "transport-proven",
"note": "a proposal created on device A arrived on device B purely over the real WebRTC transport - B's own IndexedDB never had it",
"sceneRelativeMs": 3304,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-02-deviceA-transport-proven.png",
"screenshotDeviceB": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-02-deviceB-transport-proven.png"
"sceneRelativeMs": 3378,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-02-deviceA-transport-proven.png",
"screenshotDeviceB": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-02-deviceB-transport-proven.png"
},
{
"scene": "assembly-sync",
"label": "partitioned",
"note": "both devices genuinely isolated (peer count 0, network offline, signaling blocked) - independent votes cast (A sees \"You voted Yes\", B sees \"You voted No\")",
"sceneRelativeMs": 5492,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-03-deviceA-partitioned.png",
"screenshotDeviceB": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-03-deviceB-partitioned.png"
"sceneRelativeMs": 5565,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-03-deviceA-partitioned.png",
"screenshotDeviceB": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-03-deviceB-partitioned.png"
},
{
"scene": "assembly-sync",
"label": "healed-reconnected",
"note": "both devices reconnected after the partition - real WebrtcProvider re-established",
"sceneRelativeMs": 8667,
"screenshot": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-04-deviceA-healed-reconnected.png",
"screenshotDeviceB": "/home/athapa/patriothacks/.omo/evidence/full-feature-demo/assembly-sync-04-deviceB-healed-reconnected.png"
"sceneRelativeMs": 8740,
"screenshot": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-04-deviceA-healed-reconnected.png",
"screenshotDeviceB": "/home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave2/.omo/evidence/full-feature-demo/assembly-sync-04-deviceB-healed-reconnected.png"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

+283 -132
View File
@@ -49,7 +49,7 @@ import { NARRATE_TITLE_PREFIX } from "playwright-recast/helpers";
import ffmpegStatic from "ffmpeg-static";
import ffprobeStatic from "ffprobe-static";
import { spawn, execFileSync } from "node:child_process";
import { mkdirSync, writeFileSync, existsSync, readdirSync } from "node:fs";
import { mkdirSync, rmSync, writeFileSync, existsSync, readdirSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
@@ -186,6 +186,25 @@ function titleCardHtml({ eyebrow, title, tagline }) {
</div></body></html>`;
}
// Inter-act title cards for the problem-first 3-act restructure: the SAME
// titleCardHtml()/TITLE_CARD_CSS visual grammar as the intro/outro cards
// (reused verbatim, no parallel implementation), displayed via the SAME
// continuous Playwright recording/trace the main tour already produces -
// page.setContent() swaps the live document, so the card plays out as
// genuine composited video frames exactly like `renderTitleCard()`'s
// throwaway context does, with zero new compositing/splicing stage:
// addMotionGraphics()'s `.intro()`/`.outro()` calls stay exactly one each.
// The post-hold `goto` back to the app's home route gives the next act a
// clean, real "Miniapps" grid to open its first tile from, regardless of
// which route the previous act ended on.
async function showActTitleCard(page, beatLog, { label, eyebrow, title, tagline, holdMs = 2400 }) {
await page.setContent(titleCardHtml({ eyebrow, title, tagline }), { waitUntil: "load" });
await beatLog.log(label, `${eyebrow} - "${title}": ${tagline}`, page);
await page.waitForTimeout(holdMs);
await page.goto(`${APP_URL}/`, { waitUntil: "load" });
await page.getByRole("grid", { name: "Miniapps" }).waitFor({ state: "visible" });
}
// Records the title card through a real throwaway Playwright context (same
// `recordVideo` mechanism as the real scenes) so the reveal animation plays
// out as genuine composited video frames, not a hand-assembled still.
@@ -294,6 +313,15 @@ async function forceLocalIdentityWinsFairDraw(context) {
async function recordMainScene() {
console.log("\n=== Scene 1: main feature tour ===");
const videoDir = resolve(VIDEO_TMP_DIR, "main");
// A prior crashed/aborted attempt leaves its own page@<guid>.webm behind
// in this same directory (mkdirSync({recursive:true}) never deletes
// existing files) - Recast.from(videoDir) has no way to tell that stale
// file apart from this run's real recording, so a leftover partial
// webm here silently corrupts the next render (confirmed: it produced a
// final video frozen on the intro card for nearly its whole length).
// Wiping the directory first guarantees exactly one real recording per
// render.
rmSync(videoDir, { recursive: true, force: true });
mkdirSync(videoDir, { recursive: true });
const browser = await chromium.launch({
@@ -338,7 +366,22 @@ async function recordMainScene() {
await page.getByRole("grid", { name: "Miniapps" }).waitFor({ state: "visible" });
await sleep(800);
// =================================================================
// ACT I: "A crisis, verified twice" - a bad reading could be noise;
// it takes two independent sensors to be sure.
// =================================================================
await showActTitleCard(page, beatLog, {
label: "act1-title",
eyebrow: "Act I",
title: "A Crisis, Verified Twice",
tagline: "A bad reading could be noise. It takes two independent sensors to be sure.",
});
// --- Water Watch: GAP-8 false-alert fix + genuine corroborated detection ---
// Sensor ids are real kiosk ids from DEFAULT_PIPE_NETWORK (not the
// arbitrary "sensor-A"/"sensor-B" placeholders this beat used before) so
// the real pipe-graph leak localization below actually resolves a
// suspected origin instead of silently staying "unmapped".
await openTile(page, "Water Watch");
async function reportReading(sensorId, value) {
await page.getByTestId("report-reading-sensor").fill(sensorId);
@@ -349,9 +392,9 @@ async function recordMainScene() {
`submit ${sensorId}=${value} settles`,
);
}
await reportReading("sensor-A", 7);
await reportReading("kiosk-1", 7);
await sleep(400);
await reportReading("sensor-A", 7.05);
await reportReading("kiosk-1", 7.05);
const stateAfterFlat = await page.getByTestId("device-monitor-status-light-pH").getAttribute("data-state");
if (stateAfterFlat === "alert") {
throw new Error("REGRESSION: a flat 2nd reading triggered a false alert (GAP-8 fix did not hold)");
@@ -359,7 +402,7 @@ async function recordMainScene() {
await beatLog.log("waterwatch-no-false-alert", `flat 2nd reading (7.0 -> 7.05) did NOT fire a false alert - state is "${stateAfterFlat}", not "alert"`, page);
await sleep(1200);
await reportReading("sensor-A", 50);
await reportReading("kiosk-1", 50);
await waitFor(
async () => (await page.getByTestId("device-monitor-status-light-pH").getAttribute("data-state")) === "corroborating",
"pH channel reaches corroborating after a genuine spike",
@@ -367,13 +410,21 @@ async function recordMainScene() {
await beatLog.log("waterwatch-corroborating", "genuine spike (7 -> 50) correctly flagged - awaiting a second independent sensor", page);
await sleep(1000);
await reportReading("sensor-B", 7);
await reportReading("sensor-B", 55);
await reportReading("kiosk-2", 7);
await reportReading("kiosk-2", 55);
await waitFor(
async () => (await page.getByTestId("device-monitor-status-light-pH").getAttribute("data-state")) === "alert",
"pH channel reaches alert once corroborated",
);
await beatLog.log("waterwatch-alert", "independent sensor-B corroborated the spike - real signed alert, Fair Share re-solve triggered", page);
await beatLog.log("waterwatch-alert", "independent kiosk-2 corroborated the spike - real signed alert, Fair Share re-solve triggered", page);
await sleep(1200);
await page.getByTestId("device-monitor-my-tap").selectOption({ index: 1 });
await waitFor(
async () => (await page.getByTestId("device-monitor-origin-pH").count()) > 0,
"pipe-graph leak localization resolves a suspected origin",
);
await beatLog.log("waterwatch-localization", "real pipe-graph leak localization named a suspected origin node, with a live per-tap arrival countdown for the selected tap", page);
await sleep(1400);
// --- Fair Share: water allocation re-solved ---
@@ -386,125 +437,6 @@ async function recordMainScene() {
await beatLog.log("fairshare-water", "Fair Share's water tile reflects the honesty-anchor chain's re-solved CEEI allocation", page);
await sleep(1400);
// --- Farms -> Fair Share food edge (2nd integration edge) ---
await backHome(page);
await openTile(page, "Farms");
await page.getByTestId("farms-temp-date").fill("2026-05-01");
await page.getByTestId("farms-temp-tmin").fill("10");
await page.getByTestId("farms-temp-tmax").fill("30");
await page.getByTestId("farms-temp-add").click();
await page.getByTestId("farms-plot-id").fill("plot-a");
await page.getByTestId("farms-plot-area").fill("100");
await page.getByTestId("farms-plot-add").click();
await page.getByTestId("farms-crop-id").fill("wheat");
await page.getByTestId("farms-crop-maturity-gdd").fill("10");
await page.getByTestId("farms-crop-yield").fill("2");
await page.getByTestId("farms-crop-add").click();
await waitFor(
async () => ((await page.getByTestId("farms-forecast-total").textContent()) ?? "").includes("200.00 kg"),
"Farms LP optimizer reaches a real 200.00 kg forecast",
);
await beatLog.log("farms-forecast", "real GDD + LP optimizer forecast (1 temp reading, 1 plot, 1 crop) -> 200.00 kg", page);
await sleep(1200);
await backHome(page);
await openTile(page, "Fair Share");
await waitFor(async () => {
const text = (await page.getByTestId("tile-food-allocation").textContent()) ?? "";
return text.trim().length > 0 && text !== "No allocation yet" && text.trim() !== "0";
}, "Fair Share food tile reflects the Farms forecast");
await beatLog.log("fairshare-food", "Farms' real forecast fed Fair Share's second cross-mini-app integration edge - food tile re-solved", page);
await sleep(1400);
// --- Fair Draw: real commit-reveal-verify -> real wallet credit ---
await backHome(page);
await openTile(page, "Fair Draw");
await page.getByRole("button", { name: "Start Draw" }).click();
await page.getByRole("button", { name: "Reveal" }).click();
await page.getByTestId("reveal-draw-revealed").waitFor({ state: "visible" });
const winnerText = (await page.getByTestId("reveal-draw-winner").textContent())?.trim();
const badgeState = await page.getByTestId("reveal-draw-badge").getAttribute("data-state");
await beatLog.log("fairdraw-reveal", `real commit -> reveal -> verify cycle: "${winnerText}", badge state "${badgeState}"`, page);
await sleep(1200);
await waitFor(async () => (await walletBalanceText(page)) !== undefined, "wallet balance chip present on fair-draw route");
await beatLog.log("fairdraw-wallet-live", "WalletCard balance updates live on the same route, no reload, from the real Fair Draw win", page);
await sleep(1000);
await page.getByRole("link", { name: "Back to home" }).click();
await page.getByTestId("history-entry").first().waitFor({ state: "visible" });
await beatLog.log("fairdraw-history-row", "full transaction history now shows the real signed wallet.issue credit row", page);
await sleep(1000);
// --- Wallet signature verification (headline crypto feature) ---
const firstRow = page.getByTestId("history-entry").first();
const badge = firstRow.locator('[data-testid^="history-signature-badge-"]');
await waitFor(async () => ((await badge.textContent()) ?? "").trim() === "Verified", "signature badge resolves to Verified");
await beatLog.log("wallet-sig-verified", "independent verifyEntrySignature() re-check confirms the entry's Ed25519 signature is genuine", page);
await sleep(900);
const toggle = firstRow.locator('[data-testid^="history-expand-toggle-"]');
await toggle.click();
const detail = firstRow.locator('[data-testid^="history-signature-detail-"]');
await detail.waitFor({ state: "visible" });
await beatLog.log("wallet-sig-expanded", "raw Ed25519 signature + author public key bytes are directly inspectable, not just a claimed verification", page);
await sleep(1600);
await toggle.click();
// --- Housing: real assigned slot from the demo seed ---
// Already on the home route from the wallet-history step above -
// ShellLayout hides the "Back to home" link on "/" itself, so
// backHome() must NOT be called here.
await openTile(page, "Housing");
await page.getByTestId("housing-assigned-slot").waitFor({ state: "visible" });
await beatLog.log("housing", "Housing shows a real assigned room slot from the seeded assignment cycle, not a permanent empty state", page);
await sleep(1200);
// --- Mentor: real at-risk skill ---
await backHome(page);
await openTile(page, "Mentor");
await page.getByTestId("mentor-card-well-repair").waitFor({ state: "visible" });
await beatLog.log("mentor", "Mentor shows a real at-risk skill card (deduped dependents count) from the seeded skill-holder data", page);
await sleep(1200);
// --- Health Post: WHO-IMCI triage classification ---
await backHome(page);
await openTile(page, "Health Post");
await page.getByTestId("triage-age-input").fill("24");
await page.getByTestId("triage-hasCough-yes").click();
await page.getByTestId("triage-breathsPerMinute-input").fill("45");
await page.getByTestId("triage-chestIndrawing-no").click();
await page.getByTestId("triage-stridorWhenCalm-no").click();
await page.getByTestId("triage-hasDiarrhea-yes").click();
await page.getByTestId("triage-durationDays-input").fill("3");
await page.getByTestId("triage-bloodInStool-no").click();
await page.getByTestId("triage-restlessOrIrritable-no").click();
await page.getByTestId("triage-sunkenEyes-no").click();
await page.getByTestId("triage-ableToDrink-select").selectOption("normal");
await page.getByTestId("triage-skinPinch-select").selectOption("immediate");
await page.getByTestId("triage-submit").click();
await page.getByTestId("triage-result").waitFor({ state: "visible" });
const urgency = (await page.getByTestId("triage-urgency").textContent())?.trim();
await beatLog.log("healthpost-triage", `real WHO-IMCI classification from a full exam: "${urgency}"`, page);
await sleep(1400);
// --- Sky: memory-wall post + double-click double-post guard (GAP-20) ---
await backHome(page);
await openTile(page, "Sky");
const skyMessage = "The sky over the Hollow turned amber tonight.";
await page.getByTestId("sky-memory-input").fill(skyMessage);
const countBefore = await page.getByTestId("sky-memory-list").locator("li").count().catch(() => 0);
await Promise.all([
page.getByTestId("sky-memory-submit").click(),
page.getByTestId("sky-memory-submit").click(),
]);
await waitFor(
async () => (await page.getByTestId("sky-memory-list").locator("li").count()) === countBefore + 1,
"exactly one memory-wall entry posted despite two synchronous clicks",
);
await beatLog.log("sky-post", "posted to the memory wall; a fast double-click produced exactly one entry, not two (GAP-20 fix)", page);
await sleep(1200);
// --- Tunnel Safety: real hazard report ---
await backHome(page);
await openTile(page, "Tunnel Safety");
@@ -528,6 +460,117 @@ async function recordMainScene() {
await beatLog.log("findfamily", "on-device private-set-intersection search resolved - the query never left the device", page);
await sleep(1200);
// =================================================================
// ACT II: "Running the town" - the day-to-day engines: farms,
// housing, mentorship, the clinic, sleep, and the climb to the surface.
// =================================================================
await showActTitleCard(page, beatLog, {
label: "act2-title",
eyebrow: "Act II",
title: "Running the Town",
tagline: "Farms, floor plans, mentors, the clinic, the midnight shift - every decision replayable from one signed log.",
});
// --- Farms -> Fair Share food edge (2nd integration edge) ---
await openTile(page, "Farms");
await page.getByTestId("farms-temp-date").fill("2026-05-01");
await page.getByTestId("farms-temp-tmin").fill("10");
await page.getByTestId("farms-temp-tmax").fill("30");
await page.getByTestId("farms-temp-add").click();
await page.getByTestId("farms-plot-id").fill("plot-a");
await page.getByTestId("farms-plot-area").fill("100");
await page.getByTestId("farms-plot-add").click();
await page.getByTestId("farms-crop-id").fill("wheat");
await page.getByTestId("farms-crop-maturity-gdd").fill("10");
await page.getByTestId("farms-crop-yield").fill("2");
// The grow-light kWh field is a Wave-1 addition ("Add crop" is now
// gated on it too) - 0 keeps this crop energy-free so the LP's
// real 200.00 kg forecast is unaffected (no energy budget is set).
await page.getByTestId("farms-crop-kwh").fill("0");
await page.getByTestId("farms-crop-add").click();
await waitFor(
async () => ((await page.getByTestId("farms-forecast-total").textContent()) ?? "").includes("200.00 kg"),
"Farms LP optimizer reaches a real 200.00 kg forecast",
);
await beatLog.log("farms-forecast", "real GDD + LP optimizer forecast (1 temp reading, 1 plot, 1 crop) -> 200.00 kg", page);
await sleep(1200);
await backHome(page);
await openTile(page, "Fair Share");
await waitFor(async () => {
const text = (await page.getByTestId("tile-food-allocation").textContent()) ?? "";
return text.trim().length > 0 && text !== "No allocation yet" && text.trim() !== "0";
}, "Fair Share food tile reflects the Farms forecast");
await beatLog.log("fairshare-food", "Farms' real forecast fed Fair Share's second cross-mini-app integration edge - food tile re-solved", page);
await sleep(1400);
// --- Housing: real assigned slot from the demo seed + the resident-
// facing idle-space report + assignment-cycle trigger ---
await backHome(page);
await openTile(page, "Housing");
await page.getByTestId("housing-assigned-slot").waitFor({ state: "visible" });
await beatLog.log("housing", "Housing shows a real assigned room slot from the seeded assignment cycle, not a permanent empty state", page);
await sleep(1200);
await page.getByTestId("housing-report-space-id").fill("common-room-3");
await page.getByTestId("housing-report-location").fill("East wing, ground floor");
await page.getByTestId("housing-report-submit").click();
await waitFor(
async () => ((await page.getByTestId("housing-report-status-text").textContent()) ?? "").includes("Idle space reported"),
"idle space report submits",
);
await beatLog.log("housing-report-idle-space", "a resident reported a real idle space through the real form - available to the next assignment cycle", page);
await sleep(1000);
await page.getByTestId("housing-run-cycle").click();
await waitFor(
async () => ((await page.getByTestId("housing-run-cycle-status").textContent()) ?? "").length > 0,
"resident-triggered assignment cycle runs",
);
await beatLog.log("housing-run-cycle", "the resident-facing 'Run assignment cycle' button recorded a new real housing.assignment cycle against the current fairness-debt ledger", page);
await sleep(1200);
// --- Mentor: real at-risk skill + the apprentice-to-mentor matching engine ---
await backHome(page);
await openTile(page, "Mentor");
await page.getByTestId("mentor-card-well-repair").waitFor({ state: "visible" });
await beatLog.log("mentor", "Mentor shows a real at-risk skill card (deduped dependents count) from the seeded skill-holder data", page);
await sleep(1200);
await page.getByTestId("mentor-rate-again-well-repair").click();
await waitFor(
async () => (await page.getByTestId("mentor-matches").count()) > 0,
"the apprentice-match engine reacts to the new review",
);
await beatLog.log("mentor-apprentice-match", "rating yourself 'Again' on the at-risk skill created a real apprentice need; the real matching engine scores the mentor pool honestly rather than fabricating a match", page);
await sleep(1200);
// --- Health Post: WHO-IMCI triage classification + case-relay referral ---
await backHome(page);
await openTile(page, "Health Post");
await page.getByTestId("triage-age-input").fill("24");
await page.getByTestId("triage-hasCough-yes").click();
await page.getByTestId("triage-breathsPerMinute-input").fill("45");
await page.getByTestId("triage-chestIndrawing-no").click();
await page.getByTestId("triage-stridorWhenCalm-no").click();
await page.getByTestId("triage-hasDiarrhea-yes").click();
await page.getByTestId("triage-durationDays-input").fill("3");
await page.getByTestId("triage-bloodInStool-no").click();
await page.getByTestId("triage-restlessOrIrritable-no").click();
await page.getByTestId("triage-sunkenEyes-no").click();
await page.getByTestId("triage-ableToDrink-select").selectOption("normal");
await page.getByTestId("triage-skinPinch-select").selectOption("immediate");
await page.getByTestId("triage-submit").click();
await page.getByTestId("triage-result").waitFor({ state: "visible" });
const urgency = (await page.getByTestId("triage-urgency").textContent())?.trim();
await beatLog.log("healthpost-triage", `real WHO-IMCI classification from a full exam: "${urgency}"`, page);
await sleep(1200);
await page.getByTestId("triage-send-referral").click();
await page.getByTestId("triage-referral-sent").waitFor({ state: "visible" });
await beatLog.log("healthpost-send-to-clinician", "the referral-eligible result's real 'Send to clinician' button posted a signed healthpost.referral event to the clinician queue", page);
await sleep(1200);
// --- Light Clock: manual sleep/wake log ---
// This headless browser has no real motion-sensor hardware, but
// Chromium's DOM still defines a DeviceMotionEvent constructor, so
@@ -574,8 +617,18 @@ async function recordMainScene() {
await beatLog.log("theclimb", "real shaft/wave-demand/surface-capacity schedule fed to the min-cost-flow congestion engine", page);
await sleep(1200);
// --- Assembly (single-user half): seeded roster/proposal + create/vote ---
await backHome(page);
// =================================================================
// ACT III: "Who decides" - quadratic votes, a commit-reveal lottery,
// and a town's honest mood, decided in the open, not behind a server.
// =================================================================
await showActTitleCard(page, beatLog, {
label: "act3-title",
eyebrow: "Act III",
title: "Who Decides",
tagline: "Quadratic votes, a commit-reveal lottery, a town's honest mood - decided in the open, not behind a server.",
});
// --- Assembly (single-user half): seeded roster/proposal + create/vote + QV ballot ---
await openTile(page, "Assembly");
await page.getByTestId("assembly-sync-toggle").waitFor({ state: "visible" });
await beatLog.log("assembly-seeded", "demo-seeded roster (Aria, Kade) and an open proposal visible cold, no manual setup", page);
@@ -607,10 +660,104 @@ async function recordMainScene() {
);
await beatLog.log("assembly-vote", "a direct vote was cast on the new proposal and the status readout updated live", page);
await sleep(1000);
await page.getByTestId(`assembly-qv-ballot-yes-${proposalId}`).click();
await waitFor(
async () => !((await page.getByTestId(`assembly-tally-yes-${proposalId}`).textContent()) ?? "").includes("Yes 0.00"),
"QV tally becomes non-zero after a real weighted ballot",
);
await beatLog.log("assembly-qv-tally", "a real quadratic-vote ballot was cast on the roster - the QV tally is no longer stuck at zero (Wave-1 fix: QV credit granted on the real roster/proposal lifecycle)", page);
await sleep(1200);
}
// --- Upload a mini-app ---
// --- Fair Draw: real commit-reveal-verify, commit published before any
// reveal, -> real wallet credit ---
await backHome(page);
await openTile(page, "Fair Draw");
await page.getByRole("button", { name: "Start Draw" }).click();
await page.getByTestId("reveal-draw-commit-hash").waitFor({ state: "visible" });
const commitHash = (await page.getByTestId("reveal-draw-commit-hash").textContent())?.trim();
await beatLog.log("fairdraw-commit", `a signed commit hash was published BEFORE any reveal - "${commitHash?.slice(0, 16)}..." - re-rolling after this point is auditable and rejected`, page);
await sleep(1400);
await page.getByRole("button", { name: "Reveal" }).click();
await page.getByTestId("reveal-draw-revealed").waitFor({ state: "visible" });
const winnerText = (await page.getByTestId("reveal-draw-winner").textContent())?.trim();
const badgeState = await page.getByTestId("reveal-draw-badge").getAttribute("data-state");
await beatLog.log("fairdraw-reveal", `real commit -> reveal -> verify cycle: "${winnerText}", badge state "${badgeState}"`, page);
await sleep(1200);
await waitFor(async () => (await walletBalanceText(page)) !== undefined, "wallet balance chip present on fair-draw route");
await beatLog.log("fairdraw-wallet-live", "WalletCard balance updates live on the same route, no reload, from the real Fair Draw win", page);
await sleep(1000);
await page.getByRole("link", { name: "Back to home" }).click();
await page.getByTestId("history-entry").first().waitFor({ state: "visible" });
await beatLog.log("fairdraw-history-row", "full transaction history now shows the real signed wallet.issue credit row", page);
await sleep(1000);
// --- Sky: memory-wall post + double-click double-post guard (GAP-20)
// + the real signed mood/morale pulse ---
// Already on the home route from the fairdraw-history-row step above -
// ShellLayout hides the "Back to home" link on "/" itself, so
// backHome() must NOT be called here.
await openTile(page, "Sky");
const skyMessage = "The sky over the Hollow turned amber tonight.";
await page.getByTestId("sky-memory-input").fill(skyMessage);
const countBefore = await page.getByTestId("sky-memory-list").locator("li").count().catch(() => 0);
await Promise.all([
page.getByTestId("sky-memory-submit").click(),
page.getByTestId("sky-memory-submit").click(),
]);
await waitFor(
async () => (await page.getByTestId("sky-memory-list").locator("li").count()) === countBefore + 1,
"exactly one memory-wall entry posted despite two synchronous clicks",
);
await beatLog.log("sky-post", "posted to the memory wall; a fast double-click produced exactly one entry, not two (GAP-20 fix)", page);
await sleep(1200);
await page.getByTestId("sky-mood-select").selectOption({ index: 1 });
await page.getByTestId("sky-mood-note").fill("Tense, but the water's clean again.");
await page.getByTestId("sky-mood-submit").click();
await waitFor(
async () => (await page.getByTestId("sky-mood-latest").count()) > 0,
"mood pulse posts and the latest-pulse readout updates",
);
await beatLog.log("sky-mood-pulse", "a real signed mood/morale pulse was posted - the town's honest mood is now visible, aggregated from real signed events", page);
await sleep(1200);
// =================================================================
// EPILOGUE: trust, made verifiable - every balance checks its own
// signature, and anyone can ship a new mini-app without a gatekeeper.
// =================================================================
await showActTitleCard(page, beatLog, {
label: "epilogue-title",
eyebrow: "Epilogue",
title: "Trust, Made Verifiable",
tagline: "Every balance checks its own signature. Anyone can ship a new mini-app - no gatekeeper required.",
});
// --- Wallet signature verification (headline crypto feature) ---
await page.getByTestId("history-entry").first().waitFor({ state: "visible" });
const firstRow = page.getByTestId("history-entry").first();
const badge = firstRow.locator('[data-testid^="history-signature-badge-"]');
await waitFor(async () => ((await badge.textContent()) ?? "").trim() === "Verified", "signature badge resolves to Verified");
await beatLog.log("wallet-sig-verified", "independent verifyEntrySignature() re-check confirms the entry's Ed25519 signature is genuine", page);
await sleep(900);
const toggle = firstRow.locator('[data-testid^="history-expand-toggle-"]');
await toggle.click();
const detail = firstRow.locator('[data-testid^="history-signature-detail-"]');
await detail.waitFor({ state: "visible" });
await beatLog.log("wallet-sig-expanded", "raw Ed25519 signature + author public key bytes are directly inspectable, not just a claimed verification", page);
await sleep(1600);
await toggle.click();
// --- Upload a mini-app ---
// Already on the home route - showActTitleCard()'s post-card reset
// landed here, and no navigation has happened since. ShellLayout hides
// the "Back to home" link on "/" itself, so backHome() must NOT be
// called here.
await page.getByRole("button", { name: "+ Upload a mini-app" }).click();
await page.getByLabel("Mini-app name").fill("Counter Widget");
await page.getByLabel("Icon (emoji or data URI)").fill("\uD83D\uDD22");
@@ -677,9 +824,9 @@ async function addMotionGraphics(videoDir) {
const assetsDir = resolve(VIDEO_TMP_DIR, "assets");
const introPath = await renderTitleCard({
html: titleCardHtml({
eyebrow: "PatriotHacks 2026",
title: "THE COMMONS",
tagline: "One identity. One signed ledger. No backend.",
eyebrow: "The Hollow, tonight",
title: "Who do you trust when the water turns bad?",
tagline: "One town. Thirteen disconnected services. No server. No central login.",
}),
size: MAIN_VIDEO_SIZE,
durationMs: 2600,
@@ -754,6 +901,10 @@ async function recordAssemblySyncScene() {
console.log("\n=== Scene 2: Assembly real-screen sync (two isolated devices) ===");
const videoDirA = resolve(VIDEO_TMP_DIR, "assembly-deviceA");
const videoDirB = resolve(VIDEO_TMP_DIR, "assembly-deviceB");
// Same stale-recording hazard as recordMainScene() above - wipe any
// leftover webm from a prior crashed attempt before recording.
rmSync(videoDirA, { recursive: true, force: true });
rmSync(videoDirB, { recursive: true, force: true });
mkdirSync(videoDirA, { recursive: true });
mkdirSync(videoDirB, { recursive: true });