Skip to content

M0 menu-responsive demand rewrite (Conditional-Pass; owner decision on residual) - #7

Open
HSpector1 wants to merge 6 commits into
fix/m0-economic-coherencefrom
rewrite/m0-menu-responsive-demand
Open

M0 menu-responsive demand rewrite (Conditional-Pass; owner decision on residual)#7
HSpector1 wants to merge 6 commits into
fix/m0-economic-coherencefrom
rewrite/m0-menu-responsive-demand

Conversation

@HSpector1

Copy link
Copy Markdown
Owner

What this is

The authorized headless demand-model rewrite following the PR #5 adjudication. Replaces menu-independent arrival composition (the root of the cross-market dominator) with a menu-responsive consideration model: the menu/prices shape who visits and how many, while purchase (WTP/affordability in PickBest) stays separate and unchanged.

Do not merge. This is a review + owner-decision surface. No human tests. No M1.

What it achieves

DemandModel.Capture derives per-segment consideration from relevant-option depth + positioning focus + occasion variety (BreadthAffinityBp) + a representative price-position gate, and uses it to set both arrival volume and composition (MakeParty samples the captured mix; the forecast reuses the same Capture).

Result — the per-market frontiers are now distinct regimes, which the old fixed-composition model could not produce:

  • value/throughput wins the value lunch
  • premium wins the enthusiast evening
  • mixed wins social

Manipulation-resistant (cheap filler bounded, never-ordered dishes zero-influence, a lone anchor gives some not full premium draw, a broad menu does not capture every segment at full strength — all price-level, never a variance/breadth penalty), legible (plain-language causes), deterministic. 139 tests pass (54 Core + 31 Determinism + 54 Scenario, incl. 14 new demand tests).

The honest residual (owner decision needed)

The strict "no plan within 10% of the frontier in every market" gate is borderline-missed on held-out seeds: a premium-anchored generalist's worst-market regret is ~6–13% (median ~9%, sweep over 4 seed bases; dominator on 2/3 fresh bases).

Decisive cause is economic, not a demand defect: consideration is market-name-agnostic, so a premium menu serves the same fraction of whatever premium slice a market's pool holds, and premium multi-course checks (~5× a value cover) make that profitable everywhere. The regret is fixed by (pool mix) × (per-cover economics) — both outside the demand model — so no composition candidate (C1–C4) can close it. Closing it robustly needs an economic rebalance of value-vs-premium margins, or the excluded systems (reputation / repeat visits), or an extreme value-heavy lunch pool. One principled fixture change was made (lunch pool 65→82% value, matching its stated "value-heavy" identity, achieving 3 of 4 gates); pushing to ~95% to force the 4th was declined as gate-chasing.

Gate recommendation

Verdict: Conditional-Pass
Action:  Continue   (independent review + owner decision)

Owner decision: (a) accept the borderline all-rounder (specialists still win each pole — arguably healthy), (b) authorize a targeted economic rebalance follow-on, or (c) accept a strongly value-heavy lunch pool.

Where to look

  • reports/m0/M0-DEMAND-REWRITE-REPORT.md — full report (§A–H incl. exact experiments to re-run)
  • reports/m0/demand-rewrite/candidate-1.md — iteration log (R0–R6, failed square-sharpen preserved)
  • docs/DECISION-LOG.md — D-029 / D-030
  • Diagnostics to reproduce: --probe, --manip, --attr, --fdir, --searchbase

Note: the §10 design sub-agent fan-out was blocked twice by transient API 529 overload; the design + adversarial reasoning were done in the main loop and are recorded. Re-running that adversarial pass is listed in the report's §H for the independent reviewer.

🤖 Generated with Claude Code

claude added 6 commits July 29, 2026 21:24
… prototype

Design lock for the menu-responsive demand rewrite (per the authorization). Records
the failed prior fixed-arrival assumption, the new consideration->captured-demand
model sequence, scope/non-goals, and the strategy-integrity + positioning + forecast
gates. Honestly records that a v1 prototype (price-level fit x identity fit +
mix-weighted draw) FAILED on held-out seeds (mixed dominator still won all markets;
focused plans got weaker) and was reverted. The load-bearing risk is the coupled
occasion/positioning-coherence deterrent + calibration, which exceeds a single
session. Branch + contract + evidence are the handoff; no rewrite PR opened (not ready).

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

Replace menu-independent arrival composition (the root of the cross-market
dominator) with DemandModel.Capture: per-segment consideration from relevant-option
depth, positioning focus, occasion variety (BreadthAffinityBp), and a representative
price-position gate. Consideration sets BOTH arrival volume and composition; MakeParty
now samples the captured mix; the forecast reuses the same Capture. Purchase (PickBest)
is unchanged. Quality-scaled depth saturation makes discerning segments need more depth
(a lone anchor is not an enthusiast destination). Lunch pool aligned to its value-heavy
identity (65→82% value, 120→150 arrivals). Focused Value rebuilt as a full-throughput
value operation. Weak-demand attraction floor recalibrated (70→35% of pool) for the new
demand regime. Integer/deterministic; no floats/Math.random in Core.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add --searchbase so the dominance search can run on fresh held-out seed bases
(the tuning base gets exposed by iteration). Add --probe/--manip/--attr/--fdir
diagnostics used to design and validate the demand model; these are the exact
experiments an independent reviewer repeats (see M0-DEMAND-REWRITE-REPORT §H).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New DemandModelTests locks: consideration range/determinism/smoothness, composition
responsiveness, the §15 manipulation suite (filler bounded, never-ordered zero-influence,
lone anchor partial, broad != full capture), the per-market regime gates (value wins
lunch, premium wins enthusiast, mixed viable in social), and the HONEST KNOWN-RESIDUAL
(a premium-anchored generalist stays a competitive all-rounder; the value lunch is the
pole that resists it). Recalibrate AttributionTests seat/cook regimes and the audited
forecast-direction test (assert agreement, not a fixed direction) for the new demand.
Re-baseline the three golden checksums (D-030).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Final report (reports/m0/M0-DEMAND-REWRITE-REPORT.md, §A-H) and iteration log
(reports/m0/demand-rewrite/candidate-1.md) with the held-out robustness sweep and the
decisive economic-root-cause argument. Contract implementation-status updated
(Conditional-Pass). DECISION-LOG D-029 (distinct regimes achieved; universal-generalist
gate borderline, economic cause; owner decision) and D-030 (goldens re-baselined).
Regenerated balance/determinism/forecast evidence (dominance-search on a held-out base).

Gate: Verdict Conditional-Pass / Action Continue. Do not merge; no human tests; no M1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Independent verification (VERIFIED WITH CAVEATS) flagged that dominance-search.md
hardcoded "held-out base 900000" even when --searchbase overrode it, and that --seeds
does not affect the (fixed-80) dominance search. Print the actual searchBaseSeed and
note that --seeds is search-independent; add a NOTE that the best-generalist regret is
seed-base-dependent and straddles 10% (read the distribution, not one run's binary
verdict). Fold the pooled 7-base regret sweep + the independent-verification result
into the report §C. No model/behavior change.

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

Copy link
Copy Markdown
Owner Author

Final Independent Adjudication — PR #7 (M0 Menu-Responsive Demand Rewrite)

A. Review identity

  • Repository: HSpector1/Restaurant
  • PR: M0 menu-responsive demand rewrite (Conditional-Pass; owner decision on residual) #7 (base fix/m0-economic-coherence)
  • Base commit: 7bd8060 · Head reviewed: e5baa541f18cf9021ba706ae0b7247428518f8e0
  • Date: 2026-07-30 · Env: Darwin arm64 25.5.0, .NET SDK 8.0.423, Release
  • Sub-agents: A correctness · B manipulation · C search · D economics · E legibility (parallel, read-only, own held-out seeds). Lead independently reproduced every High finding and ran an independent equal-compute frontier/robustness search + economic decomposition. Repo tree verified clean and HEAD unchanged after review (strictly read-only).

B. Executive verdict

  • Technical verdict: PASS. The demand rewrite is structurally correct and in scope. dotnet build -c Release clean; dotnet test = 139/139 (Core 54, Determinism 31, Scenario 54), 0 failures, stable across two runs.
  • Product-property verdict: PARTIALLY established. The value-lunch-vs-premium-dinner regime split is real and viable; menu/price genuinely shape arrival composition; manipulation is bounded. BUT three documented gaps remain (H1, H2, M2 below): a borderline fragile soft-dominator, an un-surfaced attraction mechanism, and softer-than-claimed social/enthusiast distinctness.
  • Action: Conditional-Pass / Defer.
  • Human-test authorization: NOT AUTHORIZED yet — one High legibility defect (H2) means a 5-player test cannot honestly evaluate the positioning hypothesis, and a justified economic correction (M1) is pending.
  • M1: Not authorized (unchanged, separate).
  • Merge: PR M0 menu-responsive demand rewrite (Conditional-Pass; owner decision on residual) #7 → PR M0 correction 3: economic coherence — High A (forecast) FIXED, High B (dominator) NOT resolved (Fail/Rewrite) — do not merge #5 branch: do not merge yet (land the two scoped corrections first, then merge as the demand-rewrite candidate). Correction chain → foundation: do not merge (pending human gate). Foundation → main: do not merge (pending human gate; M1 separate).

