Commit Graph
65 Commits
Author SHA1 Message Date
OmO Orchestrator 57ecfef2f0 fix(healthpost): add IMCI fever branch + closeable referrals
A febrile child with no other sign was shown a green Home care badge (the engine omitted fever), a false reassurance contradicting the fever symptom tally. Added the WHO-IMCI fever assessment and a neutral Not fully assessed state so a febrile child is never home_care. Added a signed healthpost.referral.resolve event + Mark handled so the clinician queue can close cases.
2026-11-20 03:14:49 -05:00
OmO Orchestrator 278072195a fix(findfamily): stop leaking the directory roster to any searcher
respondToSearch returned every entry's cleartext id (name-bearing) to any query, breaking the PSI privacy premise. Each id is now sealed with AES-256-GCM under HKDF(H(name)); only a genuine matcher can derive the key and decrypt the single matching id; the response is shuffled + padded to hide roster size. Seed ids are opaque handles.
2026-11-20 03:14:49 -05:00
OmO Orchestrator 97b2ea1da1 fix(tunnelsafety): replace fake accelerometer badge with real multi-reporter corroboration
The Sensor-corroborated badge fed a binary 0/250 lux proxy in as accelerometer data and RMS-thresholded it, so any movement corroborated and a handheld phone can't sense a flooded corridor anyway. Removed it; a hazard segment is now Confirmed by N residents only when >=2 distinct signer pubkeys report the same unresolved segment, replay-derived from the signed log.
2026-11-20 03:14:49 -05:00
OmO Orchestrator d21e2dfe34 fix(farms): additive food supply (no starvation) + wire grow-light power budget
Farms->Fair Share credited food via seed.resource.food (latest-wins), so the demo's 20kg forecast OVERWROTE the 410 baseline (food 410->20, the farm starved the settlement). Farms now appends a signed fairshare.contribution that Fair Share SUMS onto the baseline per-contributor-latest, so growing food only raises the pool and multiple growers sum. Also wires the advertised-but-inert grow-light power budget into FarmsScreen + shows energy vs budget in ForecastPanel.
2026-11-20 03:14:49 -05:00
OmO Orchestrator afa29a70f3 fix: serialize concurrent event-log syncs to stop duplicate ingestion
trySyncWithBackend's pulled-entry dedup is a non-atomic read-modify-write (read
the existing (authorPubkey,signature) set, then appendEntry in a loop). Several
mini-app mounts plus the shell poll can fire it at once; two overlapping runs
both saw a remote entry as absent and ingested it twice, duplicating it locally
and corrupting the replayed ledger (a real-browser pull of 26 relay events
produced 156 = 6x local rows). Chain all calls on one promise so only one runs
at a time, making the dedup atomic. Adds a 4-concurrent-sync regression test.
2026-11-20 02:30:03 -05:00
OmO Orchestrator 1daa59c333 fix: harden every engine against adversarial/non-finite edge cases (24 breaks)
An exhaustive adversarial stress-test pass (6 parallel domain adversaries +
in-kernel engine probing + a real-browser adversary) tried to BREAK every
feature. 24 genuine breaks were found and fixed at root cause, each with a
regression test; the dominant class (15/24) was a NaN/Infinity slipping past
a typeof/isNaN-only guard at a trust boundary and poisoning a derived value.

- Water Watch: blank value stored as fabricated 0; a single NaN reading
  permanently killed a channel baseline (and survived replay). Reject
  non-finite at the form, the gate, and the replay matcher.
- Fair Share: a floor consuming the pool emitted an Infinity clearing price;
  Infinity need/supply/trend -> NaN. Finiteness guards + residual-only CEEI
  sub-market.
- Housing: NaN/Infinity score/capacity signed a NaN fairness-debt that
  poisoned all future cycles. Validate finiteness at the input boundary.
- Tunnel Safety: A* returned suboptimal routes when coord scale != weight
  scale (inadmissible heuristic). Scale the heuristic to be provably
  consistent; verified vs brute-force Dijkstra.
- Assembly QV: duplicate P2P-synced credit rows double-counted a resident.
  Collapse per (proposal,resident) before tallying.
- Fair Draw: empty participants committed a draw it could never resolve
  (stuck). Refuse empty draws.
