docs: refresh DEMO guide (new video + flows) + correct the double-spend disclosure
DEMO.md now points at the regenerated full-feature-demo video (was the stale task-60 clip), lists the new flows (wallet send, Fair Share need, Health->Fair Share interop, Assembly live QV tally, Fair Draw integrity badge, Housing debt), and documents the Bun runner. ECONOMY.md's offline-double-spend disclosure now credits the always-on computeBalances credit-limit rejection at replay (the real protection) instead of mergeReplicas, which is not wired into the live sync pull.
This commit is contained in:
1 parent
d62d346151
commit
fbb0882ac4
2 files changed
+25
-17
No files matched your search
@@ -68,16 +68,18 @@ Then open **two separate browser windows**, both at `http://localhost:5173/demo/
|
||||
|
||||
To show the remaining mini-apps are real, built screens and not "coming soon" placeholders, pick two or three more tiles from the home grid, for example:
|
||||
|
||||
- **Fair Draw** (`/miniapp/fair-draw`) - run a real commit-reveal draw and point out the "verified" badge only ever appears after a genuine `verify()` call returns true.
|
||||
- **Tunnel Safety** (`/miniapp/tunnel-safety`) - crowd-sourced hazard reports with routing around closed segments.
|
||||
- **Assembly** (`/miniapp/assembly`, the shipped tile, separate from the partition-heal harness above) - the normal-operation proposal list, voting, and signed testimony board.
|
||||
- **Fair Draw** (`/miniapp/fair-draw`) - run a real commit-reveal draw: the commit hash is published first, then the "Verified" badge and a replay-derived **"Draw integrity: valid"** badge appear only after a genuine `verify()`/`validateReveal()` over the signed log returns true (a duplicate reveal would flip the integrity badge to "rejected").
|
||||
- **Assembly** (`/miniapp/assembly`) - the demo-seeded proposal already shows a **live quadratic-vote tally (Yes 6.00)** computed from real signed ballots; self-enroll by adding yourself to the roster, then cast a weighted QV ballot and watch the single vote control move the tally (there is one control, not two, and delegation is one global card with a Revoke button).
|
||||
- **Wallet** (home card) - **Send credits** to another resident by account id; the ledger rejects an over-spend past your credit limit, so the mutual-credit economy is a real spend path, not just a mint.
|
||||
- **Fair Share** (`/miniapp/fair-share`) - report your own **need** for a resource and watch the CEEI allocation re-solve live.
|
||||
- **Health Post** (`/miniapp/health-post`) - report several **diarrhea** symptoms; once they cluster, a one-click action offers to **raise the Fair Share water floor** (a real Health -> Fair Share interop for oral rehydration).
|
||||
- **Housing** (`/miniapp/housing`) - run the assignment cycle twice; the fairness-debt ledger rotates the contested slot to whoever lost it last time (credit is granted once per real placement, never per click).
|
||||
- **Tunnel Safety** (`/miniapp/tunnel-safety`) - a hazard reads **"Confirmed by 2 residents"** only when two distinct signers report the same segment; routing avoids confirmed hazards.
|
||||
|
||||
### Fallback: the recorded video
|
||||
|
||||
If a live demo isn't possible, [`.omo/evidence/the-commons-hollow/task-60-the-commons-hollow.mp4`](.omo/evidence/the-commons-hollow/task-60-the-commons-hollow.mp4) is a mechanically recorded (Playwright-driven, not hand-edited) walkthrough, 32.76 seconds total, covering both beats above plus a tour of every other mini-app. Real timestamps from the recording, in case you want to cue straight to a beat:
|
||||
If a live demo isn't possible, [`.omo/evidence/full-feature-demo/the-commons-hollow-full-demo.mp4`](.omo/evidence/full-feature-demo/the-commons-hollow-full-demo.mp4) is a mechanically recorded (Playwright-driven, not hand-edited) walkthrough with real on-screen captions and a motion-graphics pass (synthetic cursor + auto-zoom derived from the real Playwright trace, not hand-keyed). It drives the REAL shipped UI of every mini-app plus the wallet, admin seed, and the upload-a-mini-app flow in one continuous tour (Scene 1), then a genuine two-device WebRTC partition-and-heal (Scene 2).
|
||||
|
||||
- **0:00 - home grid** (wallet card + 13 tiles on the live deployed build)
|
||||
- **0:02.1 - admin seed** ("Load Hollow demo" clicked, real signed `seed.*` events appended)
|
||||
- **~0:16 - 0:28 - honesty-anchor chain** (sensor readings typed through Water Watch, corroboration gate fires, Fair Share's water tile re-solves and updates by **0:06.99** into that beat)
|
||||
- **0:31.07 - Assembly partition-heal converges** (both devices' tallies match: `{"proposalId":"prop","yes":2,"no":1,"abstain":0,"total":3}`)
|
||||
- Total runtime 32.76s, scene A (live build) runs 27.72s, scene B (partition-heal harness) runs 5.04s.
|
||||
It reflects the current hardened app, including: the Water Watch corroboration gate -> Fair Share water re-solve; Farms' real forecast feeding Fair Share's food tile; Housing's fairness-debt cycle; the Mentor apprentice match; a full WHO-IMCI triage classifying "Needs treatment" and posting a real referral; Light Clock's honest sensor/manual-log fallback; Assembly's live QV tally (seeded **Yes 6.00** plus a live self-enrolled **Yes 3.00**) with the collapsed single vote widget; Fair Draw's commit-before-reveal with the **"Draw integrity: valid"** badge and a live wallet credit; and the Assembly CRDT converging to an identical tally after the partition heals. Per-beat frame screenshots are in [`.omo/evidence/full-feature-demo/`](.omo/evidence/full-feature-demo/).
|
||||
|
||||
> Regenerate it with `bun e2e/demoVideoFull.e2e.mjs` (use Bun, not `node`: Node's native TypeScript loader does not resolve this codebase's extensionless relative imports; Bun does).
|
||||
+14
-8
@@ -77,14 +77,20 @@ misreading, so each is defined on its own below.
|
||||
web-of-trust); that is out of scope for a client-only PWA. The small,
|
||||
bounded welcome credit limits the economic damage of a casual Sybil, but
|
||||
does not prevent it.
|
||||
- **Offline double-spend prevention:** because a balance is a replay of the
|
||||
log a device currently holds, a malicious holder can sign two transfers of
|
||||
the same credit to two offline peers. This is DETECTED and resolved on sync,
|
||||
not prevented at signing time: ledgerConflicts.mergeReplicas merges divergent
|
||||
signed logs deterministically (earlier-Lamport-wins) and flags the
|
||||
superseded transfer as a refund. Prevention at signing time would require a
|
||||
trusted sequencer, which would break the local-first guarantee - so detection
|
||||
+ deterministic resolution is the honest design, and it is disclosed.
|
||||
- **Offline double-spend:** because a balance is a replay of the log a device
|
||||
currently holds, a malicious holder can sign two transfers of the same credit
|
||||
to two offline peers (each transfer is valid on its own). Once both land in
|
||||
one log, `computeBalances` replays them in the single deterministic order
|
||||
(`sortForReplay`: Lamport, then author pubkey, then signature) and REJECTS the
|
||||
second as a credit-limit breach - it goes to `LedgerState.rejected` and never
|
||||
applies, so no balance ever goes negative. That rejection runs on every
|
||||
balance read, so the protection is always on: it is detection-plus-
|
||||
deterministic-rejection at replay, not prevention at signing time (which would
|
||||
need a trusted sequencer and break the local-first guarantee).
|
||||
`ledgerConflicts.mergeReplicas` is an additional earlier-Lamport-wins replica
|
||||
merger with explicit refund flagging, available for an offline merge tool but
|
||||
NOT invoked by the live `sync.ts` pull - the live pull relies on the always-on
|
||||
replay rejection above, which is the load-bearing mechanism.
|
||||
- **Live authoritative alerts:** the relay is best-effort; the event-log
|
||||
append/read/replay path never depends on it, so the app keeps working
|
||||
offline. Safety signals (hazards, water alerts) propagate when devices sync,
|
||||
|
||||
Reference in new issue
Block a user