OpenTPW

Review ORACLE-V2: the oracle fixes 8a72a2c (ORACLE-F)#

October 11, 2026. Re-review of 8a72a2c on 447b4c7 (the PPC oracle 16bb38e and round 1 2495290, merged onto fork main 8a000d8). Round 1 is docs/reverse/REVIEW-ORACLE.md.

Method:

Witness: tools/ppc-analysis/lanes/review/test_oracle_v2.py. Open findings are expected failures in it. It pins decoded fields and model results only.

Verdict: ACCEPT-WITH-FIXES#

Runtime fixes against the disassembly#

FixDisassemblyOracle C#Load-bearing (revert caught by)
F1 limit polarity0xdcba8 rlwinm. bit 0x8; bc 4,2 skips li 100 when set515/04 unit tests, oracle 515/515
F2 unsigned SPEED0xdcbe0 SPEED through the 0x43300000 unsigned magic, InitSpeed through xoris 0x8000—1 unit test, oracle 1
F2 u32 saturation0x1c3fbc—1 unit test, oracle 5
F3 rule 70x84134..0x8414c: word ≠ 0 refuses; 0x84ea4 stores 0 at entry and 1 before the end cell (0x84fbc, 0x850e0)2548/01 unit test, oracle 2
F4 32-bit money test0x82bc8 subf r5 = balance − cost; srawi/subfc/adde → sign bit511/0oracle only
ECON-046 negative cost—511/0nothing (OV2-4)
F5 strict deadline0xae088 cmpw deadline, now; bc 4,0508/0oracle only
F5 200 ms window0xae094..0xae0b8: magic /1000 and /200, C remainder508/0oracle only
Bounce start in hash——nothing in the no-asset suite

The polarity of the 200 ms window holds for negative elapsed times too: the C remainder gives −199..0 → 0.

Findings#

OV2-1 (medium, register): ECON-046 is a retired ID with another meaning. docs/reverse/APPROX-TRACE.md (lines 119, 229, 321, 382) and docs/reverse/PPC-scenarios.md already use ECON-046 for "upgrades need a mechanic", now contradicted. ECON-047 is taken in docs/reverse/RIDE-WEAR.md. tools/fidelity_register.py --check does not see the clash, because it reads C# only. Fix: renumber to a free ID, for example ECON-048. Witness: test_econ_046_is_not_a_retired_id.

OV2-2 (medium, F4 incomplete): the path writer keeps a 64-bit money test. ParkPathBuilder.WritePath refuses on park.Balance - park.CellCost(Path) < 0 (64-bit). It then calls TrySpendCell and ignores the result. This gives two wrong cases:

The oracle does not see this: its bridge rebuilds the order and calls TrySpendCell directly. Fix: if ( park != null && !park.CanSpendCell( CellPurchase.Path, 0 ) ) return false; or use the result of TrySpendCell. Witness: test_path_writer_uses_the_32_bit_money_test.

OV2-3 (low, unregistered deviation): the pending-line preview is not the traced validator. The original preview is the validator 0x84154:

The extension in 8a72a2c applies SetCellType's wrapping subtraction to the preview: (int)Balance − (int)((pending+1)·cost) ≥ 0. It agrees off the edges, and differs here:

PATH-plan §4 says the preview and the commit are separate tests. So "previews use it to match the commit" is not the original's design. Fix: model the preview on 0x84550 (a 32-bit pending sum, skip at 0, refuse when pending > balance), or register an APPROX. The path preview ParkPathBuilder line 169 needs the same fix. It is 64-bit and has no skip at 0. Witness: test_queue_preview_follows_the_traced_validator.

OV2-4 (low, test coverage): the new branches are guarded only by the private-binary oracle, or not at all.

Fix: add synthetic unit tests for TakeUnbounced (the deadline and window edges of the oracle inputs), CanSpendCell and TrySpendCell at ±2³¹ and with a negative cost, and a hash test with a live bounce slot.

OV2-5 (medium, gate evidence): the M3 mutation suites were broken by the slot shape and were not run. The v3/v4 hooks cast bouncing to List<(int, double)>. On 8a72a2c this gives an InvalidCastException:

The review commit fixes the hooks by shape only (the start is carried through). With that fix, v1 and v2 pass, and v3/v4 have 5 differences from the expectations:

Mutation / test447b4c78a72a2cReading
test_head_bound_is_n_plus_four_cells19484number moved (derived, stricter; see below)
head-delayed-170-turnsFAIL by the wait boundFAIL by rule (a), 85 > 84still caught; it no longer isolates the wait bound
cut-exit-transientno extra rowalso fails paths.no-unreachable-goalstricter
hold-slots-longer (expected PASS)PASSFAIL, head 179 > W(0) 178number moved: release now waits for the 200 ms window; the mutation is tuned one turn from the bound
hold-stand-walkFAIL (walk-stall 21 > 20)PASSno longer caught

