286 Commits
Author SHA1 Message Date
OmO Orchestrator a1cefa75d1 fix(flake): explicitly put openssl on PATH for nix run
'nix run' threw 'spawnSync openssl ENOENT' on the real NixOS target even
though openssl is installed there system-wide - nix run's environment
doesn't carry ambient host PATH entries like /usr/bin, only what the
flake explicitly provides. run-local.mjs shells out to openssl to
generate its HTTPS cert, so pkgs.openssl now gets explicitly prefixed
onto PATH in the apps.default wrapper script, guaranteeing it's
reachable regardless of host state - the actual Nix-idiomatic fix,
not a hope that a system binary happens to be on PATH.

Verified via the real flake: nix build succeeded, and nix run fetched
openssl-3.5.9-bin from cache.nixos.org specifically because of this
reference (proof it is a real, explicit dependency now), then served
HTTPS successfully with a real generated cert.
2026-11-20 23:48:10 -05:00
OmO Orchestrator 972f578584 fix(run-local): serve HTTPS by default with an auto-generated self-signed cert
Root cause of the wallet balance stuck at '--' and every other mini-app
write silently failing: @noble/ed25519's signing needs crypto.subtle,
which every browser restricts to a secure context (https://, or
http://localhost). A plain http://<lan-ip>:port origin - exactly what a
second device on the same network needs to reach this - is NOT a secure
context, so crypto.subtle is undefined there and init()'s promise
rejects with no .catch(), leaving accountId stuck at undefined forever.

Reproduced directly against the live deployment with a real headless
browser: confirmed 'crypto.subtle must be defined, consider polyfill'
in the console, isSecureContext: false. Fixed by generating a
self-signed cert (openssl, auto-generated on first run, reused after,
SANs cover localhost/127.0.0.1/every detected LAN IPv4) and serving
HTTPS by default - verified end to end: hasSubtle: true,
isSecureContext: true, wallet balance resolves to a real value instead
of '--'. HTTP_ONLY=1 opts back into plain HTTP for same-machine-only
testing, where http://localhost is already a secure context on its own.
2026-11-20 23:43:06 -05:00
OmO Orchestrator 033db1bfd1 fix(run-local): default data dir to cwd, not the read-only nix store
'nix run' failed with ENOENT trying to mkdir inside the built package's
own Nix store path (.../the-commons-hollow-0.0.0/.data) - Nix store
paths are immutable by design, mkdir there can never succeed regardless
of permissions. The data directory must default to somewhere the
invoking user actually controls: process.cwd(), not the script's own
install location. Verified end to end through the real flake: 'nix
build' + 'nix run' from a separate writable directory now creates
.data there and serves real HTTP 200.
2026-11-20 23:28:39 -05:00
OmO Orchestrator 2751b3e701 chore: untrack superseded video renders, keep only full-v11.mp4
363MB of accumulated video-render iterations (every full-vN.mp4 from this
session's video-rework work) were all still tracked in git, ballooning
.git to 500MB+. This is almost certainly why a shallow clone over HTTP
was failing ('RPC failed; curl 18 transfer closed with outstanding read
data remaining', 'fetch-pack: unexpected disconnect') - a --depth 1
clone still has to transfer every currently-tracked file's full content.

Untracked the 10 superseded versions (files stay on disk locally, just
no longer tracked going forward); gitignored the whole renders/ dir
except full-v11.mp4, the current canonical render README.md links to.
This does not rewrite existing history (no force-push, nothing
destructive) - it shrinks what a FRESH --depth 1 clone needs to
transfer from here forward, since shallow clones only need the tip
commit's tree, not historical blobs.
2026-11-20 23:20:20 -05:00
OmO Orchestrator c6f91e8586 docs(promo-slides): match slides to full-v11's big-headline+pill style
Replace the .ledger-entry sig/type/fields/note markup (hex sig, JSON
fields, monospace note) with .app-entry's simpler label/headline/
optional-type-pill, mirroring buildComposition.mjs's current per-app
text beat for beat. No ledger/hex/JSON styling remains in the deck.
2026-11-20 23:15:21 -05:00
OmO Orchestrator 8cdfcf631e feat(flake): add 'nix run' launcher, no system config needed
Per explicit preference: no NixOS module/global config edit required.
'nix run .' starts one process serving both the static frontend and
api/* on one auto-picked free port (tries 3001, falls back to any free
port). Ctrl+C or kill stops it; only ./.data's SQLite files persist.
Verified directly: real HTTP 200 on the served frontend.
2026-11-20 23:11:42 -05:00
OmO Orchestrator f2764769a8 fix(promo-video): drop frozen-frame ledger motif for real per-app footage (full-v11)
Per explicit feedback on full-v10: the "SIGNED EVENT LOG - LIVE" terminal
panel (hex hash, type/fields JSON line, blinking cursor) and the per-app
frozen-still hold are both gone.

- buildComposition.mjs: removed layoutAppStage's static-snapshot hold +
  extractAppClips() entirely; each app's window now plays its own real
  captured clip continuously. Per-app text is a single large/bold/short
  plain-language headline with an optional small event-type pill - no
  hash/JSON/monospace anywhere.
- tour.mjs: added app-<id>-start/-end marks around all 13 mini-apps plus
  a linger() helper (real scroll + :hover motion, never a held frame) so
  a from-scratch recapture can give each app a dedicated, longer real clip.
  Also fixed a real flake: ShellLayout's boot-time auto-seed means the
  Admin page's demo-load status now usually reads "already loaded", not
  "Demo data loaded" - the beat's waitFor accepts both.
- capture.mjs: CLIP_SPEC slices one real clip per mini-app via the new
  marks (replacing the old 3 giant per-act blobs) for that recapture path.
- src/lib/farms.ts: fixed a real LP-solver bug surfaced while recapturing -
  a crop with kWhPerM2: 0 under any positive energyBudgetKwh produced a
  false "infeasible" (an all-zero-coefficient constraint row breaks
  javascript-lp-solver's simplex solve). Now the energy constraint is only
  added when some eligible crop actually draws power. Regression test added.

SHIP-NOW NOTE: the from-scratch recapture (dedicated 8-12s real dwell per
app) hit an additional intermittent Health Post hang under deadline
pressure; full-v11 instead reuses the already-captured, already-verified
act1/act2/act3 footage, playing each app's own real sub-window
continuously (old, shorter per-app dwell - disclosed, not padded with any
hold). A true recapture with longer dwell is the follow-up.
2026-11-20 23:09:46 -05:00
OmO Orchestrator 79f8f3899e docs: remove the 'note on timing' section from README
Per direct request: everything happened well within the official build
window, so a defensive caveat about pre-window planning activity raises
a non-issue a reader has no reason to ask about. Removed, not required
disclosure (distinct from ECONOMY.md's actual limitations, which stay).
2026-11-20 23:04:26 -05:00
OmO Orchestrator d9277502e4 docs: add recording script for user's own submission video
Two throughlines (one signed identity/log; real cross-app wiring via
that same log), ~3min timed script with on-screen actions, tech stack
covered briefly per the form's explicit ask. Per direct user request:
not a feature-by-feature tour of all 13 mini-apps.
2026-11-20 23:03:23 -05:00
OmO Orchestrator 05df4133a1 fix(miniapps): format every remaining displayed number to 2 decimals
Follows the fairshare/ResourceTiles fix (8c434b5) with the same bug class
found everywhere else a continuous/computed value was echoed raw in JSX:

- FarmsScreen: the grow-light power budget echo (same live Fair Share CEEI
  allocation ResourceTiles already fixes)
- PlantingInputForm / TemperatureEntryForm: echoed plot area, crop GDD/
  yield/kWh, and min/max temperature entries
- shell WalletCard + TransactionHistory: the wallet balance, send-status
  amounts, and per-row transaction amounts - the same wallet-balance bug
  as fairshare, in the app's single most prominent wallet display
- The Climb's ScheduleTimeline / CongestionHeatmap / ScheduleInputForm:
  traced the min-cost-flow solver's own types (ShaftEdge.capacityPerPeriod,
  WaveDemandGroup.count, SurfaceCapacityPeriod.capacity) and confirmed none
  are integer-constrained, so totalDelivered/totalCost/peopleMoved/queue
  lengths/wait totals can all carry real fractional precision
- Water Watch DeviceMonitor: the reported reading feed value
- Light Clock ManualLogForm: the echoed hours/lux manual-log entries

Every fix ships with a proving test mirroring ResourceTiles.test.tsx's
pattern: a sanity-check that the raw value genuinely exceeds 2 decimal
digits before asserting the rendered text is truncated to exactly 2.

Investigated and left unformatted (genuine integer/bounded values,
confirmed by tracing source, not variable-name guessing):
- Housing's fit score and fairness-debt ledger (always an integer sum by
  construction - traced buildRankedCyclePreferences/solveHousingAssignment)
- Mentor's dependents-count/holder-count and match score (sum of integers)
- Tunnel Safety's route distance (sums a static, fixed-integer demo graph,
  never user input)
- Health Post's triage ageMonths (documented "whole months" field)
- Testimony's median rating (division by 2 only, never exceeds 1 decimal)

Full suite (870 tests / 99 files), npm run build, and npx oxlint all pass.
2026-11-20 22:47:40 -05:00
OmO Orchestrator 8c434b5cb9 fix(fairshare): format every remaining displayed number to 2 decimals
The earlier fix only covered the CEEI allocation quantity (qty). Three
more unformatted numbers remained on the same screen: the wallet
balance, each tile's supply ("of X pool"), and the echoed need amount in
the post-submit status message - all raw, no .toFixed(), all capable of
showing many decimal digits (balance from any wallet.issue amount;
supply from a real cross-app settlement like Farms' LP/GDD forecast,
which is frequently non-round; the need echo straight from whatever a
resident types).

Fixed all three with .toFixed(2), matching the project's established
convention. New tests prove each with a genuinely non-round value (not
a coincidentally-clean fixture): a fractional wallet.issue amount, a
fractional seed.resource.food value modeling Farms' real forecast credit,
and a 9-decimal need amount typed into the real form and submitted via
the real UI.
2026-11-20 22:34:01 -05:00
OmO Orchestrator 31fbe9112e docs: point README/checklist at full-v10.mp4 (~3min, per-app pacing)
full-v10.mp4 fixes the "still too fast" feedback against v9: every one of
the 13 mini-apps now gets its own genuinely-timed segment (8.5-13s) with a
single plain-language benefit blurb, using the full 3-minute budget
deliberately rather than compressing everything into ~90s. Updated both
docs' descriptive text to match the real current runtime and content.
2026-11-20 22:11:31 -05:00
OmO Orchestrator 7550a7f1bd feat(promo-video): one blurb per mini-app, ~3min runtime (full-v10)
User feedback on full-v9.mp4 (91.9s): "too fast, too much text on screen."
Directive: "go over every mini app and have a short blurb about what it
does for you... You have 3 minutes."

- Replace all 13 ledger notes with short, second-person, benefit-framed
  blurbs (what each app does FOR a resident, not its internal mechanism).
- Give each of the 13 mini-apps its own individually-timed segment inside
  its act (previously several apps shared one continuously-playing window,
  which is why it still felt rushed after the last "one entry at a time" fix).
  Window duration = max(reading time at ~2 wps, real footage dwell, 8.5s floor).
- Hold mechanism: each app's own real dwell (empirically verified via
  frame-diffing + manually reading extracted frames from act*.mp4 - not
  derived from capture-manifest.json beats, which mark in-app events rather
  than the UI's own on-screen window, and don't account for the brief
  "back to home" / cross-app-revisit beat the real recording takes between
  almost every app pair) is captured as ONE real still frame
  (assets/app-<id>-hold.png) that becomes that app's entire on-screen
  window via a plain GSAP opacity set - no live <video> for any of the 13
  apps. Two live-video designs (shared-act-file clamp, then per-app trimmed
  clips) were tried first and both intermittently rendered a BLACK frame at
  an app's window start (reproduced on both a 0.85s and a 3.7s dwell clip),
  so live playback was dropped in favor of the always-reliable static
  snapshot; intro/epilogue keep real video playback (single dedicated
  files, never observed to glitch).
- Total runtime 182.1s (within the ~175-185s / "3 minutes" target), verified
  via ffprobe and a 39-frame (start/mid/end x 13 apps) manual QA pass
  confirming the correct blurb, the correct app on screen, and a clean
  hold with no bleed-through from a neighboring app.

Render: renders/full-v10.mp4 (182.1s), via the hyperframes CLI.
2026-11-20 22:09:39 -05:00
OmO Orchestrator 70ff5199bb docs: point README/checklist at full-v9.mp4, drop stale "NEW badge" copy
full-v9.mp4 fixes the two problems flagged directly against v8: ledger
entries no longer stack 4-6 deep per act, and the "NEW"/before-after
framing is gone entirely (an introduction has no "before" for a
first-time viewer). Updated both docs' own descriptive text to match,
not just the file reference.
2026-11-20 20:42:02 -05:00
OmO Orchestrator 9a5833553b fix(promo-video): one ledger entry on screen at a time, drop NEW framing
Act II alone stacked all 6 mini-apps' two-line ledger entries visible
simultaneously - way too much text on screen at once, and every entry
carried a before/after "isNew" framing (NEW badge + detail line) that
makes no sense for a first-time introduction with no "before" to
contrast against.

- buildTimeline(): drop isNew/detail from every ledger entry; merge
  each entry's mechanism + outcome facts into one plain description.
  Each entry now carries an explicit "at" (seconds into its stage)
  derived from capture-manifest.json beats, cross-referenced against
  the raw per-app screen transitions in assets/act*.mp4 (reordered
  Act II to Farms/FairShare -> Housing -> Mentor -> HealthPost ->
  LightClock -> TheClimb to match footage order).
- promo.html entries markup: drop the NEW badge/detail-line rendering;
  wrap entries in a fixed-height .ledger-entries stack with each
  .entry absolutely positioned so only one occupies the panel.
  GSAP: replace the shared stagger-reveal-and-persist with a per-entry
  scan-wipe-in at its "at" time and a fade-out right before the next
  entry's reveal, so at most one entry is ever visible per stage.

Re-rendered renders/full-v9.mp4 (91.9s, matches prior runtime).
2026-11-20 20:39:50 -05:00
OmO Orchestrator 020b71149d refactor(healthpost): move SymptomTallyDashboard inline styles to CSS module tokens
The waterborne-outbreak info box (background #eff6ff, border #bfdbfe) and
its two <p> elements used static inline style={{...}} instead of the
project's CSS-Modules + design-token convention.

- Added .waterborneInterop / .waterborneInteropMessage /
  .waterborneInteropStatus classes to SymptomTallyDashboard.module.css,
  token-referenced via --space-3/--space-2/--radius-sm/--text-body-size.
- The background's closest existing token is --color-accent-soft
  (#e8f2ff); no existing token matched the border color, so added
  --color-accent-border: #bfdbfe to tokens.css following the existing
  --color-warning-border naming precedent.
- Verified: vitest (5/5 green), tsc -b && vite build clean, oxlint clean
  (0 warnings in touched files), before/after Playwright screenshots of
  the live /miniapp/health-post view render identically.
2026-11-20 20:02:19 -05:00
OmO Orchestratorandsisyphus-dev-ai 913b4e03da refactor(fairshare): move ResourceTiles need-form inline styles to CSS module tokens
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-20 19:57:46 -05:00
OmO Orchestrator adb3bde4ee refactor(admin): migrate AdminSeedPanel inline styles to a CSS module
AdminSeedPanel.tsx was 100% inline-styled with hardcoded hex colors that
didn't match the app's real design tokens (e.g. error #b00020 vs the real
--color-negative #d4380d). Extract every static style={{...}} into
AdminSeedPanel.module.css, mapping each value to the matching token:
- #555 text -> var(--color-ink-soft)
- #b00020 error -> var(--color-negative)
- #1a7a1a success -> var(--color-positive)
- #8a6d00 disclaimer -> var(--color-warning-strong)
- #ddd section border -> var(--color-border)
- 24px/16px spacing -> var(--space-6)/var(--space-4)
- system-ui font stack -> var(--sans)

Follows the exact class-naming/value convention already used by the
sibling AdminAggregatePanel.module.css (container, section, heading,
description, error). No layout/structure change; visual proportions are
preserved except for the off-brand colors being corrected.

Verified: vitest run src/admin/AdminSeedPanel.test.tsx (11/11 passing),
npm run build (clean), npx oxlint on both changed files (clean), and a
Playwright before/after screenshot comparison of the live /admin route.
2026-11-20 19:57:12 -05:00
OmO Orchestratorandsisyphus-dev-ai 5868f045bc refactor(admin): move AdminAggregatePanel inline styles to CSS module tokens
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-20 19:56:26 -05:00
OmO Orchestratorandsisyphus-dev-ai 18a2fb6cbb refactor(farms): move grow-light budget row inline styles to CSS module tokens
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-20 19:56:07 -05:00
OmO Orchestrator a07f35c945 refactor(shell): move WalletCard inline styles to CSS module tokens
Migrate every static inline style={{...}} object (and the inputStyle
const) in WalletCard.tsx to classes in WalletCard.module.css, matching
the file's existing className convention. Exact-matching design tokens
from src/styles/tokens.css are used (8px spacing -> var(--space-2));
values with no exact token match (border-radius 8px, border color
#d0d5dd, font-sizes 12/13/14px, text color #6b7280, max-width 110px)
are kept as literal CSS so rendered output stays pixel-identical,
unchanged from before this refactor.
2026-11-20 19:55:21 -05:00
OmO Orchestrator c6314061fd fix(promo-video): correct title-card copy for the now-real backend
Same two issues the submission-answer rewrite fixed, found in the video's
on-screen text: the outro card said "Thirteen mini-apps" with no stated
referent for a viewer with no context, and the intro card said "No
server" which is now false (a self-hosted backend genuinely exists).
Text-only change in tour.mjs; re-rendering the promo video with these
corrections is a separate follow-up.
2026-11-20 19:46:27 -05:00
OmO Orchestrator 3b7bc6b67c fix(fairshare): format CEEI allocation quantity to 2 decimals
ResourceTiles.tsx rendered the CEEI water-filling solver's raw iterative
output directly (bare {qty}, no formatting) for all 4 resource tiles. The
demo's seed data always used parallel need vectors across agents, which a
Fisher-market CEEI solve degenerates to a clean equal-budget-share split
for regardless of magnitude - so the bug never showed in the recorded
demo. A real resident's real reported need (or any non-parallel need
vectors across residents) produces a genuine fractional market-clearing
split with many decimal digits, rendered verbatim with no truncation.

Fixed with .toFixed(2), matching the project's existing 2-decimal
convention (Farms' harvest forecast, Water Watch's reading value). New
test uses a genuinely non-degenerate (non-parallel) need scenario,
confirmed via a sanity check that the raw solver output actually carries
more than 2 decimal digits before asserting the rendered text is
truncated to exactly 2 - proving the fix against the real bug mechanism,
not a coincidentally-round fixture.
2026-11-20 19:46:27 -05:00
OmO Orchestrator c630205fa1 docs: rewrite all 4 submission answers - no problem-restating, no unexplained context, singular voice
Cut the narrative problem-setup opening, the unexplained 'thirteen
disconnected gadgets' reference, and every bare number (13/15) with no
stated referent. Every field now leads directly with the problems solved
and the mechanism that solves them, self-contained for a reader with no
project context. Switched all first-person plural to singular (solo
build). Field 4 also drops an odd 'grepped the README for a credits
section' aside that read like leftover process narration, not a direct
answer. Re-verified word counts: 185/192/187/58, all <=200.
2026-11-20 19:16:14 -05:00
OmO Orchestrator 19c62a866b docs: correct Field 1 for the now-real self-hosted backend
Field 1 didn't claim anything false, but it undersold what the backend
push actually bought: a shelter cut off from the surface can self-host its
own civic infrastructure on hardware it owns, with no outside server in
the loop - a point that belongs in the non-technical impact answer, not
just the technical one. Re-verified at 199/200 words.
2026-11-20 19:12:34 -05:00
OmO Orchestrator 503255a113 docs: correct submission answer for the now-real backend, update video/checklist refs to v8
Field 2 of SUBMISSION-ANSWERS.md said "no server holding application state"
and undersold the backend as optional - inaccurate after this session's real
self-hosted blob/sync/admin backend, Nix flake deployment, and
domain-separated pseudonym sync privacy fix. Rewritten, re-verified at 199/200
words. Also points FINAL-CHECKLIST.md and README.md's demo-video section at
full-v8.mp4 (the just-rendered, richer-detail cut), not the now-stale v7.
2026-11-20 19:09:07 -05:00
OmO Orchestrator bf6cddb6a3 feat(promo-video): enrich all 13 mini-app ledger entries with mechanism + session-fix detail
Each of the 13 app-specific SIGNED EVENT LOG entries (act1/act2/act3) grows
from a single terse note into note + a dimmer second-line detail ("NEW"
badge where this session actually fixed something real): Water Watch's
pipe-graph-adjacency corroboration, Fair Share's power/cooling trend
events, Tunnel Safety's geolocation fallback, Find Family's self-
registration, Farms' live Fair Share power read, Housing's solver-enforced
accessibility/medical constraints, Assembly's wired QR-sneakernet camera
scan, and Sky's cross-device memory-wall/mood-pulse sync - plus deeper
mechanism detail (WHO-IMCI, Hannay19 circadian model, min-cost-flow +
congestion sim, ts-fsrs scheduling, commit-reveal lottery) for the other
five. Chapter-card window (CH_DUR 2.6s -> 3.1s) and per-entry stagger
(0.5s -> 0.6s) are lengthened modestly - the only real levers available
without touching captured footage - giving the richer two-line entries
room to read. Baseline full-v7.mp4 was actually 89.87s (not ~3min); new
full-v8.mp4 is 91.87s, a ~2s/2% growth. Re-rendered via the real
hyperframes pipeline; frame read-back at each act confirms all 13 entries
are legible and uncut.
2026-11-20 19:06:55 -05:00
OmO Orchestrator 93101cf237 docs: add 13-mini-app concept-execution coherence audit evidence
Full read-only audit of all 13 mini-apps against README's problem-mapping
table + each module's own doc comments. 6 COHERENT (lightclock, fairdraw,
healthpost, theclimb, sky, mentor), 7 GAP-FOUND and fixed in prior commits
(fairshare, waterwatch, tunnelsafety, housing, assembly, findfamily, farms).
2026-11-20 17:58:56 -05:00
OmO Orchestrator 68df7f0761 fix(farms): source grow-light power budget from Fair Share's live allocation
coherence-audit/farms.md #3: FarmsScreen.tsx's energyBudgetKwh was a
free-text number the grower typed, fully disconnected from Fair Share's
real power supply/allocation despite the README calling it "a fixed
grow-light power budget".

- FarmsScreen.tsx: replace the energyBudgetInput text state with a live
  read via useActiveAccountId + useEventLogEntries + computeFairshareAllocation
  (mirrors ResourceTiles.tsx's own live-allocation read and
  settleFarmsForecast's readAll()+computeFairshareAllocation call pattern),
  gated on allocation.supply.power > 0 so an account that merely
  participates in some OTHER resource market (e.g. food) before any power
  market exists doesn't get a fabricated hard-zero budget from that map's
  zero-initialized default. solveFarmsPlantingOptimizer's constraint logic
  is untouched.
- The manual number input becomes a read-only display of the resolved
  Fair Share figure ("No Fair Share power allocation yet (unlimited)" when
  absent).
- ceeiSpike.ts: fixes a real pre-existing divide-by-zero in
  solveCeeiWaterFilling, surfaced by this wiring - a market good with zero
  total bids (price 0 despite positive supply, i.e. no agent currently
  wants it) produced 0/0 = NaN that poisoned every later iteration and
  every other resource's allocation for that agent. Zero demand now
  allocates zero honestly instead of propagating NaN.
- FarmsScreen.test.tsx: new test proves the LP schedule re-solves when
  Fair Share's real power allocation changes (1 kWh -> 2.00 kg forecast,
  10 kWh -> 20.00 kg), with no manual budget entry.
2026-11-20 17:58:03 -05:00
OmO Orchestrator 21bae7495c fix(fairshare): guard power/cooling cycle settlement against remount duplication
Manual browser QA of the previous fix (eb72625) surfaced a real bug: the
"genuinely new value" guard lived only in a useRef, which resets on every
component remount (a page reload, or React remounting ResourceTiles).
Reloading the Fair Share screen re-announced the SAME unchanged power/
cooling total as a brand-new fairshare.allocation.cycle event every time,
corrupting the trend with duplicate flat points (observed first-hand: a
browser QA session produced 4 power cycle points - [100,250,250,250] -
from only 2 real supply changes).

Fix: check the real, already-signed Event Log history
(getAllocationHistory's last point) before settling, not only the
in-memory ref - a ref reset by remount no longer matters once the guard's
source of truth is the persisted log itself. The ref stays as a same-
session fast path to skip a redundant recheck across rapid re-renders.

Added a regression test exercising the exact unmount/remount sequence
that exposed the bug, verifying the event count stays at 1 after a
remount with no real change, and still settles correctly on a genuine
follow-up change.

Re-verified via real-browser QA (chromium, owned/pipe engine): seeded
power twice (100 -> 250) and cooling twice (40 -> 70) through the live
admin panel and Fair Share UI; both TrendCharts now render a real
multi-point SVG trend (screenshots in .omo/evidence/coherence-audit/).
2026-11-20 17:56:17 -05:00
OmO Orchestrator 70a684c238 fix(assembly): wire the QR-sneakernet air-gapped fallback into the shipped screen
The audit (.omo/evidence/coherence-audit/assembly.md) found src/lib/qrSneakernet.ts
fully built and tested (encodeDelta/decodeFrames/FrameCollector/renderFramesToDataURLs/
scanFrameFromImage, real qrcode+jsQR, CRC32-checked chunking) but with zero callers
outside its own test file, and no getUserMedia call anywhere in the app - the
README's claimed "QR-sneakernet air-gapped fallback" third resilience layer was
unreachable from the UI.

Adds QrSneakernetPanel (new component under src/miniapps/assembly/), wired into
AssemblyScreen.tsx alongside (not replacing) the existing WebRTC sync toggle:

- "Export state as QR": encodeAssemblyState -> encodeDelta -> renderFramesToDataURLs,
  cycling frames with a visible "Frame N of M" counter.
- "Scan a device's QR": real getUserMedia camera permission prompt with a clean
  denied/unavailable error UI, <video> + canvas capture loop feeding
  scanFrameFromImage into a FrameCollector, applying the reassembled delta via
  applyAssemblyUpdate once collector.isComplete(), with a "synced via QR, N frames
  received" success state. Camera track.stop() runs on cancel/unmount/completion.

Tests (QrSneakernetPanel.test.tsx, 7 passing): export frame rendering/counter,
getUserMedia denial + no-camera error states, cancel/unmount stop the stream
cleanly, and a genuine round trip - real QR bitmaps decoded via scanFrameFromImage,
reassembled via FrameCollector, applied via applyAssemblyUpdate, with the target
replica's CRDT state proven equal to the source's.

QA (e2e/assemblyQrSneakernet.e2e.mjs, Playwright): the export UI's rendered PNGs
decode via the real scanFrameFromImage and match the transport's own encodeDelta
output; a real camera-permission-denied path renders the error UI in headless
Chromium; and - the strongest evidence - a full device-to-device round trip via
Chrome's --use-file-for-fake-video-capture fed a real Y4M video built (ffmpeg-static)
from the actual PNG bytes the export UI rendered, driving the real "Scan a device's
QR" button end to end and confirming the receiving device's CRDT state matches what
was exported. Evidence: .omo/evidence/coherence-audit/assembly-qr-sneakernet-e2e.json.
2026-11-20 17:51:31 -05:00
OmO Orchestrator dd49df8e26 fix(findfamily): resident self-registration into the searchable directory
Closes the confirmed coherence gap in .omo/evidence/coherence-audit/findfamily.md
(finding #2): SEED_DIRECTORY was the only directory source anywhere, with no
append path and no findfamily.* Event Log payload type, so no resident could
ever be found however sound the PSI crypto was.

- Add findfamily.register payload type + type guard, and registerInDirectory()
  / extractRegisteredDirectoryEntries() in a new findfamilyEvents.ts, following
  the exact per-mini-app local-payload pattern (skyMemoryWall.ts/testimony.ts) -
  no central payload union exists in eventlog.ts to extend.
- registerInDirectory() signs and appends through the real append() (the sole
  local-signing write path) - never bypasses it.
- SearchScreen.tsx now reads the live Event Log via useEventLogEntries(),
  merges findfamily.register entries with SEED_DIRECTORY fresh on every
  render (same replay-only pattern as ledger.ts), and feeds the merged
  directory into both the local PSI channel and the nearby-device WebRTC
  channel. Added a "Register yourself or a missing family member" form with
  honest success/error states matching the search form's own pattern.
- Added findfamily.register to sync.ts's PUSH_TYPE_ALLOWLIST under the real
  identity key: a resident voluntarily registering as findable is the same
  "public community data" category as sky.memoryWall/testimony (not personal
  data like lightclock.*), and the whole point is being found by OTHER
  devices - documented reasoning inline, including why this does not
  reintroduce the plaintext-query leak directory.ts's doc comment warns
  about (that guarantee is unconditional regardless of where entries came
  from).
- README.md: one-line clarification that the privacy guarantee is on the
  searcher's query, not on directory membership.

Tests:
- findfamilyEvents.test.ts (new): payload guard, append+extract round trip,
  validation, distinct ids per registration, sync-wiring, and the real
  end-to-end behavioral proof - a name registered via registerInDirectory()
  is found by a genuine findFamilyMember()/PSI search merged with
  SEED_DIRECTORY, with every seed fixture still searchable unchanged.
- SearchScreen.test.tsx: three new tests driving the real UI form (register
  -> search -> match), confirming seed fixtures still work after an
  unrelated registration, and the empty-name guard.
- sync.test.ts: new test proving findfamily.register is now pushed under
  the real identity key (not a pseudonym), following the existing
  sky.memoryWall.entry/testimony.statement allowlist test pattern.

QA: targeted vitest (5 files / 44 tests) green, full npm run test green
(93 files / 848 tests), tsc -b clean for all touched files, oxlint has no
new errors (pre-existing warning baseline unchanged). npm run build
currently fails on src/miniapps/farms/FarmsScreen.tsx - that is unrelated,
uncommitted WIP from a concurrent session editing this same checkout
(confirmed via git diff; not part of this change, not staged here).
2026-11-20 17:50:27 -05:00
OmO Orchestrator eb726256ac fix(fairshare): write power/cooling allocation.cycle events so their trend charts populate
Water (settleCorroboratedReading) and food (settleFarmsForecast) were the
only resources that ever appended a fairshare.allocation.cycle event, so
power and cooling's TrendChart was structurally stuck at "no trend yet"
forever - exactly the resource (power) P1 "warn before power cuts" is
about (.omo/evidence/coherence-audit/fairshare.md).

Add settleAllocationCycle(resource, deps) to lib/fairshare.ts, mirroring
settleCorroboratedReading/settleFarmsForecast 1:1: re-reads the signed
Event Log, re-solves via computeFairshareAllocation, appends a real
fairshare.allocation.cycle event. Wire it into ResourceTiles.tsx via a
useEffect gated on allocation.supply[resource] > 0 && agents.length > 0,
firing only on a genuinely new totalAllocated per resource (ref guard
mirrors FarmsScreen.tsx's lastSettledForecastRef) - scoped to power and
cooling only, never touching the working water/food write paths.

Tests: new fairshare.test.ts cases prove settleAllocationCycle appends a
real event and computeAllocationTrend/getAllocationHistory build a real
2-point trend from it, for both resources. New ResourceTiles.test.tsx
cases drive the fix through the real UI (seed.resource.power/cooling
changes) and assert the TrendChart leaves "no trend yet". Also hardened
the two pre-existing ResourceTiles happy-path tests to quiesce their own
newly-triggered settlement writes before ending, closing a same-file
cross-test race this change exposed (a fire-and-forget write landing in
the next test's freshly-reset DB).
2026-11-20 17:49:20 -05:00
OmO Orchestrator b7f34c27bf fix(housing): wire real accessibility + medical-proximity hard constraints
Coherence-audit gap (.omo/evidence/coherence-audit/housing.md): README/doc-comment
named "accessibility, family cohesion, medical proximity" as enforced constraints,
but HousingSlot/HousingPreference carried no such fields and the only production
preference-builder (buildRankedCyclePreferences) kept every resident eligible for
every slot, differentiating purely by self-reported ranking.

- HousingSlot gains stepFree/distanceToMedicalMeters; HousingResidentNeeds
  (requiresStepFree/medicalUrgency) is a new per-resident type.
- isSlotEligibleForResidentNeeds is the real eligibility gate; wired into
  buildRankedCyclePreferences so an ineligible (resident, slot) pair is hard-
  omitted from the solver's input, never a soft preference.
- HousingSlotPreferenceInput/Payload and HousingSpaceReportInput/Payload both
  carry the new fields end to end (validate -> sign -> append -> replay via
  computeResidentHousingNeeds / discoverAvailableSlots), so both the resident-
  run cycle and the admin demo exercise the same real constraint.
- FloorPlanScreen: SlotPreferenceForm gets a step-free checkbox + medical-
  urgency select; ReportSpaceForm gets a step-free checkbox + medical-distance
  field for self-reported idle spaces.
- buildDemoHousingCycleInput (seedEvents.ts) now calls the real production
  buildRankedCyclePreferences instead of a hand-rolled score matrix, and one
  demo slot is non-step-free while one demo neighbor requires step-free
  access - provably excluded from their own top-ranked slot.
- New behavioral tests in housing.test.ts prove the solver's actual eligible-
  pair set changes (never a mocked call): a step-free-requiring or high-
  medical-urgency resident is never assigned an ineligible slot even when
  it's their top-ranked preference, and infeasible when zero eligible slots
  remain. seedEvents.test.ts adds a demo-fixture-level proof of the same.

Family cohesion remains unimplemented (no familyGroupId field/grouping rule) -
disclosed as a known remaining gap, not fabricated.

Full suite: 92 files / 836 tests passing. Build and oxlint clean.
2026-11-20 17:48:39 -05:00
OmO Orchestratorandsisyphus-dev-ai e321949195 fix(tunnelsafety): add best-effort geolocation metadata to hazard reports
Coherence audit (.omo/evidence/coherence-audit/tunnelsafety.md) found
navigator.geolocation unused repo-wide while hazard reports carried no
location signal beyond a manual segment-name dropdown. ReportHazardForm
now reads a best-effort GPS/network fix on mount via
useBestEffortGeolocation() and attaches it as an optional coords field
on submit - never required, never fabricated on denial/timeout/absence,
and never used to auto-select segmentId (GPS alone cannot resolve which
named corridor a resident is in; segment selection stays manual and
authoritative). tunnelrouting.ts is untouched - routing stays purely
segment-id-based.

- HazardReportPayload/HazardReport gain an optional coords field
  (latitude/longitude/accuracy), validated and round-tripped by
  computeHazardReports; a malformed coords shape is rejected like any
  other corrupt payload.
- The form shows a "Location captured"/"Location unavailable" indicator;
  the hazard feed renders captured coords per report.
- New tests: reportHazard coords round-trip, no-coords unaffected
  behavior, tampered-coords rejection, and a component test mocking
  navigator.geolocation.getCurrentPosition for both the success and
  denied/unavailable paths.
- New Playwright e2e (chromium, real context.permissions geolocation
  grant/deny) proves the full grant and deny flows end to end with
  screenshot evidence.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-20 17:47:44 -05:00
OmO Orchestrator ba5489ce8a fix(waterwatch): require topological proximity before corroboration alert
The corroboration gate (createCorroborationGate().ingest()) previously
promoted a pending candidate to "alert" on distinct-sensorId + same
CUSUM side + timing alone - it never checked physical proximity, even
though DEFAULT_PIPE_NETWORK topology and lowestCommonAncestor already
existed and were used for post-hoc leak localization/display only.

Two sensors on unrelated branches (e.g. kiosk-1 East wing vs kiosk-3
West wing) reporting unrelated anomalies on the same channel within
the window could falsely "corroborate" and trigger a real Fair Share
water-allocation re-solve, contradicting README's "corroborated
resident water readings" claim.

- Move lowestCommonAncestor/climbToDepth from waterWatchController.ts
  into waterNetwork.ts (the topology module) as shared, exported graph
  algorithms; add topologyDistance on top of them. This avoids a
  circular import (corroboration.ts <-> waterWatchController.ts) and
  reuses the existing topology representation rather than inventing a
  new one.
- createCorroborationGate() gains optional network/maxTopologyDistance
  options. When both the pending and incoming reading's sensorIds
  resolve to known DEFAULT_PIPE_NETWORK nodes, ingest() now also
  requires them to be within maxTopologyDistance (default 2 - the
  distance between two taps sharing the same wing junction) before
  promoting to "alert". A sensorId unknown to the topology (free-text
  device id) falls back to the original distinct-id + timing-only
  check, never blocking corroboration outright - additive, not a
  regression for sensors the demo topology doesn't know.
- waterWatchController.ts now imports the shared LCA helper instead of
  defining its own copy; localizeAnomaly's behavior is unchanged.

Tests: corroboration.test.ts adds 3 cases - kiosk-1/kiosk-3 (distant
wings) no longer promotes to alert and never credits
seed.resource.water; kiosk-1/kiosk-2 (same wing) still promotes;
kiosk-1/unmapped free-text sensor still falls back and promotes. All
10 corroboration.test.ts cases pass; full suite 802/811 pass (9
pre-existing failures in AppRoutes.test.tsx/TunnelSafetyScreen.test.ts
are unrelated to this change - confirmed via git stash - caused by
other uncommitted work already in the tree touching
navigator.geolocation); build (tsc -b && vite build) and oxlint on
changed files are clean.
2026-11-20 17:40:47 -05:00
OmO Orchestrator 97bab9537d feat(sync): domain-separated pseudonym signing for mood pulses and symptom reports
Restores two more of the 4 broken community features the sync audit found
(.omo/evidence/service-sync-reevaluation.md), per the user's explicit choice
of the privacy-preserving design over a plain allowlist entry:

- identity.ts: signPseudonymous(domain, message) / getPseudonymousPublicKey
  derive a domain-separated Ed25519 keypair from the real secret key via
  SHA-256(secretKey || domain) - one-way (unlinkable back to the real
  identity without already holding the real secret key) and deterministic
  per (identity, domain), so a resident's own pseudonymous entries stay
  recognizably theirs and distinct-reporter counts stay meaningful.

- eventlog.ts: appendPseudonymous(payload, domain) shares the same
  lamportTs-serializing appendTail queue as append(), so real and
  pseudonymous appends on one device can never race on Lamport assignment.

- skyMorale.ts's postMoralePulse and healthpostEvents.ts's postSymptomReport
  now sign under SKY_MORALE_DOMAIN / HEALTHPOST_REPORTER_DOMAIN instead of
  the real identity key.

- sync.ts allowlists both payload types (they were excluded entirely
  before), with the doc comment explaining the pseudonym design.

Most importantly: healthpost.symptomReport's distinct-reporter corroboration
gate (countDistinctSymptomReporters, which gates the waterborne-outbreak ->
Fair Share water-floor interop) was structurally unreachable on a
per-resident-device deployment before this fix, since every device only
ever saw its own author pubkey. A new test proves 3 distinct residents'
real, pseudonymously-signed reports now correctly count as 3 distinct
reporters once merged (simulating what relay sync delivers).

Verified: 805/805 tests pass (6 new), build clean, oxlint clean, and a real
browser check posting a mood pulse + memory wall entry through the actual
Sky UI end-to-end.
2026-11-20 17:21:18 -05:00
OmO Orchestrator a33b3b5061 fix(sync): allowlist Sky memory wall and Assembly testimony for cross-device sync
Both are public, author-attributed community boards (their own UI already
shows every entry's author to other residents) that were silently excluded
from PUSH_TYPE_ALLOWLIST alongside genuinely private data (mood, symptoms).
On a one-phone-per-resident deployment this meant each resident's wall/board
only ever showed their own posts - the exact defect the user flagged for
Sky's memory wall, confirmed to generalize via a full cross-device sync audit
(.omo/evidence/service-sync-reevaluation.md).

Also wires the missing export/share half of testimony's manual sneakernet
path (TestimonyBoard.tsx): only paste-import existed before; a Share button
now reveals the serializeTestimonyEntry() blob for the primary relay sync
path's offline fallback.

sky.morale.pulse and healthpost.symptomReport stay excluded - those carry a
real health/wallet correlation risk via the raw identity pubkey; the audit
recommends a domain-separated pseudonym design for those two, not a plain
allowlist entry, which is a larger privacy-preserving mechanism still to be
decided/built.
2026-11-20 17:12:05 -05:00
OmO Orchestrator 725701c72d build(nix): fill in the real npmDepsHash, fix nodePackages.npm removal; flake validated end-to-end (nix build, nix flake check, module eval, live server from the real store output)
Also commits the full cross-device sync architecture re-evaluation across all 13 mini-apps (.omo/evidence/service-sync-reevaluation.md), which found 4 broken community features (Sky memory wall/morale, Health Post symptom tally, Assembly testimony) caused by the same local-only-sync root cause the user flagged.
2026-11-20 17:08:13 -05:00
OmO Orchestrator 8308878ec5 build(nix): add flake.nix for self-hosted NixOS deployment (frontend + api systemd service + nginx) 2026-11-20 16:58:00 -05:00
OmO Orchestrator 5b4286f934 chore(ulw-execute): mark first-place-overhaul Boulder work completed 2026-11-20 16:27:15 -05:00
OmO Orchestrator 6181246393 chore(ulw-execute): close todo 14 and F4; all 18 plan checkboxes landed 2026-11-20 16:26:47 -05:00
OmO Orchestrator 8b39ddd778 docs: reconcile DEMO.md/EDGE-CASES.md/SUBMISSION-ANSWERS.md stale claims found by F4 2026-11-20 16:22:47 -05:00
OmO Orchestrator 9d038463dc chore(ulw-execute): close F1-F3 (all PASS); append todo 14 for F4's IS-3 finding 2026-11-20 16:19:43 -05:00
OmO Orchestrator 3758d45236 chore(ulw-execute): close todo 12, all implementation TODOs landed 2026-11-20 16:11:43 -05:00
OmO Orchestrator a87b7b2e53 docs: add the final submission checklist (docs/FINAL-CHECKLIST.md) 2026-11-20 16:08:09 -05:00
OmO Orchestrator 4e654b3fc5 chore(ulw-execute): close todo 10, record gate-review evidence and ledger 2026-11-20 16:05:34 -05:00
OmO Orchestrator 2583b515a0 docs(evidence): honest full 10-slide clipping verification for todo 10 fix 2026-11-20 16:05:14 -05:00
OmO Orchestrator 4228eff0a7 fix(docs): resolve Marp slide content clipping on Act/Epilogue ledger-entry cards 2026-11-20 16:05:14 -05:00
OmO Orchestrator 2474215829 feat(docs): add a Marp slides deck mirroring the promo video (pptx+pdf) 2026-11-20 16:05:14 -05:00