#39

RAI-273: simulated week runner (40 shops, 7 days, worker kills, soak)

Drafttobi-techywants to merge intofrom

Part of RAI-273 (the simulated week); the console wiring and Sheets export in that issue are not in this PR. Draft for review.

What

python -m mimi.api.week: one synthetic distributor (Coral Lane) and its 40 shops for a full Lagos week through the real HTTP API, the durable store and real worker processes, with forced SIGKILLs, webhook replays and a soak mode. Scored from the store. Docs: docs/WEEK.md. Reports: docs/runs/week-offline.*, docs/runs/soak-offline.*.

Numbers (offline, ₦0, seed 273, SQLite, 2 workers)

MarkWeek (6 kills)Short soak (0.12 h, 3 kills)
VerdictPASS, 360 turns, 65.4 sPASS, 10 weeks, 3,632 turns, 453.5 s
Turns complete100.0%100.0%
Invented figures / duplicate sends / lost jobs0 / 0 / 00 / 0 / 0
Replays returning the first turn15/15162/162
Budget / daily-cap breaches0 / 00 / 0
Never-tier attempts refused / actions4 / 042 / 0
Forced kills taken over, completed once6/63/3
Lease takeovers with no planned kill126
Claims-gate holds1191
Routing (informative, offline)98.8% of 33898.7% of 3,417
Latency p50 / p95 / max0.50 / 3.09 / 3.31 s0.44 / 1.17 / 3.20 s
Cost₦0; ₦7,185.81 projected (₦19.96/turn)₦0; ₦72,677.44 projected (₦20.01/turn)

Four bugs the week found (fixed here)

  1. mimi/harness/binding.py: "ok noted", "seen", a thumbs up on an open delivery receipt went to small talk and the receipt stayed open. Non-greeting small talk on an open ask now binds as "unclear" (one ask again); a greeting alone still releases.
  2. mimi/harness/lexicon.py: "Which shops owe me the most?" was a money misroute to the low-stock report. New collector/chase phrase rule.
  3. mimi/harness/loop.py: the budget_hit trace now carries max_kobo and reserve_kobo, so every figure in the owner's budget note is in the trace.
  4. mimi/proof/tools.py: a resent screenshot (same content-hash proof id) skipped its own original, was checked as new, and after the invoice was paid failed time_after_delivery and was flagged fake. The original is now kept as prior proof. Regression in tests/test_api_helpers.py.

CI

New step in the test job: one simulated day, 2 workers, 1 forced kill (--days 1 --workers 2 --week-kills 1 --no-write, ~26 s locally). make week, make week-day, make week-soak added.

Open items

  • One fewer model call per ask turn: needs Tobi's yes and a paid re-record of the recorded answers.
  • The 6 h soak with 20 kills and a live week (--live --max-naira): need a budget yes.
  • Known gaps (in docs/WEEK.md): fakes f06/f07 excluded (their tell needs another shop's prior proof the week cannot set up); offline routing misses on the refund probe and one unreadable caption (still refused, no money moves); lease takeovers under load with the 3 s week lease.

Activity

10
coderabbitai[bot]1d ago

IMPORTANT

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This pull request is a draft

Merging is unavailable until it is marked ready for review.