- Add .vercelignore excluding api/ from this Vercel deployment (api/'s
sqlite-backed stores write to a read-only serverless filesystem, and its
top-level *.integration.test.ts files import vitest and would break the
zero-config function convention) - the committed api/ directory itself is
untouched, only excluded from this specific static deploy.
- Override vercel.json's buildCommand to type-check only the app/node
tsconfig projects (tsc -b tsconfig.app.json tsconfig.node.json), since
tsconfig.api.json's "include": ["api"] has no inputs once api/ is
excluded from the uploaded deployment files - package.json's own "build"
script is untouched for local full-repo builds.
- Deploy to a new Vercel project (first-place-overhaul-todo6, account
yoyoyonono / team aaron-thapas-projects) via npx vercel --prod --yes.
Stable canonical production URL:
https://first-place-overhaul-todo6.vercel.app
- Update README's "## Live demo" section to point at the permanent URL,
remove the stale "may already be dead"/"planned separately" temp-preview
language, and note the live deploy is the static frontend only - the
self-hosted sync/blob/admin backend (api/) remains a separate,
self-hosted-only component, not part of this public URL.
The referral and hazard resolve reconstructions now join on the intrinsic referralId/reportId, not the local Event Log id; the doc comments said otherwise.
Identical bug to the healthpost referral one: tunnelsafety.hazard.resolve joined on StoredEventLogEntry.id (a per-device Dexie autoincrement), and hazards sync cross-device - so a hazard resolved on one device showed 'active' forever on every other device and stayed falsely corroborated, and routing kept avoiding a cleared segment. Each hazard report now carries an intrinsic reportId (UUID) in its signed payload; resolveHazard + computeHazardReports join on it. Verified by a cross-device test (resolve matches despite differing entry ids). The convergence review confirmed this was the last such join bug - theclimb/fairdraw/governance/fairshare/assembly all already use intrinsic ids.
Honest-limits section now also discloses: (1) a signed mentor.skillReview / Assembly delegation binds its author but not its subject (learner/delegate id is asserted, not co-signed) - a forgeable class like Sybil, but it cannot forge authorship or inflate QV weight; (2) a healthpost.referral syncs the triage RESULT to the shared relay as the resident's consent-bearing handoff, while all passive/personal health inputs stay strictly local.
trySyncWithBackend fires a best-effort fetch('/api/sync') on many component mounts; in happy-dom it resolves to the dead localhost:3000 origin and the undici socket error could race teardown and flip the run's exit code to 1 even though all 791 tests passed. The global test setup now intercepts only that relay endpoint and rejects instantly with no socket, so best-effort sync still exercises its caught-error path. Verified: WalletCard's sync mount shows 0 ECONNREFUSED and 9/9 full-suite runs exit 0.
decisionFor derived `enacted` from mere membership in the enacted set, so a forged or peer-synced governance.proposal.enacted for a proposal that did NOT pass would render as Enacted. Now enacted requires the proposal to actually pass (isProposalPassed over the signed ballots, the ground truth), so a forged enactment of a failing proposal is ignored. Also relabeled the badge's tally 'Current tally' (it is the live replay-derived tally, not a frozen snapshot) to stop implying the numbers are recorded. New test: a forged enactment of a failing proposal shows no Enacted badge.
healthpost.referral.resolve joined on StoredEventLogEntry.id (a device-local Dexie autoincrement). Once referrals sync cross-device, the same referral has a different local id on each device, so a resolution never matched - a handled case stayed 'open' on every other device, breaking the cross-device clinician loop the referral sync was meant to enable. Each referral now carries an intrinsic UUID (ReferralPayload.referralId) in its signed payload, and the resolve + extractReferrals join on that stable id. Verified by a test asserting a resolve matches its referral despite differing entry ids.
The Health Post -> Fair Share water-floor interop needs >=3 DISTINCT diarrhea reporters (anti-inflation), so it was not demonstrable on a single fresh device. The hollow-demo-v3 seed now appends 5 foreign-signed diarrhea symptom reports from 3 distinct resident identities, so loading the demo shows an elevated dispatch priority + the one-click Raise Fair Share water floor action with no manual multi-device setup. Verified cold on the real surface (banner present, diarrhea count 5, dispatch elevated). Fixture bumped v2->v3.
Governance had no teeth: a passed QV tally produced no recorded consequence. A proposal with Yes weight strictly greater than No can now be Enacted by any enrolled resident, appending a signed governance.proposal.enacted event; the proposal then shows an Enacted badge with the frozen tally and honest copy (the Assembly records a binding decision, it cannot force anyone - there is no server underground). Derived purely by replay (extractEnactedProposalIds), idempotent, and allowlisted so the decision syncs cross-device like ballots. Verified on the real surface (self-enroll -> Enact -> badge replaces button). 47 governance/assembly tests + the sync allowlist test; full gate 790 tests + build green.
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.
The waterborne->water-floor interop fired on a single resident tapping Report diarrhea 5x (count>=5), letting one person raise everyone's water ration - contradicting Tunnel Safety's distinct-reporter corroboration standard. Added countDistinctSymptomReporters (distinct authorPubkeys) and gated the action on >=3 DISTINCT residents. Relabeled the tally 'Symptom tally (this device)' since symptom reports stay local (not synced). Follow-up: seed a demo outbreak (foreign-signed diarrhea reports) so it is cold-demoable single-device.
The default-deny push allowlist was too coarse: it excluded entire families whose own code comments promise cross-device delivery, silently breaking real features. Most critically healthpost.referral(.resolve) - a resident's consent-bearing handoff of their own case to a clinician - never reached a second device, so the 'reaches real care' half of Health Post was dead cross-device (the passive healthpost.symptomReport stays local). Also allowlisted mentor.skillReview/mentor.match (community apprentice-mentor matching), theclimb.tiebreak (the audit trail must travel with its plan), and fairdraw (public-by-design verifiable lottery).
Repaired the drifted demo-video beats (Assembly: the removed direct-vote control -> real QV ballot after self-enrolling, both scenes; Health Post: answer the new WHO-IMCI fever question so Classify enables; Fair Draw: read the new draw-integrity badge) and regenerated the full-feature demo. The video now shows the real fixed behavior: Assembly live QV tally (seeded Yes 6.00 + a live self-enrolled Yes 3.00), the single collapsed vote widget + global delegation, Health 'Needs treatment' -> real referral, Fair Draw 'Draw integrity: valid', honest actigraphy, and the Farms->Fair Share + Water->Fair Share interop edges. RUNNER NOTE: run with 'bun e2e/demoVideoFull.e2e.mjs' - Node 24's native TS loader cannot resolve the codebase's extensionless relative imports; Bun does.
Documents the economy spend path, the root-cause fakeness fixes, Assembly QV integrity, the new features (Fair Share need form, Farms power budget, Mentor transitive, Fair Draw badge, Housing debt), the Health->Fair Share water-floor interop, and the privacy allowlist, each with QA evidence paths. Corrects the 'no hardware / never a simulated sensor' line to account for Light Clock's honest device actigraphy.
The demo seed predated the recent fixes: Assembly tally showed 0.00 (dead castVote path removed), Housing never rotated fairness-debt (identity-matrix prefs), Tunnel never corroborated (one signer), Mentor had no reachable match. Now: founding residents are enrolled with putResidentCredit + cast real signed QV ballots (yes 6.00); the demo identity and a neighbour contest one single-capacity slot so debt accrues then flips; a genuinely foreign-signed corroborating hazard (appendEntry, re-verified) makes seg-market-bypass Confirmed by 2; the local identity is a still-learning apprentice and a foreign-signed mentor Good review yields one real match. Fixture bumped to hollow-demo-v2.
npm run build (tsc -b) enforces noUnusedLocals, which tsc --noEmit did not surface, so two leftovers from the wave-1 lanes were silently failing the production build: findfamily.ts hashNameToPoint (orphaned by the AEAD-seal rewrite) and an unused test import. Removed both; npm run build is green again.
First cross-mini-app interop for breadth: when the community symptom tally shows a diarrhea cluster (dispatch priority elevated/urgent, a waterborne-outbreak signal), the clinician gets a one-click action to raise the Fair Share water floor (postFairshareFloor water) so every resident is guaranteed enough water for oral rehydration. Real clinician decision, shared key = the water resource, no fabricated data; links Health Post + Fair Share + the water theme.
runSync pushed every local event type to the pubkey-stamped relay, letting a puller correlate healthpost/sky.morale/wallet under one identity. Push is now a default-deny allowlist (health/mood/lightclock/mentor/fairdraw/testimony stay strictly local; only merge-needing types sync). Default WebRTC signaling is now self-hostable (VITE_SIGNALING_URL -> ws://localhost:4444), public host opt-in only; DEPLOY.md documents self-hosting.
Criticality used raw direct in-degree, so a deep/leaf prerequisite the whole settlement transitively rests on could slip under the at-risk threshold. Added computeTransitiveDependentsCounts (DAG closure, GAP-15 edge normalization + cycle guard); kept the direct count for mentorMatching. A deep leaf prerequisite now flags at-risk.
RevealDraw claimed a re-roll after a published commit is auditable+rejected, but validateReveal had zero production callers. The reveal flow now replays the signed log and renders a Draw integrity: valid/rejected badge; a duplicate or pre-commit reveal flips it to rejected.
computeQvTally weighed votes by the unsigned WebRTC-synced CRDT residentCredits, so a peer could set credits to 1e6 and dominate any tally. extractQvBallots now carries the signed tamper-evident credits and the tally weighs sqrt(min(ballot.credits, DEFAULT_QV_CREDITS)); residentCredits is used only as the enrolled-membership set. Also collapsed the inert direct-vote widget into the one signed QV ballot and moved delegation to a single global card with a Revoke button.
The Climb held its plan in useState (wiped on reload, never collective) and its Fair Draw tie-break used Math.random with commit+reveal+verify in one call (self-theater, non-reproducible). The plan is now theclimb.plan.propose/commit signed events replayed on mount (survives reload, identical on a second identity); the tie-break seed is derived deterministically from signed log content, the commit is appended before the reveal, and verifyClimbTieBreakAudit re-checks it from the log. Plus inline input validation.