The merged alch_worked_example_regression gate requires the worked example to pin monotonic restock counters at 901/1,802 as well as breaks at 550/1,100/1,650; the 9-cast SII steel-path pins were already monotonic, this adds the alch-tier batch-cadence pins consistently with the entry's declared model.
A successful sell followed sell-filled-awaiting-collect -> closed, and
'closed' had no outgoing transition while the scheduler left closed
slots untouched — every GE slot could perform ONE flip and then became
permanently unusable (no rotations, breaks, or longer sessions).
Fix (finding-by-finding, governor comment 10471):
1. 'closed' is no longer a sink. The completed cycle's ledger is
reconciled and ARCHIVED at close, and the physical slot is released
to free via the explicit archival transition closed -> free
(flip-candidates.yaml slot_transitions, whens, scheduler_iteration,
a9 archive step, summary, risk, sources). The scheduler pass
dispatches the release (SLOT_DISPATCH['closed'] = 'release'), so a
closed slot is only ever transient.
2. A deliberately closed cancelled sell releases identically:
sell-cancelled-awaiting-collect -> closed -> free (whens updated).
3. Committed two-rotation regression (validator, wired into
ge_lifecycle_errors for every flipping entry): slot_reuse_violations
walks one physical slot through free -> buy-open ->
buy-filled-awaiting-collect -> ready-to-sell -> sell-open ->
sell-filled-awaiting-collect -> closed -> free -> buy-open (second
buy in the SAME slot), validating every ledger frame against both
conservation gates; archived_ledger_preserved_after_second_buy
proves the rotation-1 archived ledger survives rotation 2 bit-for-bit
(no loss, duplication, or mutation). Negative fixtures prove a
closed sink or a closed that does not release to free FAILS.
4. ge_lifecycle_errors now requires closed == ['free'] exactly and
rejects any machine where a state has no transitions.
5. Worked example: t5/t8 walk the release, t8b runs rotation 2 in the
same physical slots.
All prior fixtures preserved (tax x4, async-slot scheduler,
collection-box, limit-window, side-aware conservation x25) — now 35
selftest checks.
Evidence: python3 tools/validate.py -> 2 entries, 0 errors, 1
pre-existing warning; --selftest -> 35 PASS, 0 errors; git diff
--check clean.
Owner guidance 2026-08-29 for governor review 10361 (PR #8), finding by finding:
1. Loss-reserve stop direction — the stop read 'session net loss (total
assets - initial capital) > 162,990'; a loss makes that LHS negative so
it could never exceed the positive reserve (the stop could never fire).
Now expressed everywhere as 'initial capital - total assets > 162,990'
(stop_conditions, worked-example step 6, recovery block, version pin):
a loss makes the difference positive, the strict-greater comparison
fires on losses and never on profits, and exactly-at-boundary does not
fire. tools/validate.py gains alch_accounting_regression(): comparator
boundary fixtures (below 162,989 / at 162,990 / above 162,991 / profit
side +50,000 / breakeven) plus entry-text pins rejecting the reversed
form anywhere in the file.
2. Fill-price scenarios for realized GP bounds — previously gp_per_hour_low
/high derived only from the live-low -3.00/cast margin while the buy
policy permits live low + 5% (candidate 423.15 + nature 147 = 570.15 vs
540 lowalch = -30.15/cast). The economy block now declares FILL-PRICE
SCENARIOS A (live-low 543 -> -3.00/cast) and B (max allowed +5% 570.15
-> -30.15/cast) as the single ledger behind capital, batch economics
AND the GP bounds: gp_per_hour_low -29,463 (scenario B x session-fast
977.2), gp_per_hour_high -1,758 (scenario A x session-slow 585.9),
midpoints -22,365 / -2,225 pinned; validator enforces the exact bound
values and the -30.15/570.15/423.15 scenario pins.
Preserved: complete GE acquisition/restock flow, one-cast iteration,
monotonic break/restock counters, total-assets accounting (floor
575,150), fail-closed staff path, and the earlier fixed pacing/equip
findings. version 5 -> 6, updated 2026-08-29.
Gate: python3 tools/validate.py -> 2 entries, 0 errors, 1 pre-existing
F2P WARN (low-alch-f2p researched, untouched); git diff --check clean;
regression negative-tested (old gp pins, reversed form, missing scenario
pins all rejected).
- Buy-limit reset NEVER cancels an offer: quote_age_policy now aborts
only on a stale scanned edge or explicit strategy reallocation; the
4h window is a capacity clock (limit_ledger), not an offer deadline.
Removed every lapse-as-cancel trigger from best_practice, whens,
quote_age_policy, a5/a8, worked example, risk, and the a6 verdict.
- Completed offers pass through the collection box: new canonical
sub-states buy-filled-awaiting-collect / sell-filled-awaiting-collect;
a full buy cannot sell and a full sell cannot close before ge_collect
(scheduler dispatches collect for all four *-awaiting-collect states).
- Works the arrowtips example side-aware: a 4,000/10,000 partial BUY
cancel returns 4,000 units + refunded CASH for the unfilled 6,000 —
never 'refunded units'; the phantom 10,000-unit withdrawal is gone.
- conservation_violations() is now side-aware (buy: quoted =
filled + still_open + cancelled_unfilled with acquired items = filled
only, cash = spent + still_committed + refunded; sell: quoted =
sold + still_open + returned_unsold) with slot_phase_violations()
phase gates and committed negative fixtures: phantom refunded buy
units, a full buy sold before collection, a full sell closed before
proceeds collection. Existing tax/scheduler/limit fixtures preserved.
- grammar (ge_cancel/ge_collect), schema sub_states minItems, entry
version 5 + sources updated accordingly.
Owner guidance 10325 (governor 10297 findings, exactly):
- GE acquisition path for initial buy AND every restock: open -> place ->
wait/fill -> collect (ge_open/ge_buy/ge_collect; new wait_offers state),
partial-fill collect + re-place recovery, bank-stock fast path only when
the bank actually holds stock — never withdraw an unbought batch.
- Capital model: staff cap 5,000 + first batch at max fill 570,150 +
6-batch worst-case loss reserve 162,990 + float 570,150 (~1.31M);
capital stops use TOTAL ASSETS (cash + supplies), never raw cash.
- Monotonic counters: breaks at 550/1,100/1,650 independent of restocks
at 901/1,802 (gcd 550,901=1); validator regression rejects the old
1,452 restart bug and enforces the pins.
- Rates: loop-only 837.2 labelled ceiling; steady-state 639-1020 (mid
791.2); session-realized 586-977 (mid 741.8) over the explicit 2h
session horizon -> xp 23,000, gp -2,930..-1,760.
- Staff equip FAIL-CLOSED after bounded retries; fire-rune fallback prose
removed everywhere.
Preserves one-cast iteration, cast-count breaks, rune javelin tips anchor,
pacing/equipment fixes. version 4 -> 5.
Owner lifecycle addendum (2026-08-28) + governor bounce 4 (lifecycle contract):
- state machine now covers the ENTIRE buy -> sell -> collect flow with no
stranded state: partial fills tracked per slot (filled_qty ledger), 4h-lapse
buys go to a new cancel_requote state (ge_cancel: units return to inventory,
cash refunds, slot freed) instead of collect, cancelled units still sell at
the high edge, lapse sells re-quote or lower rather than strand
- action grammar + schema extended ONCE with the cancellation mutation
ge_cancel (was missing; ge_clear/ge_offers_done are predicates only) and
used explicitly in the new a8 cancel-requote action
- concrete runtime state: minimum per-slot capital table (buy x 4h limit),
members 8-slot vs F2P 3-slot paths, per-slot offer phase + quantities,
buy-limit window, inventory/collection reconciliation in a9
- breaks connected to an explicit safe/resume path: resting offers persist
server-side + per-slot ledger survive the pause; resume = re-open GE,
re-check offers, continue current phase; never break mid-collect/mid-place
- rates qualified against the full lifecycle: 149,500 gp/h is named the 4h
buy-limit CEILING; realized range = ceiling x fill_factor (~0.5-0.9) x
duty_cycle (~0.90-0.95) ~ 96,300 gp/h midpoint; gp_per_hour_low 74,750
- pinned worked example: capital 22.5M -> 8 slot quotes -> arrowtips partial
fill (4,000/10,000 tracked) -> iron bar full fill sell (90,000 net) ->
cosmic no-fill ge_cancel + requote -> arrowtips partial matures at lapse
(cancel, sell 4,000, 68,000 net) -> first break after 6-10 rotations ->
resume -> stop conditions
- version 2 -> 3; evidence: validate 2 entries 0 errors 1 pre-existing WARN,
selftest 4 PASS (fractional-tax fail, ge non-margin pass, floored pass,
above-cap pass), synthetic merge main 79cab78 + head clean + gate green,
git diff --check clean
Governor-review (PR #10, attempt 2) findings, same issue-5 branch:
1. Pacing is additive. action-grammar.md defines anti_ban.delay as sleep
AFTER the action, so a cast takes 1.8s + 1.6-3.4s = 3.4-5.2s (mid
4.3s), ~837 casts/hr, not 1,400 or 1,800. Both entries now pin the
midpoint rate with the formula documented: LA 25,953 / SII 44,372 /
HLA 54,419 xp/hr. low-alch-f2p gp_per_hour bracketed by the delay
endpoints (-119,000 / -78,000).
2. run_control units agree: schema.md 'every' counts iterations and
iteration is one cast, so break.every [8, 14] is casts (comment no
longer claims bank cycles).
3. SII is now a concrete recipe. New top-level recipes: table models all
eight F2P smithable bars (bronze/iron/silver/steel/gold/mithril/
adamantite/runite) with every input and quantity (coal 2/4/6/8,
Smithing gates, bar ids) from the OSRS wiki smelting table. The
cast-superheat action pins params.recipe (steel-bar anchor) plus a
recipe_rule: smithing gate + complete input cost + one nature rune <
bar price; buy/withdraw the exact unnoted inputs; bank the bar.
entry.schema.json gains the optional 'recipes' section. Validator
gains recipe/SII checks and a deterministic steel-bar fixture
(1 iron + 2 coal = 3 inputs; margin 600 - (100 + 2*150 + 145) = 55).
4. Validator no longer crashes on malformed docs: scalar/empty YAML is
rejected with a normal ERROR (document shape check) and
supply_limit_conflicts guards non-mapping rows; regression fixtures
cover (bad.yaml, None), scalar docs, and undeclared recipe ids.
Tests: python3 tools/validate.py -> 2 entries, 0 errors, 0 warnings
(exit 0); --selftest -> 14 PASS; live negatives: scalar + empty docs
error cleanly (exit 1, no traceback), reintroduced 12500 divergence is
caught (supply-fact gate), git diff --check clean.
Governor-review bounce (PR #10) fixes on issue-5:
1. Timing units + rates: one OSRS tick = 0.6s so a 3-tick cast is 1.8s,
not 5.4s as both action comments claimed. The mandatory 1.6-3.4s
post-action delay (mid ~2.5s) allows ~1,440 casts/hr before overhead;
rates are now pinned at 1,400 casts/hr: LA 43,400 / SII 74,200 / HLA
91,000 xp/hr (was 55,800 / 95,400 / 117,000 @ 1,800). The old 1,800
figures were unreachable under the entries' own pacing.
2. Nature rune limit unified to 18000 (mapping 'limit' + Module:Exchange
agree, fetched live 2026-08-27): low-alch-f2p 12500 -> 18000, matching
magic-alch-handoff. tools/validate.py gains a cross-entry supply-fact
consistency check (same item+source must agree on ge_limit; run on
every gate invocation) plus --selftest regression fixtures: diverging
limits must fail, agreeing limits must pass, missing ge_limit is not
gated.
3. SII tier is now phase-aware and translatable: actions split into
cast-alch (LA/HLA -> cheapest alch candidate, noted stack) and
cast-superheat (SII 43-55 -> unnoted ore whose live bar margin is
positive; never a noted stack, never a price-only pick; on_fail skip
when no positive-margin ore). State machine pins each tier path
(LA <43, SII window chosen/skipped 43-55, HLA >=55), bank_supplies
banks smelted bars, buy-supplies restricts ores to positive-margin
recipes.
Tests: python3 tools/validate.py -> 2 entries, 0 errors, 0 warnings;
--selftest -> 3 PASS; negative test (reintroducing 12500) caught by the
new check; git diff --check clean.
- Pacing: 3-tick cast is 1.8s (0.6s/tick), not 5.4s; xp_per_hour and
gp_per_hour now derive from the mandatory anti_ban.delay [1600, 3400]ms
pause (2.5s midpoint -> 1,440 casts/hr -> 44,640 XP/hr), arithmetic pinned.
- Anchor: model the actual least-loss liquid candidate, rune javelin tips
(id 19580, -3/cast live, limit 10,000, lowalch==highalch*2//3 asserted);
top-10 margin list re-fetched live; sign errors in old caveat fixed
(opal amulet (u) stale-low artifact disqualified, jade ring now
marginal-profit and flagged as flip candidate, not the anchor).
- Bryophyta's staff + Tome: document the 30 Attack equip gate; accounts
below it keep the ordinary Staff of Fire path (default, no Attack req).
- version 1 -> 2. Validator: 0 errors (1 pre-existing F2P WARN).
Governor-review bounce (PR #7) fixes on issue-1:
1. GE 2% convenience fee rounds DOWN per item: net = sell - floor(0.02*sell) - buy.
Anchor net 16.12 -> 17 (244-4-223); top-8 members table recomputed with
floored tax -> 598,000/4h = 149,500 gp/h (was 138,000); gp_per_hour_low/high
updated. Validator now rejects fractional-tax arithmetic for GE-margin entries.
2. State machine split wait_fill into wait_buy_fill / wait_sell_fill so the full
buy -> buy-fill -> sell -> sell-fill -> collect path is explicit; sell cycle
can no longer loop back into sell without collecting.
3. Economy qualified as the members path (8 slots); F2P path added (3 slots,
F2P-tradeable rows only): Iron bar + Cosmic rune + Silver ore = 227,000/4h
= 56,750 gp/h. Members/F2P flags cross-checked against wiki item pages.
- low-alch-f2p.yaml: 'bank at a GE-adjacent bank' source now cites the wiki
Money making guide (noted-item bulk alching, West Varrock Bank F2P hub) and
High Level Alchemy page (GE buying below alch value; noted-item casting).
Researched-flag WARN eliminated.
- Verified handoff levels from the wiki: LA 21 (31xp), SII 43 (53xp), HLA 55
(65xp), all F2P; LA page explicitly recommends HLA at 55. Recorded as a
soft-efficiency-choice note on the golden entry and a new self-contained
entry codex/training/magic-alch-handoff.yaml (id magic-alch-handoff).
- Gate: RESULT 2 entries, 0 errors, 0 warnings; diff --check clean.
Live-verified 2026-08-27 against prices.runescape.wiki mapping/latest
(members catalog: lowalch != null, members=true, 3232 tradeable items)
plus OSRS wiki spell infoboxes and Module:Exchange limits.
- Same state machine + actions as low-alch-f2p (golden template)
- Top-10 least-loss members candidates in economy.profit_drivers
- Handoff note verified from LA page: switch to HLA at 55 (hard level
gate + strictly more coins and xp per cast); Superheat Item (43) is
a smithing production spell, not the magic-XP handoff
- best_practice: staff of fire, noted items, Bryophyta's staff + Tome
of Fire combo, self-crafted natures via Abyss; every line sourced
- accounts: membership members, min_level 21
Closes#2
Implements the epic's uncovered P0 economy backlog item (flip candidates).
Verified source chain 2026-08-27: prices.runescape.wiki mapping + latest,
all 15 shortlist limits cross-checked against Module:Exchange (agree);
GE tax verified at 2% since 2025-05-29 (1% at 2021 intro), 5M/item cap,
sub-50gp effectively untaxed; Merchanting + Grand Exchange/Buying limits
pages cited for mechanics. Net model: 0.98*sell - buy at band edges.
Gate: python3 tools/validate.py exit 0 (2 entries, 0 errors, 1 pre-existing
warning on the golden entry's researched flag — none added by this entry).