
 RUN  v5.1.0 /home/athapa/patriothacks-wt/fix-miniapp-gaps-and-demo-video-wave1

 ✓ src/lib/housing.test.ts > solveHousingAssignment > solves a 5x5 instance to the provably optimal assignment 42ms
 ✓ src/lib/housing.test.ts > solveHousingAssignment > weights a resident with carried-over fairness debt toward their best slot 5ms
 ✓ src/lib/housing.test.ts > solveHousingAssignment > reports an over-capacity instance as infeasible rather than force-fitting it 2ms
 ✓ src/lib/housing.test.ts > solveHousingAssignment > reports a resident with zero eligible slots as infeasible, not silently dropped 2ms
 ✓ src/lib/housing.test.ts > recordHousingAssignmentCycle > appends a signed housing.assignment event and updates the fairness-debt ledger 31ms
 ✓ src/lib/housing.test.ts > recordHousingAssignmentCycle > carries fairness debt forward across two recorded cycles 25ms
 ✓ src/lib/housing.test.ts > recordHousingAssignmentCycle > does not append anything when the cycle is infeasible 2ms
 ✓ src/lib/housing.test.ts > recordHousingAssignmentCycle > issues a real wallet.issue credit to every resident assigned a slot this cycle, via the injected append seam 3ms
 ✓ src/lib/housing.test.ts > recordHousingAssignmentCycle > never blocks the housing assignment from completing when a wallet credit fails (best-effort, mirrors RevealDraw.tsx) 2ms
 ✓ src/lib/housing.test.ts > reportIdleSpace (happy path) > persists a correctly-signed housing.space.report event with space id, location, capacity, idleHoursPerDay, and timestamp 6ms
 ✓ src/lib/housing.test.ts > reportIdleSpace (failure path - malformed input, adversarial class malformed_input) > rejects a negative capacity client-side before signing rather than persisting it malformed 2ms
 ✓ src/lib/housing.test.ts > reportIdleSpace (failure path - malformed input, adversarial class malformed_input) > rejects an idleHoursPerDay greater than 24 the same way 2ms
 ✓ src/lib/housing.test.ts > reportIdleSpace (failure path - malformed input, adversarial class malformed_input) > rejects a blank space id or location 2ms
 ✓ src/lib/housing.test.ts > discoverAvailableSlots > scales a reported space's capacity by idleHoursPerDay / 24 5ms
 ✓ src/lib/housing.test.ts > discoverAvailableSlots > replays correctly cold from a fresh readAll(), not only from the entries held at append time (adversarial class stale_state) 9ms
 ✓ src/lib/housing.test.ts > discoverAvailableSlots > lets a later report for the same spaceId supersede an earlier one (a resident correcting their own report) 8ms
 ✓ src/lib/housing.test.ts > discoverAvailableSlots > ignores non-housing.space.report entries in the log 12ms
 ✓ src/lib/housing.test.ts > solveHousingAssignment consuming discovered slots > solves identically whether fed admin-seeded slots or resident-discovered slots of the same shape 9ms
 ✓ src/lib/housing.test.ts > solveHousingAssignment consuming discovered slots > feeds discovered slots into the full recordHousingAssignmentCycle write path, appending a real housing.assignment event 20ms

 Test Files  1 passed (1)
      Tests  19 passed (19)
   Start at  14:28:55
   Duration  345ms (tests 75%, import 9%, setup 8%, transform 7%, worker 2%)