- Light Clock: negative/huge/NaN lux -> NaN circadian output; non-finite
  hours -> unbounded RK4 loop (hang/OOM). Finite light-drive + step bound.
- Farms: NaN baseTemp/crop fields -> NaN GDD/yield (NaN-leak into Fair
  Share's signed ledger); overflow temps -> Infinity GDD. Finiteness +
  overflow-safe mean.
- The Climb: Infinity capacities -> self-contradictory schedule; non-integer
  readyPeriod -> silent 0-delivered. Finiteness + integer guards.
- Upload/manifest: an extra unknown field leaked into the stored manifest and
  onto the share wire; duplicate permissions and 200k names accepted. Reject
  unknown keys and return a reconstructed manifest; dedupe + length caps.

Combined gate green: 689 tests pass (+21 regression over 668 baseline),
tsc build exit 0, oxlint exit 0. No test skipped or weakened.
2026-11-20 01:37:30 -05:00
OmO Orchestrator 7be367303b docs: commit the per-directory AGENTS.md knowledge-base files (admin/lib/shell) 2026-11-19 13:37:24 -05:00
OmO Orchestrator 387fa66c6a feat(sync): wire HIGH-tier multiplayer mini-apps to the backend relay 2026-11-18 23:57:04 -05:00
OmO Orchestrator 092f485e83 feat(api): add a generic signed-event relay endpoint with signature verification 2026-11-18 23:33:10 -05:00
OmO Orchestrator 7de89e1efb fix(assembly): grant QV credit on the real resident/proposal lifecycle and sign ballots at the event log 2026-11-18 14:50:40 -05:00
OmO Orchestrator 55366b7de1 feat(farms): add a grow-light kWh energy budget constraint to the planting LP
Adds optional energyBudgetKwh to SolveFarmsPlantingInput and required kWhPerM2 to CropMaturityWindow. The solve loop adds a single energy<=budget constraint and an energy coefficient per variable when a budget is set, guarded by the existing assertFiniteNumber. totalEnergyKwh is summed in the existing schedule-building varMeta loop. PlantingInputForm.tsx and its two test files are updated only as a direct consequence of kWhPerM2 becoming a required field (new form input + existing crop literals/test flows updated); objective function, GDD eligibility filter, and downstream consumers are untouched.
2026-11-18 14:47:06 -05:00
OmO Orchestrator a0ef6f82c0 feat(sky): add a signed mood/morale-pulse event and aggregate display 2026-11-18 14:40:11 -05:00
OmO Orchestrator b9b79c4830 feat(mentor): add apprentice-to-mentor matching engine and signed match event 2026-11-18 14:39:24 -05:00
OmO Orchestrator da4cff1dd5 fix(fairdraw): require a published signed commit before reveal, rejecting unpublished or double reveals 2026-11-18 14:39:19 -05:00
OmO Orchestrator 0d3d482e6c fix(lightclock): replace fabricated light-proxy ramp with an honest two-state mapping; add actionable light-timing guidance 2026-11-18 14:37:33 -05:00
OmO Orchestrator 62bd169700 docs(theclimb): note the fair-draw-tie-breaker commit-publication gap as a follow-up 2026-11-18 14:37:26 -05:00
OmO Orchestrator ca191ae3bd feat(tunnelsafety): wire live hazard detection into routing and add accessible-route support 2026-11-18 14:34:09 -05:00
OmO Orchestrator ff03f26ae7 feat(housing): add resident-facing idle-space discovery and assignment-cycle trigger 2026-11-18 14:33:22 -05:00
OmO Orchestrator e2712da276 feat(fairshare): add a per-resource survival floor ahead of the CEEI solve 2026-11-18 14:32:42 -05:00
OmO Orchestrator d02f436d8d fix(identity): make concurrent init() calls idempotent so a fresh identity never gets stuck unresolved 2026-11-18 04:04:37 -05:00
OmO Orchestrator ba3443ec4d feat(housing,mentor): add assignment-cycle trigger + wallet wiring, fix dependents double-count, seed both 2026-11-18 03:17:37 -05:00
OmO Orchestrator 16d4cd69a9 feat(farms,fairshare): wire a second real cross-mini-app integration edge 2026-11-18 02:19:36 -05:00
OmO Orchestrator a60f5510d8 fix(healthpost): keep tally total consistent with its own buckets 2026-11-18 01:20:37 -05:00
OmO Orchestratorandsisyphus-dev-ai e111d152c6 fix(eventlog): serialize append() to close the concurrent-lamportTs race
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-18 01:18:07 -05:00
OmO Orchestratorandsisyphus-dev-ai d728971529 fix(fairdraw): use unambiguous commit encoding, close the seed/salt collision
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-18 01:18:07 -05:00
OmO Orchestrator b2d8c0efa4 fix(ledger): reject invalid transfer amounts, close the theft-primitive hole 2026-11-18 01:09:01 -05:00
OmO Orchestrator dae7a231d5 fix(healthpost): reject non-finite clinical inputs instead of misclassifying 2026-11-18 01:06:54 -05:00
OmO Orchestrator 2f900f47fb fix(governance,farms): reject non-finite numeric inputs via a shared validation helper 2026-11-18 01:06:11 -05:00
OmO Orchestrator 9dfedf5b8e fix(ledger): reject invalid issue amounts and prevent prototype-pollution in account maps 2026-11-17 23:35:59 -05:00
OmO Orchestrator f54d01870e feat(upload): add shareable install-QR cross-device flow 2026-11-17 22:12:46 -05:00
OmO Orchestrator 3106c10643 feat(upload): add direct-mount execution with shared ledger/eventlog/identity SDK 2026-11-17 21:36:49 -05:00
OmO Orchestrator 22ca9fd656 feat(upload): define mini-app manifest schema and validator 2026-11-17 21:15:59 -05:00
OmO Orchestrator 8174b7ea1b fix(theclimb): correct capacity-violating flow attribution in tie-break path reconstruction 2026-11-17 20:52:39 -05:00
OmO Orchestrator 6dd1a7414e feat(theclimb): add congestion simulation 2026-11-17 20:42:40 -05:00
OmO Orchestrator 531c958ef2 feat(sky): add memory wall and presence counter 2026-11-17 20:42:24 -05:00
OmO Orchestrator 18ce8d7587 feat(mentor): add FSRS scheduling integration 2026-11-17 20:41:09 -05:00
OmO Orchestrator cef9b4645b feat(farms): add LP planting optimizer 2026-11-17 20:38:24 -05:00
OmO Orchestrator b2e7b63c87 feat(sky): add clock-schedule engine 2026-11-17 20:31:46 -05:00
OmO Orchestrator 26912826f9 feat(theclimb): add min-cost-flow scheduling engine 2026-11-17 20:29:31 -05:00
OmO Orchestrator 78d77fc39a feat(mentor): add skill-criticality engine 2026-11-17 20:28:48 -05:00
OmO Orchestrator 2ab3502a34 feat(lightclock): add wellness UI 2026-11-17 20:28:24 -05:00
OmO Orchestrator 8a453ea685 feat(findfamily): implement ECDH private-set-intersection search engine 2026-11-17 20:16:29 -05:00
OmO Orchestrator 3b045cba2f feat(lightclock): add sensor/manual-entry integration 2026-11-17 20:16:22 -05:00
OmO Orchestrator f54b92c2a6 feat(healthpost): implement honest symptom-tally aggregation with reporting-delay caveat 2026-11-17 20:16:08 -05:00
OmO Orchestrator a00ec0c0cd feat(tunnelsafety): implement A* rerouting with optional accelerometer corroboration 2026-11-17 20:13:31 -05:00
OmO Orchestrator 02f25d4c3c feat(farms): add GDD model engine 2026-11-17 20:11:43 -05:00
OmO Orchestrator 73d9b669e3 feat(healthpost): implement WHO-IMCI triage decision engine 2026-11-17 20:07:52 -05:00
OmO Orchestrator 7b087382eb feat(housing): implement constrained assignment engine with fairness-debt ledger 2026-11-17 20:06:21 -05:00
OmO Orchestrator f4df72f6be feat(lightclock): add circadian model engine 2026-11-17 20:06:10 -05:00
OmO Orchestrator 7106e2d444 feat(tunnelsafety): add crowd-sourced hazard-report data model 2026-11-17 20:06:02 -05:00