feat(ADR-0015): doom as nine-stream accumulating rate — no printed deltas#643
Merged
Conversation
…ltas Restructure doom into the DQ-21 nine-stream model: doom_rate = sum of named streams (baseline/overhang/diffusion/compute/panic/alarm/ledger/tech-debt/ pulses + gated momentum), each fed by a world-state intermediary on GameState (ambient_risk, frontier_capability map w/ player slice, general_capability, global_compute, dedicated_ai_compute, safety_absorption, global_alarm, global_panic, political_pressure gate-only). No action/event writes doom. - rivals: per-action doom literals + CAPABILITY_OVERHANG_DOOM_PER_PROGRESS + per_tick_doom_scale shim RETIRED; rivals raise capability_progress (their frontier slice) + global_panic; overhang stream converts stock to hazard - ledger doom routes as a named stream input (single-authority, no clobber) - momentum: gated stream-level modifier (momentum_enabled/weight preserved) - N=6-month negative-trend telemetry invariant (loud flag, never a clamp) - per-stream API for F3 overlay + two-instrument rate/level readouts - code doom writes in actions/upgrades/turn_manager migrated to intermediaries - Legacy #6 list executed (see PR body); event-JSON content doom flagged as the remaining follow-up (inert no-ops today) Regression: 72-run sweep reproduces the L1 calibration headline within tolerance (do_nothing 14.0; T9 floor >=6; mortality max 26/0 immortal; loan_desperation 8/8 ledger-rooted; policy ordering preserved). Coefficients + rationale: docs/balance/DOOM_STREAMS_v1.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Quantize doom-adjacent live floats (streams, stocks, level, momentum) to a BINARY-EXACT grid (2^-20). Godot's JSON parse is not correctly-rounded (calibration section 7.2); power-of-two-grid doubles round-trip losslessly, so save/load + the "next turn identical" replay stay bit-stable. Sweep medians are byte-identical (grid ~1e-6, far below any gameplay scale). - Migrate the doom-assertion unit tests to ADR-0015: safety_research/audit/ team_building/desperation_lever assert intermediary writes (absorption), not a printed doom delta. test_liability_ledger detaches doom_system so the ledger's isolated synchronous-doom soak keeps its hand-rolled arithmetic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PipFoweraker
force-pushed
the
adr-0015-doom-streams
branch
from
July 15, 2026 05:56
cbad24d to
4a4bc85
Compare
A sustained N=6-month negative doom trend is LEGAL play (only the exploit sweep gates on it), but push_warning surfaced it as an engine fault — and GUT counts any warning pushed during a sim run as a test failure (the non-blocking Simulation gate: test_seed_schedule + others tripped "Unexpected Errors"). Emit the telemetry as a tagged print instead: still loud in logs/telemetry, no longer a false engine warning. Determinism was never affected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 tasks
PipFoweraker
added a commit
that referenced
this pull request
Jul 15, 2026
Verified current main (post #636/#638/#639/#640/#641/#643 merge stack) launches clean headless, plays a full month through the End Turn -> MonthController path, and passes the fast unit gate CI runs (345 tests, 0 failures, 36/36 files). Nine-stream doom, finance offers, and flight recorder all pass their unit suites with no wiring gaps found. No code changes needed -- green light for tomorrow. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 15, 2026
PipFoweraker
added a commit
that referenced
this pull request
Jul 15, 2026
…ats -> stream base Merged origin/main (74074c8, ADR-0015 nine-stream doom). Framework is orthogonal to the doom internals — clean merge, no conflicts, and all three instruments ran clean against stream-based doom (no breakage). Refreshed numbers + caveats now read "on nine-stream doom (post-#643)" instead of "pre-migration". Ordering is migration-robust: - Policy sweep: safety_lean 18.0 best, balanced_operator 16.0, fundraise_first 14.5 (still beats loan_desperation_reactive 13.0), passive 14.5 (~= calibrator do_nothing 14.0, cross-harness anchor holds), capability_rush 7.0 / loan_hoard 5.0 worst. T9 HOLDS for all reactive standard lines. - Desperation solver: the trap SURVIVED and got STEEPER on stream doom — lever@always now -5.0 median months (was -2.5), doom->ledger death conversion total (2 -> 12/12). Added two bullets to DESPERATION_SOLVER.md so the divergence isn't misread: the solver (isolates the mechanic) is the trap's instrument; the opening book's near-neutral lone-lever signal is a lever washed out among random picks, not a contradiction. - Opening book: winners over-index on money-in + doom-down (apply_grant +1.67, fundraise_big, publish_paper); losers on safety_research, take_loan, hire_capability_researcher. Determinism re-verified (policy sweep identical across runs). Full suite green (quick 355 / sim 93 / integration 14). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PipFoweraker
added a commit
that referenced
this pull request
Jul 15, 2026
…r (unified harness) (#642) * feat(balance): EE-9 reactive-policy framework + solver + EE-10 opening-book miner Tooling-only balance instruments (tests/manual, excluded from CI). No gameplay code changed. EE-9 · Reactive rule-policy framework (reactive_policy.gd): a policy = ordered (condition -> action) rules evaluated at the plan phase (action priority) and per response window (verb), reading a features snapshot (cash, runway, doom, reserve, ledger load, offers). Declarative + parameterized so future sweeps vary the dials. Named policies (sweep_policies.gd): fundraise_first (the new standard finance line — fundraise by default, loan only when runway < N months), balanced_operator, scout_heavy (proxy pending DQ-18 scouting), loan_desperation (naive foil), plus the five exploit-sweep dispositions re-expressed as reactive policies (unit-tested to reproduce the old _choose_actions priority — the "keep existing policies working" regression link). MonthRunner: deterministic headless driver of the real L1 month loop (plan -> day-tick playback -> window auto-pause -> boundary), shared by all three instruments. test_l1_month_sweep.gd — month-grain sibling of the exploit sweep (kept untouched). test_desperation_solver.gd — EE-9 solver-bot isolating the desperation lever (DQ-25). test_opening_book_miner.gd — EE-10: random opening prefix + fixed continuation, feature -> outcome deciles, raw CSV. Framework unit tests + full suite + determinism verified green. Outputs carry a prominent pre-migration caveat and a one-line regenerate command (DQ-21 re-run). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(balance): unify EE-9/EE-10 onto the calibrator's harness; regen on calibrated base Correction round (PR #642): the earlier work branched a stale origin/main (58a5a17, pre-calibration). Rebased onto true main (4a0f4ae calibration + ef06ec1 #641 L5 finance). Harness unification (fixes the two-month-runners smell): - Extracted the calibrator's run loop (test_l1_month_sweep.gd _run/_answer_windows) VERBATIM into l1_month_driver.gd — one shared driver. Parity verified: the calibrator's regenerated docs/balance/L1_sweep_runs.csv is BYTE-IDENTICAL to the tracked calibration copy, so the extraction is outcome-neutral and the calibration table stands unchanged. - test_l1_month_sweep.gd now delegates to the driver (LegacyPolicyAdapter); its policies + reporting are untouched. Deleted the parallel month_runner.gd. - reactive_adapter.gd bridges reactive policies (ReactivePolicy) to the driver, with the opening-prefix override seam for EE-10. - Renamed the reactive policy loan_desperation -> loan_desperation_reactive to avoid colliding with the calibrator's loan_desperation. Regenerated ALL data on calibrated constants (runs now last months, so strategy expresses): - Policy headline (docs/balance/POLICY_SWEEP.md): safety_lean 18.5 mo best, passive 14.0 (== calibrator do_nothing, cross-harness anchor), fundraise_first 14.0 beats loan_desperation_reactive 13.0, capability_rush 6.0 worst. T9 floor HOLDS for all reactive standard lines (measured, not gated). - Desperation solver: the lever does NOT pay — firing earlier/more is monotonically worse (lever@always -2.5 mo) and converts doom deaths into ledger deaths (1 -> 12). fundraise_first now uses the L5 raise-as-campaign flow (seek/accept offer, pay_bills). - Opening book v0: winners over-index on money-in (fundraise_small +1.56, apply_grant); losers on hire_capability_researcher (-2.11), take_loan, desperation_lever — cross-validating the solver. Doc caveats rewritten to the true base. Full suite green (quick 365 / sim 93 / integration 14). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(balance): regenerate desperation-solver report with dose-response bullet Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * balance(EE-9/EE-10): regenerate on nine-stream doom (post-#643); caveats -> stream base Merged origin/main (74074c8, ADR-0015 nine-stream doom). Framework is orthogonal to the doom internals — clean merge, no conflicts, and all three instruments ran clean against stream-based doom (no breakage). Refreshed numbers + caveats now read "on nine-stream doom (post-#643)" instead of "pre-migration". Ordering is migration-robust: - Policy sweep: safety_lean 18.0 best, balanced_operator 16.0, fundraise_first 14.5 (still beats loan_desperation_reactive 13.0), passive 14.5 (~= calibrator do_nothing 14.0, cross-harness anchor holds), capability_rush 7.0 / loan_hoard 5.0 worst. T9 HOLDS for all reactive standard lines. - Desperation solver: the trap SURVIVED and got STEEPER on stream doom — lever@always now -5.0 median months (was -2.5), doom->ledger death conversion total (2 -> 12/12). Added two bullets to DESPERATION_SOLVER.md so the divergence isn't misread: the solver (isolates the mechanic) is the trap's instrument; the opening book's near-neutral lone-lever signal is a lever washed out among random picks, not a contradiction. - Opening book: winners over-index on money-in + doom-down (apply_grant +1.67, fundraise_big, publish_paper); losers on safety_research, take_loan, hire_capability_researcher. Determinism re-verified (policy sweep identical across runs). Full suite green (quick 355 / sim 93 / integration 14). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
PipFoweraker
added a commit
that referenced
this pull request
Jul 15, 2026
Developer-facing architecture map (audience: future junior dev). Maps each major system to its code and deciding ADR(s), with honest built/partial/designed status. Preserves the prior funder pitch at ARCHITECTURE_FUNDERS.md. Written against the L1 wave (month engine #636, nine-stream doom #643, finance #641, calibration #638, honest CI #640). Surfaces coherence-check findings in §7. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR-0015 — doom as a nine-stream accumulating rate (no printed deltas)
Implements ADR-0015 on the fully-vetoed DQ-21 intermediary semantics. Doom is now an accumulating rate computed each day tick from a sum of named streams, each fed by a world-state intermediary. No action or event writes doom directly. Reproduces the L1 calibration (
docs/balance/L1_CALIBRATION_2026-07-14.md) within tolerance.Base:
origin/main@4a0f4ae(the #638 calibration squash). Regression is measured, not asserted.The nine streams (DQ-21)
doom_rate = Σ streams→doom_level += rateeach tick.baseline←ambient_risk ·overhang←frontier−safety_absorption (max over actors, clamped ≥0 v1) ·diffusion←general_capability ·compute←dedicated_ai_compute ·panic←global_panic ·alarm←−global_alarm (native-negative) ·ledger(routed input) ·technical_debt·pulse:*(hooked, no content) ·momentum(gated modifier).political_pressure/global_computeare gate/derivation-only.What changed
doom_system.gdrewritten: streams read intermediaries via_advance_intermediaries(flow→stock); single-authority integration; per-stream API (get_doom_rate/get_doom_level/get_stream_contributions/get_dominant_stream) for the F3 overlay + two-instrument readouts; N=6-month trend telemetry invariant as a LOUD flag (never a clamp).rivals.gdraisescapability_progress(itsfrontier_capabilityslice) +global_panic; the overhang stream converts it. The per-action doom literals,CAPABILITY_OVERHANG_DOOM_PER_PROGRESS, and theper_tick_doom_scaleshim are retired.add_stream_input("ledger", …)— a stream input, not a parallel level write (completes the balance: L1 recalibration — dials 1-4 applied + iteration log #638 single-authority fix; no clobber).doom.momentum_enabled/weightpreserved, mid-run toggle-safe).GameState(+ reset + save/load).actions.gd/upgrades.gd/turn_manager.gdmigrated to intermediaries (frontier/absorption/alarm/panic).Regression (72-run sweep, same seeds/policies — calibrated → migrated)
MORTALITY: max 26 mo, 0 immortal(« 400). do_nothing median 14 ✅ · T9 floor ≥6 all standard ✅ · orderinggreedy≈loan≈random < do_nothing < safety < reserve✅ · loan ledger-rooted ✅. Coefficient table + per-stream rationale + deviations:docs/balance/DOOM_STREAMS_v1.md.Legacy §6 shopping-list execution (15 items)
per_tick_doom_scaleshim → frontier/panic; Add expense requests for employee needs #13 tech-debt →technical_debtstream; Add multiple opponent labs as events with stats tracking #15 event/action direct writes → code sites migrated (event-JSON content is the flagged follow-up, below).doom.status_cutoffs(orphan); Add productive employee actions #12CAPABILITY_OVERHANG_DOOM_PER_PROGRESS.base_per_turn→ambient_risk(baseline stream input).DOOM/REP_PER_UNPAID_1000consts kept as harmless fallbacks (deleting risks the locked ledger teeth — flagged).Follow-ups flagged (v1 hooks, not this lane)
data/events/*.json) — the un-migrated clobber remainder (Legacy Add multiple opponent labs as events with stats tracking #15 / memo §7.1); inert no-ops today, re-authored to intermediaries by a content lane. The genericadd_resources/resource_accessordoom sinks are annotated as this remainder.FLAGSHIP — for review, do not merge.
🤖 Generated with Claude Code