C. Rewrite correctness (§5) — CONFIRMED (Sub-Agent A + lead)

The funnel is genuinely staged in code: pool = MarketScenario.SegmentMixBp used only as a weight (Demand.cs:124); captured demand = CompositionBp = pure ratio Bp*w[s]/wsum (Demand.cs:126-127); arrivals = MakeParty sampling that composition (Simulator.cs:281-286). Composition responds to menu AND price via SuitBp = appeal x ResistBp x AffordBp (Demand.cs:28-35) plus the mean-main-price position gate (Demand.cs:89,106). SegmentMixBp is never used as final arrivals (raw only in the wsum==0 fallback). Forecast reuses the same DemandModel.Capture (Forecast.cs:21) — no parallel demand model. Purchase (PickBest) never reads consideration and vice-versa; a captured party can still NoOrder. No branch on market/strategy name anywhere in the demand path (SegmentId used only as an array index). No flat mixed-menu penalty / breadth tax / price-variance penaltyposFit uses price level (mean main price), the variety term is a strictly-positive reward reweighted by BreadthAffinityBp, and there is no dispersion/stddev term. Lead reproduced the no-name-branch and no-variance checks by grep.

D. Manipulation results (§6) — PASS-WITH-NOTES (Sub-Agent B + lead --manip)

All required cases bounded and economically reasonable: one/several cheap fillers keep value consideration at floor (100→343→395 vs pure-value 7399); a never-ordered dish is byte-identical to no dish (7399/8845/3413); a lone premium anchor gives partial (E 3413→5483 < pure-premium 7784) and costs value diners; broad menu under-draws every specialist; two-item menus degrade smoothly; extreme price spread reads as incoherent (all segments depressed); same-average/different-distribution is NOT treated identically (depth+variety respond per-dish) — refuting a plausible concern. Notes: (N1) a cheap filler on a premium menu can inflate social consideration slightly above a genuine social menu (BreadthAffinity quirk; self-defeating at purchase) — Low; (M3) duplicate RecipeId throws an unhandled ArgumentException at Demand.cs:54 (ToDictionary) — a latent input-validation gap, not a demand-gaming vector; (N2) Capture ignores staffing (documented Candidate-1 scope: operational-promise/pace deferred) so demand can attract a crowd the kitchen can't serve.

E. Search evidence (§7,8,9,10,11,12)

Methods: shipped harness dominance search across fresh bases (Sub-Agent C) + an independent equal-compute multi-start hill-climb I wrote (pool ~6140, 6 restarts × 160 steps, EQUAL budget for frontiers and generalist, held-out bases), plus a robustness perturbation sweep.

Worst-market regret is seed-dependent and straddles 10% — pooled across builder, verifier, Sub-Agent C, and my equal-compute runs: ~5%, 5%, 6%, 6%, 8%, 8%, 9%, 13%, 14%, 17%, 17%, 20%. Dominator (≤10%) on roughly half of held-out bases; no hard dominator anywhere (never <2%, the old failure) and no robust clean pass. Worst market is enthusiast-evening in every case.

§8 unequal compute — CONFIRMED (High): the shipped harness hill-climbs each frontier 80 steps but the generalist 120 steps (Program.cs:330 vs :339). This under-searches the frontier denominator and biases regret downward — i.e. the shipped tool is biased against the product (over-declares a dominator). Evidence it matters: the committed search shows the generalist's social result ($5938.97) exceeding its own social "frontier" ($5861.80). My equal-compute frontiers are materially stronger ($1659–1861 lunch vs the shipped $1390), and under equal compute the generalist never exceeds a frontier.

§11 robustness — DECISIVE (lead): even where the equal-compute generalist reaches 5% everywhere, it is a fragile knife-edge: only 1/12 (base 525252521) and 0/12 (base 636363631) two-mutation perturbations stay within 10% in all three markets. It is not a broad safe basin — a player cannot casually default into it and small changes cost >10% in some market.

§12 structural distinctness — REFINED (Medium, C3): the sharp split is lunch (value) vs dinner (premium) — the lunch frontier differs on ≥4 load-bearing dimensions (menu, price regime, expected meal cost, capacity). But the social and enthusiast frontiers largely overlap (both premium-anchored Roast Chicken/Ribeye/Risotto, differing mainly in price level and seats). So the honest picture is two sharp regimes plus a softer social↔enthusiast gradient, not three fully-distinct regimes.

F. Economic decomposition (§13,14) — rebalance JUSTIFIED (Sub-Agent D + lead, independently agree)

per representative cover revenue contribution station-min seat-min $/station-min $/seat-min
value (burger, ~1 course) $21.0 $16.5 7 ~23 $2.36 $0.72
premium (ribeye+starter+dessert) $104 $81 30 ~27 $2.70 $3.00
premium/value ratio ~5× ~5× ~4.3× ~1.2× ~1.15× ~4.2×

The "~5× a value cover" claim is confirmed (revenue and contribution), and per station-minute (the kitchen — the forecast's own named binding ceiling) premium leverage is only 1.15× (proportionate — this is why value wins the kitchen-bound lunch). But per seat-minute premium has ~4× leverage, because EatMin is a flat 12 minutes for every party (Simulator.cs:19,201) and a party's courses cook in parallel and deliver together — so a 3-course premium dinner occupies its seat essentially as long as a 1-course value lunch. This is a real, correctable capacity-duration omission, not a design non-goal. Sensitivity (D4): course-scaling the eat/dwell time (12→24) cuts premium seat-leverage from ~4.2× toward ~2.9×, which would shrink the generalist's cross-market edge. Classification: capacity-duration rebalance justified (targeted, not gate-chasing).

G. Player-strategy judgment (§15,16) — healthy generalist, but currently illegible

Against the §15 checklist the generalist reads much closer to a healthy generalist than a strategy-collapsing soft dominator: it is never the best (wins no market under strong search), specialists beat it by a material, seed-dependent 5–20%, it carries real operational commitment/risk (a full premium kitchen: high wages, slow dishes), and its advantage disappears under perturbation (0–1/12 robust). The one caveat cutting the other way is legibility (H2): because the positioning/attraction signal is invisible (§H), a player using rough comparisons could default to the premium build without understanding the tradeoff — which would make an otherwise-healthy generalist function as a soft default in practice. Fixing legibility is therefore the highest-leverage change for the product hypothesis.

H. Forecast and explanation (§17,18) — CONCERNS (Sub-Agent E + lead, both High reproduced)

Forecast directionality is sound (existing EconomicCoherenceTests/ForecastDirectionTests pass; forecast reuses Capture). BUT the core mechanism this rewrite adds is not surfaced to the player:

  • H2a (High, reproduced): ForecastSnapshot (Result.cs:4-12) carries no per-segment consideration/composition field; the forecast collapses all of attraction to one line ("Conversion of attempted visits: 78%"). A player committing a plan cannot see "you attract value 78% / enthusiast 6%" — the positioning decision is opaque pre-service.
  • H2b (High, reproduced): the post-service autopsy causes are exactly {seating, kitchen, menu-fit, weak-demand} (Simulator.cs:608-620); the only attraction-related cause ("weak-demand") fires only below 35% total capture. Attracting the wrong MIX (a full room of the wrong segments) has no category and the funnel is aggregate, not per-segment — so a low-value-covers outcome in a value market cannot be attributed to attraction vs conversion vs service.

Net: the product question (§2) asks for understandable strategies with visible consequences. The consequences of positioning are currently invisible, so a human playtest would test a game where positioning silently matters but cannot be understood — not an honest test of this design's central claim.

I. Regression and scope (§19) — CLEAN

Accounting reconciles; determinism holds (Determinism suite 31/31; identical checksums across runs); goldens re-baselined and documented (D-030); RNG streams isolated; forecast immutable; causal attribution logic intact (thresholds recalibrated, cause strings not hashed → checksum unaffected); exact-money parsing, FIFO, labor, numeric guards untouched; assets remain quarantined; changed surface confined to demand seams + fixtures (BreadthAffinityBp, lunch pool) + tests + docs. No non-goal systems introduced.

Key findings (severity format)

ID: H1  Severity: High  Status: Refined  Category: strategy integrity / search
Claim: a fixed premium-anchored generalist violates the 10%-everywhere gate on ~half of held-out bases.
Evidence: pooled worst-market regret 5-20% across ~12 bases; my equal-compute search reaches 5% (base 525252521).
Why: the locked strategy-integrity property is not robustly established.
Required action: treat as borderline+fragile (see H1-mitigant), pair with M1 economic correction; re-measure.
Gate effect: prevents "Pass"; does NOT force "Fail" because of the robustness mitigant.

ID: H1-mitigant  Severity: (note on H1)  Status: Confirmed
Claim: the violating generalist is a FRAGILE local optimum, not a robust safe basin.
Evidence: 0-1 of 12 perturbations stay within 10% everywhere (independent equal-compute robustness sweep).
Why: distinguishes a healthy jack-of-all-trades from a strategy-collapsing dominator.

ID: H2  Severity: High  Status: Confirmed  Category: legibility / product hypothesis
Claim: the positioning/attraction mechanism (per-segment consideration) is computed but never shown to the player.
Evidence: ForecastSnapshot (Result.cs) has no per-segment field; autopsy has no wrong-mix attraction cause (Simulator.cs:608-620).
Why: a human test cannot honestly evaluate "visible positioning consequences" (§2) if they are invisible.
Required action: surface per-segment consideration/attraction in the forecast + add an attraction-mix cause to the autopsy.
Gate effect: blocks human-test authorization until addressed.

ID: M1  Severity: Medium  Status: Confirmed  Category: unit economics
Claim: premium has ~4x contribution-per-seat-minute leverage due to flat EatMin=12 (multi-course seat time under-represented).
Evidence: Simulator.cs:19,201; decomposition in §F; D4 sensitivity (12->24 cuts leverage 4.2x->2.9x).
Why: partly drives the generalist's cross-market competitiveness; a correctable M0 omission, not a non-goal.
Required action: course-scaled seat/eat duration (capacity-duration rebalance); re-measure regret.
Gate effect: recommended before human gate; not gate-chasing.

ID: M2  Severity: Medium  Status: Refined  Category: strategy distinctness
Claim: "three distinct regimes" overstates it — social and enthusiast frontiers overlap (both premium-anchored).
Evidence: fresh-base frontier tables; my equal-compute (social has some value items, enthusiast pure premium, but heavy overlap).
Why: the real split is value-lunch vs premium-dinner; honest framing matters for the product claim.
Required action: report as two sharp regimes + a social/enthusiast gradient; consider strengthening the social occasion.

ID: M3  Severity: Medium  Status: Confirmed  Category: robustness
Claim: a menu with a duplicate RecipeId throws an unhandled ArgumentException.
Evidence: Demand.cs:54 ToDictionary on duplicate key; reproduced by Sub-Agent B.
Why: malformed input crashes the sim rather than validating; latent, not a demand exploit.
Required action: validate/dedupe menu input (defensive; low effort).

ID: N1  Severity: Low  Status: Confirmed  Category: search methodology
Claim: the shipped harness gives the generalist more hill-climb steps (120) than the frontiers (80).
Evidence: Program.cs:330 vs :339.
Why: biases regret DOWNWARD (against the product); the builder's reported regret is if anything pessimistic.
Required action: equalize search compute in the harness (or note it); already reproduced with equal compute.

J. Final gate

Verdict: Conditional-Pass
Action:  Defer
  • The demand rewrite is technically correct, in scope, deterministic, manipulation-resistant, and a genuine improvement (a real value-vs-premium regime split the old fixed-composition model could not produce) — hence not Fail/Rewrite.
  • It is not Pass: the strategy-integrity gate is borderline-violated (H1), the core mechanism is illegible (H2), and a justified economic omission remains (M1).
  • Defer = two small, targeted, justified corrections before re-review: (1) attraction legibility (surface per-segment consideration in the forecast + an attraction-mix cause in the autopsy) and (2) capacity-duration rebalance (course-scaled seat dwell). Then re-run the equal-compute regret + robustness. Defer does NOT authorize human testing, M1, or any merge.

K. Required owner decision

Howard & Aaron: authorize the builder to make the two scoped corrections — (a) make per-segment attraction visible in the forecast/autopsy, and (b) course-scale seat/eat duration so multi-course premium meals occupy seats longer — and then return for a re-review that decides the human-test gate? The alternative is to run the 5-player human gate now with those two as documented limitations. Recommendation: do the two corrections first — without (a) the playtest cannot evaluate the very mechanism this milestone adds, and (b) directly attacks the economic driver of the residual soft-dominator without any gate-chasing. Neither correction is M1; both are in-scope M0 finishing work.

Read-only review complete. No branch modified or merged. No human tests run. M1 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