How hold-stand-walk stops biting: in the 6-cell layout the boarding guest enters state 13 about 0.01 cells from its stand point and is Using one turn later. Pinning it creates no stall. Holding a guest that newly enters state 13 also passes. The gate's walk-stall code did not change. The mutation no longer reaches a stand walk. Fix: aim the fault at a guest with a real stand walk, or move the pinned guest back. Then re-pin the moved numbers.

The 194 → 84 bound change is derived and stricter. HeadNotReadyBound did not change; only its input changed (N = ⌈21/4⌉ = 6). (6 + 4) / 0.7 cells/s = 14.29 s = 58 turns, and 58 + 3 + 22 + 1 = 84. The baseline max is 26.

OV2-6 (low, pre-existing, unregistered): BOUNCE appends instead of taking the first free slot. BOARD-plan §5 (0xadf40) fills the first free slot. UNBOUNCE scans slots in index order. The bridge appends to a compacted list, so after a hole the release order differs. There is also no +100 slot cap. Witness: test_bounce_takes_the_first_free_slot.

OV2-7 (info, pre-existing): the jungle smoke's wall-clock Totem check. SandboxSmokeTest requires a release within 60 s of wall time after motion (MaximumSecondsUntilRelease, Stopwatch). The same check is on f049665. Unloaded, the release comes after 44 s on both 8a72a2c (2 runs) and f049665. A 27 % frame-rate drop makes it fail. Minimal non-weakening fix: measure the 60 s in the ride script's clock (Script.TimeMilliseconds − motionScriptMilliseconds), the time the script actually waits. Keep the 180 s wall-clock watchdog as the hang guard. The same applies to MaximumSecondsUntilMotion.

Witness edits#

test_queue_v1 and test_path_v1 changed polarity only:

Runs#

Merge readiness#

OntoResult
fork main f049665clean. Full asset suite on the merged tree: 1251 passed, 0 failed; no-asset suite 1063 passed
save-fix 3a66365conflicts in EconomyApproximations.cs, ECONOMY.md and FIDELITY-REGISTER.md. They are textual: SAVE-F drops ECON-045 next to the new ECON-046 line. Keep ECON-046 (renumbered, OV2-1) and regenerate the register
walk-impl b505706conflicts in DETERMINISM.md, FIDELITY-REGISTER.md, M3-GATE.md and DeterminismTests.cs. The clashes are semantic, see below

The walk-impl clashes:

WALK-F already resolved these in b10710e (schema 7, one bound), along with the harness slot shape and the re-pins (faa64cc). OV2-1, OV2-2, OV2-3, OV2-6 and OV2-7 are still open on faa64cc.

Resolution on walk-fix (WALK-F2)#

The witness test_oracle_v2.py pins the subject 8a72a2c, so its expected failures stay expected. The fixes on walk-fix:

FindingResolution
OV2-1Renumbered to ECON-048. fidelity_register.py now lists every ID that a docs table row uses but no register declares (34 IDs, ECON-046 and ECON-047 among them) under "Retired and reserved IDs". Declaring a listed ID fails --check, and --write never drops an entry.
OV2-2WritePath refuses through ParkEconomy.CanSpendCell, SetCellType's 32-bit test. A commit runs no other money test, because the path Validate skips money when it commits.
OV2-3Fixed, not registered. The path and queue previews use ParkEconomy.CanPreviewLine (0x84550): a 32-bit pending sum, 0 passes, refused when the sum is greater than the balance. The queue commit (BuildQueueCell) no longer runs the preview test, so only TrySpendCell decides.
OV2-4New C# tests. Each one fails when its rule is reverted: the 32-bit money test (3 tests), ECON-048, the strict deadline, the 200 ms window, the bounce start in the bridge hash, first-free-slot BOUNCE and the 64-bit preview (2 tests).
OV2-5hold-stand-walk pins the boarding guest for 30 turns at the centre of the queue's front cell, one cell back from the stand point. It fails queues.no-stuck-queue through walk-stall again. The v4 freeze hook counts occupied slots, and the v3 hold hook skips free slots.
OV2-6Traced (0xadf40). BOUNCE takes the first slot with visitor 0 among the header's bounce-size slots. With every slot taken it stores nothing and returns 0. UNBOUNCE clears the slot in place. New oracle target board-bounce: 505 inputs agree with the binary, the plan and C#.
OV2-7The Totem motion limit (30 s) and release limit (60 s) are measured on the ride script's clock. The 180 s wall-clock watchdog still fails a run that stops advancing.

The gate hash did not change: A07A2871552E22E8, with raw guest hash 29788288CB1437F4. So the schema stays at 7.

Source: docs/reverse/REVIEW-ORACLE-2.md in the project repository.