Skip to content

M0 audit corrections (H1-H3 + M4-M7; NEW-1 disclosed) — do not merge pending re-review - #2

Open
HSpector1 wants to merge 6 commits into
foundation/m0-headless-service-labfrom
fix/m0-audit-corrections
Open

M0 audit corrections (H1-H3 + M4-M7; NEW-1 disclosed) — do not merge pending re-review#2
HSpector1 wants to merge 6 commits into
foundation/m0-headless-service-labfrom
fix/m0-audit-corrections

Conversation

@HSpector1

Copy link
Copy Markdown
Owner

M0 bounded correction pass (responds to the PR #1 independent audit)

Branched from the reviewed head beb9289. Scope-locked to the audit's 3 High + 5 Medium findings — no M1, no new features, no content expansion. Base = the foundation branch so this diff is exactly the audit response. Do not merge yet: awaiting independent re-review + owner-run human playtests.

High

  • H1 — causal autopsy misattribution. Replaced the incommensurable pressure scores (which flipped "seating"→"kitchen" the instant a station crossed 88% util) with a two-tier report: primary loss ranked by measured lost contribution per channel; busiest station is a secondary operational warning. Validated against covers-served response (kitchen-bound when adding seats reduces covers). Locked by AttributionTests.
  • H2 — discovered dominant hybrid. Added a menu-positioning coherence lever (a dish priced far above the menu's own median tier is ordered less, scaled by segment) that is exactly zero below 2.0x median, so the three golden checksums are byte-identical. The hybrid now loses lunch and social (viable in one market, not dominant). Dominance is now searched, not asserted. Locked by DominanceRegressionTests.
  • H3 — optimistic forecast. Realization factor (peaking) + comp haircut + honest downward-skewed band; relabeled demand-opportunity vs expected-completed vs low-confidence range. Band coverage 0% → 61% (stated 55%). Locked by ForecastCalibrationTests.

Medium

  • M4 exact integer-cents CLI price parsing (Money.TryParse, no double). M5 direct FIFO dequeue-order test + labor-value test. M6 no-float guard widened to static fields + properties. M7 cross-OS determinism claims corrected to "verified same-environment only."

Honestly disclosed, NOT hidden (NEW-1)

The dominance search still finds one residual dominator: a uniformly-overpriced coherent menu. It stems from M0 having no repeat-visit/reputation teeth on price/quality (the disclosed throughput boundary, D-012). A price-elasticity fix would change a golden fixture, so it is deferred to M0.5, not hacked here. See reports/balance/dominance-search.md.

Verification

103 tests pass (was 74); goldens byte-identical; determinism holds; accounting reconciles; scope clean; no assets/binaries committed. Full write-up: reports/m0/M0-CORRECTION-REPORT.md; pre-fix reproductions: reports/m0/PRE-FIX-AUDIT-EVIDENCE.md.

Gate: Conditional-Pass / Defer. M1 remains unauthorized.

🤖 Generated with Claude Code

claude added 6 commits July 28, 2026 23:31
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…calibration (H1,H2,H3,M4-parser)

- H1: attribute the primary loss by lost contribution per channel (two-tier report); remove the 88%-util flip
- H2: menu-positioning coherence order-weight (zero below 2.0x median; goldens byte-identical)
- H3: forecast realization factor + comp haircut + honest downward-skewed band; demand-opportunity vs completed labels
- M4: Money.TryParse (integer cents); M5: opt-in dequeue trace; preserve the discovered hybrid as a regression fixture

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…(M4)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o the harness

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nce, FIFO order, labor, price parse, widened no-float guard)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ate M0 evidence

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@HSpector1

Copy link
Copy Markdown
Owner Author

Independent Re-Review — M0 Correction PR #2

A. Review identity

B. Executive verdict

  • Technical verdict: the corrections are substantial and real — H1 core, and all five Mediums (M4–M8) are genuinely fixed (mutation-verified). But two High residuals block a clean pass: (1) NEW-1 — a uniformly-overpriced coherent menu is a robust, same-complete-strategy universal winner (held-out +59% / +297% / +60% across the three markets); (2) H3 is only partially corrected — the forecast's band improved for good plans and its labels are honest, but its point estimate is still +159% biased (up to +882% for failure-mode plans), under-covers in 2 of 3 markets, and reverses the sign on the seat-count decision (4/4 tests).
  • Recommended action: Conditional-Pass / Defer (details in L).
  • PR M0 audit corrections (H1-H3 + M4-M7; NEW-1 disclosed) — do not merge pending re-review #2 → foundation: merge only after the disclosure/claim corrections (see K).
  • PR Foundation + M0 Headless Service Lab (stops at M0 gate) #1 → main: do not merge — M0 is not passed.
  • Human test: not authorized yet (see J). M1: not authorized.

C. Finding resolution table

Finding Builder claim Reviewer result Severity Gate effect
H1 attribution corrected (two-tier, measured harm, no 88% flip) Corrected (verified: at seats=20 grill 90.6% util still "seating"; flips only by measured harm) — with 2 Medium report caveats High→Note not blocking
H2 hybrid dominance corrected (coherence lever) Partially corrected — the incoherence hybrid is defused, but a coherent uniform-overprice dominator remains (NEW-1) High see NEW-1
H3 forecast corrected (band 0→61%, de-biased, labeled) Partially corrected — labels + good-plan band improved; point estimate still badly biased, under-covers 2/3 markets, directionally wrong on seats High blocks fair-planning
M4 price parse corrected Corrected (15/15 cases; 0.29→29, 19.99→1999; no double route; rejects fractional/NaN/Inf/neg/scientific/comma) Note not blocking
M5 FIFO test corrected Corrected (LIFO mutation → test FAILS with 32 inversions; behavioral, not golden) Note not blocking
M6 labor test corrected Corrected (zero-labor mutation → test FAILS, Expected 60500 Actual 0) Note not blocking
M7 no-float guard corrected Corrected (static double field AND property + backing field caught) Note not blocking
M8 cross-OS docs corrected Corrected (contract/ADR/CURRENT-STATE all hedged to same-environment) Note not blocking
NEW-1 residual dominator disclosed, deferrable to M0.5 Still-reproducible / High — robust same-complete-strategy universal winner; not a deferrable boundary; "M0.5" is not an approved milestone High blocks M0 balance pass

D. Causal-attribution results (H1)

The core defect is fixed. DiagnoseBottleneck selects the cause from measured lost contribution per channel (cpc>0) or lost-party/dish counts (cpc≤0); there is no 88% term in the selection path. Reproduced: all-grill/1-cook/lunch/seed 12345 stays "seating" at seats=20 (grill 90.6% util, door-loss 43 ≫ wait-loss 15) and flips to "kitchen" only when wait-loss genuinely dominates — validated against covers-served response (adding seats past a saturated grill reduces covers). Channels are mutually exclusive (no double count); no negative losses; the busiest station appears only in the secondary line, never as the recommended fix. Two Medium caveats (below).

E. Forecast-validation results (H3) — held-out

Evaluated on held-out seeds not used in development (33,000 runs):

  • Point estimate still optimistic (High). ExpectedCovers signed bias +159% (median |err| 81.5%); per failure-mode plan +120% to +882% (Intentionally Bad, Overpriced Weak, Overcapacity, Station Bottleneck). The realization floor (42%) is too high for oversubscribed plans. The correction bought band coverage by widening the interval, not by fixing the point forecast.
  • Per-market under-coverage (Medium). Held-out coverage: lunch 48.6%, social 51.0%, enthusiast 71.3% — two of three markets are below the stated 55%; the aggregate is propped up by enthusiast only.
  • Scope undisclosed (Medium). The committed "61%" is measured over only the 9 named plans; adding the hybrid + bad configs drops it to 57% and exposes 0–22% coverage cells. forecast-calibration.md does not disclose this.
  • Directionally unreliable (High). One-decision perturbation: directional agreement 60%; every seat-count change is mispredicted. Verified at N=300 held-out: lunch 46→66 seats forecast +$483 but actual −$377; 46→30 forecast −$523 but actual +$815 (both signs reversed; robust at N=2000). The forecast treats seats as monotonically good while the sim correctly turns excess seats into walkouts/comps. A decision-support forecast that reverses the sign of the leading capacity lever misinforms the very planning the human gate measures.

F. Strategy-integrity results (H2 + NEW-1)

  • Coherence mechanism (Medium). Real and continuous at the 2.0× threshold (no hard cliff — one of my hypothesized concerns is refuted). But it is a narrow patch: it penalizes only single-dish outliers priced above 2× the upper-middle median; uniform overpricing and small menus dodge it entirely, and the median reference is gameable. Reframe it as a partial patch, not a general dominance fix.
  • Dominance search under-powered (Medium). Faithfully generated (I reproduced the committed report exactly), but WalkInAcceptanceBp is hardcoded to 10000 (never varied) and it samples only 500×40. My independent search (different seed, 4000×40) found 6 all-3-market dominators, not 1. The reported "1" is a lower bound.
  • NEW-1 residual (High, gate-critical). Reproduced exactly: menu[Burger@$26.55, Chicken@$52.14, Scallops@$41.04, Veggie@$29.54], seats 36, 8 staff — max/median 1.27× → coherent, zero coherence penalty; every dish 1.9–3.5× its suggested price. It is the SAME COMPLETE STRATEGY (identical menu+prices+staff+seats) winning all three markets — the unhealthy kind. Held-out 250 seeds/market vs best-named: lunch +$205 (+59%), social +$1594 (+297%), enthusiast +$687 (+60%); distribution overlap small (social 0/250 below named-best median). Robust under ±20% demand and mix shifts. Mechanism confirmed: scaling all prices on a normal coherent menu maximizes contribution at 2.5–3× (social x1 −$16 → x2.5 +$2,985) — demand is grossly price-inelastic, so "overprice everything" wins. This is a fixable single-service price-elasticity defect inside the pricing system M0 exists to test, not the disclosed no-repeat-visit boundary, and it was deferred partly to preserve the Focused Value golden — which is precisely a "deferred to protect checksums" indicator. "M0.5" is not an approved milestone, so deferral to it is not a valid closure.

G. Medium findings (evidence)

  • H1-4 loss-making services print "Primary loss: seating turned away N parties (~$0.00 of lost contribution)" in 76/133 seating cases (count-fallback prints a $0.00 cents figure) — self-contradictory to a reader.
  • H1-5 seating loss assumes 100% conversion of turned-away parties: verified a case where stated seating loss $321 exceeds the service's actual earned contribution $203. Present it as an upper-bound opportunity, or discount by the observed completion rate.
  • H2-1 / H2-3 / H3-market / H3-scope / GOLD-2 as above.

H. Golden-checksum explanation

The three goldens are byte-identical to pre-fix and this is correct and expected: ComputeChecksum hashes only ledger/funnel/dish/segment/station/employee integers, and excludes PrimaryLossCause, BottleneckCause, HighestPressureStation, and all forecast fields. So the two sim-facing corrections (H1 attribution, H3 forecast) are invisible to the goldens and are instead covered by AttributionTests/ForecastCalibrationTests (which I reproduced and found genuinely discriminating). Golden stability here proves unaffected behavior stayed stable; it does not validate the corrections. No action; just do not read unchanged goldens as evidence the corrections are correct.

I. Scope result

Correction-only, confirmed. Delta is prod +376/−60 (9 files), test +258/−5, docs/reports +280/−25. No executable repeat-visit / reputation / reviews / critics / marketing / inventory / suppliers / graphics / engine / pathfinding / save / multi-restaurant / manager / delegation / campaign / audio / asset system was added (the only "reputation" hits are disclosure strings in a report). Core stays pure (no File/Directory/async/Random). 103 tests pass twice.

J. Human-test readiness

Not ready. Two contaminants of "can the player form a plan and be fairly informed": (1) the forecast reliably points players the wrong way on seat count (the most basic capacity lever), and is badly biased for the plans a learning player builds; (2) pricing is degenerate — "overprice everything ~2.5×" dominates, so a perceptive tester experiences a shallow pricing decision, and a min-maxer trivially breaks the balance. The autopsy (H1) is now trustworthy, but the forecast is not, and pricing lacks a real tradeoff. Fix both in a second bounded correction, then run the five-player gate on a build where all four decision axes are fairly informed.

K. Required corrections (for M0 only — no M1)

  1. NEW-1 (High): give price a countervailing cost within a single service (strengthen the over-budget demand penalty / price elasticity) so uniform overpricing is not universally optimal; re-baseline goldens deliberately if needed. Escalate the disposition to the owners — do not self-assign to a non-existent "M0.5."
  2. H3 point/direction (High): make ExpectedContribution subtract throughput-limited walkout/comp losses so added seats past kitchen capacity reduce expected contribution; report calibration per market and over a random/adversarial config sample, and stop presenting one global 55% as if it applied to every plan.
  3. H1-4 / H1-5 (Medium): in the loss-making branch, show the ranking basis actually used (lost covers) instead of "$0.00"; discount or relabel the seating loss so it cannot exceed earned contribution.
  4. Claim corrections (Medium): re-label the coherence lever as a partial patch; report the dominator count as a lower bound and vary WalkInAcceptanceBp in the search; correct the docs' "deferred to M0.5" and "point estimate de-biased" over-claims.

L. Final gate

Verdict: Conditional-Pass
Action: Defer

The corrections are real and the build is honest and in scope, but the "no single dominant strategy" clause of the M0 product question fails (a robust universal overprice dominator exists), and the forecast is directionally misleading on capacity decisions. Both are fixable within M0 via a second small strategy-integrity + forecast correction. Not Fail (the concept is not disproven; reasonable named menus still show real context-dependence). Not Pass/Continue (M0's balance and fair-planning bars are unmet). Not a load-bearing Rewrite (calibration + point-estimate fixes, not a model change).

M. Required owner decision

Howard & Aaron: authorize a second bounded M0 correction (add a real single-service price-elasticity cost so overpricing is not universally optimal, and fix the forecast so excess seats lower expected contribution), then run the five-player human gate on the corrected build — or explicitly accept shipping M0 with a known robust universal dominator and a directionally-unreliable forecast (not recommended). "M0.5" is not an approved milestone; this is a second correction inside M0, not M1.


The PR #2 branch was not modified during this review. Neither PR was merged. M1 was not begun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants