OpenTPW

Review WALK-V: traced steering and the queue gate's walk terms (b505706)#

October 10, 2026. Independent review of b505706 ("Walk guests with the traced steering and derive the queue gate's walk terms (WALK-I)") on c6c19ea (M3 acceptance). Spec: docs/reverse/WALK-plan.md (incl. §15) and tools/ppc-analysis/lanes/walk/. No original instruction was executed except the isolated pure routines 0xffe38 and 0xe6b28 in OpenTPW's own PPC interpreter (tools/ppc-analysis/oracle, 16bb38e). Everything else is static reading of the Feral Mac binary and OpenTPW builds in scratch worktrees. Pins live in tools/ppc-analysis/lanes/review/test_walk_v1.py.

Verdict: ACCEPT-WITH-FIXES#

The port is faithful where it claims to be traced. The speed model is bit-exact against the original (see Oracle). Gate, tests, smokes, register and evidence pass. Every M3 mutation that was caught at c6c19ea is still caught at row level, once the v3/v4 suites are made to compile again (WV-1).

The gate change is a loosening, and it rests on approximations that the gate no longer names:

Fix WV-1..WV-6 and WV-12 before merging; all are gate, register or test fixes except WV-13, a contrived-geometry production bug.

Answers to the gate questions#

  1. Derived from the trace, not calibrated on OpenTPW's runtime? Partly.

    • C = 9 comes from enumerating OpenTPW's port of the traced step. It was not fitted to the jungle run: the analytic floor slope, 65,536 / 7,733 = 8.47 updates per cell, is traced (0xffe38 at s = 0.59).

    • The enumerated step includes untraced parts: WALK-002 (corner branches), WALK-003 (separation, see WV-5) and WALK-004 (routes). It also includes an untagged walkability model (WV-6).

    • So the bound holds for OpenTPW's walk. It holds for the original only as far as those parts match.

  2. Is the enumeration actually bounding? For a single walk, yes: no counterexample in about 10⁹ adversarial walks, including 62-crossing, backward and folded routes. The head accounting is not sound for folded queues (WV-12). See "Adversarial enumeration".

  3. Is the W2 young-head skip a loosening that hides stuck queues? Yes, by construction (WV-2).

    • HeadYoung is decided once, when the guest becomes head, and suppresses rule (a) for the whole streak. A head younger than 15 turns that never moves is never judged by rule (a).

    • Shops and toilets have no wait bound (waitBound.judged = false), so rule (a) is their only stuck-queue check.

    • Not triggered in the jungle run (headNotReadyYoungHeadsNotJudged = 0 on all three queues). Arrival lanes make a head younger than 15 turns practically impossible there. That makes the skip a fail-open path with no benefit.

  4. Should the residual uncertainty be registered? Yes (WV-4).

    • Retiring GATE-004 is right: its specific claim, OpenTPW speed × 0.7, is gone.

    • Retiring GATE-005 replaces a check that was registered as stricter than the derivation with the derived, looser one. That is a loosening under the "gates may only become stricter" policy. It needs an explicit owner sign-off and a register entry rather than a silent retirement.

Findings#

Oracle (0xffe38, 0xe6b28)#

Run with the 16bb38e interpreter against the verbatim C# GuestSpeed in a scratch .NET 10 console.

RoutineInputsMismatchesEdge cases covered
Setter 0xffe386680±0, ±∞, NaN payloads, denormals, ±1e30, ±3 ULP around 0.0499 / 0.0249 / 0.05 / 0.59 / 0.6 / 2.0
Smoothing 0xe6b286320boost 0, 99–101, 660–663, 32767/8, 65534/5; s = denormal, FLT_MAX, ∞, NaN

An unfused formula gives 217 mismatches on the same inputs, so the comparison does discriminate. This confirms:

The steering constants and operators check out: 0.9 / 0.5 / 0.1, truncation, arrival < 20971 (strict), waypoint < 26214, the d/2 ramp, 6-of-15 stuck, bytes / 256. The stand point matches (rotation map 0xde4c8..0xde4fc, 255.0 fctiwz), so the QUEUE-007 closure holds. WALK-001 (boost increments) is correctly registered.

Adversarial enumeration#

A separate harness replicated the production queue walk: SetQueueDestination, the route + ahead/behind open set, TrackQueueCell, and route replacement on reroute. It ran about 10⁹ walks of random sampling and hill-climbing:

Results:

The per-walk term is bounding for the shapes tried. The enumeration in §15 did not cover backward walks, folded queues or the QueueCellIndex accounting (WV-12, WV-13). Record that in §15.

Behaviour#

Merge readiness (trial merges, aborted)#

OntoConflictsAfter resolving
fork main 8a000d8docs/FIDELITY-REGISTER.md only (generated)Builds 0 errors, register 197; tests without assets 1082 / 273 / 0 (the 0x714AAFDCEC083403 pin holds); --m3-gate 16 / 0 / 0, exit 0
SAVE-I 2ddf376tools/fidelity_register.py (REGISTERS: keep WALK and SAVE), docs/FIDELITY-REGISTER.mdWV-10 sentence
ORACLE-F 447b4c7docs/FIDELITY-REGISTER.md only—

No .cs conflicts. SAVE-I touches only AdvisorScoreQueue.cs among the guest/queue files. Schema: WV-9.

Numbers#

CheckResult
Release build (SDK 10)0 errors
Tests without assets1052 / 267 / 0
Tests with assets1234 / 85 / 0 (46 min under load ≈ 37)
--m3-gate × 216 / 0 / 0, exit 0, JSON identical apart from wallSeconds
Native smokes (osx-arm64 Release)Front end 531 frames, sandbox 1073 frames, --load-original-level jungle 4664 frames: all passed
Evidence runner (--mac-bin, --pc-data …/theme-park-world-patch2/data)OK, 15 suites, 989 tests, 181 skipped
fidelity_register --check187
CRLFExisting files keep their line endings; 4 new files LF like their neighbours
git diff --checkClean
Static review lanes v1–v4, queue, path, detOK

The theme-park-world root lacks the lower-case levels/ layout, so --pc-data must point at theme-park-world-patch2/data.

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