OpenTPW

Bounded track edit recovery (TRACK-018)#

October 18, 2026. This implements existing-track Backspace and reopening after explicit valid line/edit operations. It did not retire TRACK-018, TRACK-004 or TRACK-007, or implement the BLUEPRINT-003 cut-hover symbols.

Superseded in part (October 27, 2026, round 9 F): the collector's stack is now kept as it is (a walk that ends at the exit leaves it twice and Backspace takes the zero-length line back with the step (0, 0), the exit counting down and staying), the tool holds the PC's 1025 points, Backspace repairs the exit tile with the last-line flag, covers station tiles like any other, and TRACK-004, TRACK-007 and TRACK-018 are retired (docs/TRACKS.md, "The clear op"). The text below is the October 18 state.

Contract#

Static evidence, not an executable oracle#

A locally supplied reference archive yielded only a partial executable image: extraction ended with a fatal read result before EOF. No software from it was executed. Each function interval below was mapped through the PE section table and checked to lie wholly within the available prefix before static disassembly. This establishes the local instruction paths, not the identity, integrity or behavior of a complete executable; no original binary, private archive metadata or disassembly bytes are included here.

Remaining qualifications#

The reused station layout and protected-end mapping remain the existing approximation. The shared tool holds 1024 points while the original track collector holds 1025. When the complete recorded end is available, the tool retains only the most recent 1024 points; if the collector overflowed before recording the end, it seeds only that end and does not invent a segment across missing corners. Ownership checks and these bounds are conservative OpenTPW safeguards. Full original replay, pathological junction/overflow and restore equivalence still need an executable or independently recorded oracle. No new fidelity conclusion applies to TRACK-004's walk or TRACK-007's demolition. The cut-hover marker remainder stays with BLUEPRINT-003.

Regression coverage and execution status#

TrackEditRecoveryTests adds asset-free cases for both families, the repeated first corner, old and new lines, directional crossing preservation, exact per-clear refunds, add-on hook uniqueness, station/foreign protection, cancel/re-entry and saved-cell reconstruction. TrackAddOnLevelTests uses its existing CPU-only level fixture for live cut/mend ingress, model/visitor/economy synchronization, all operation causes, broken/condemned/upgrading/maintenance/queue guards and deliberately closed snapshot restore. TrackEditRecoveryDataTests optionally uses the player's own data to check shipped family costs and used-ride scrap rows; it is inconclusive when OPENTPW_GAME_PATH is absent.

These C# tests were added but could not be executed in the implementation environment because dotnet was unavailable. The tests are specifications until run, not pass claims. Before merging, run the focused track tests, the relevant aggregate suite and current-head CI, and independently review the implementation.

Source: docs/reverse/TRACK-EDIT-RECOVERY.md in the project repository.