# PLAN-NATIVERESTORE-001: Phase D, native-safe builds and restoration of the oracle (immutable Phase 3) Drafted 2026-10-20T10:51 on LAB-OMARCHY at `develop` `a2382b23`, on Payton's instruction of 10:49 ("Draft the Phase D step 1 plan now, execute later"). Revision 2 (13:00) answered hostile validation round 1 (receipt `docs/receipts/hv/20261020T122200-plan-nativerestore-001-gpt61sol/`, DISAGREE 85/70). Revision 3 (13:50) answered round 2 (receipt `docs/receipts/hv/20261020T131300-plan-nativerestore-001-r2-gpt61sol/`, DISAGREE 92/84). Revision 4 (15:31) answers round 3b (receipt `docs/receipts/hv/20261020T141600-plan-nativerestore-001-r3b-gpt61sol/`, DISAGREE 94/89, 25 PASS, 5 FAIL, 1 UNKNOWN, 4 ADD-AC, the first round whose session-log turn is primary-persisted). Revision 5 (16:30) answers round 4 (receipt `docs/receipts/hv/20261020T153600-plan-nativerestore-001-r4-gpt61sol/`, DISAGREE 96/93, 34 PASS, 3 FAIL, 4 ADD-AC, primary-persisted) and records Payton's repeated R12 ruling as a named blocker. Revision 6 (17:25) answers round 5 (receipt `docs/receipts/hv/20261020T163300-plan-nativerestore-001-r5-gpt61sol/`, DISAGREE 97/96, 40 PASS, 3 FAIL, 4 ADD-AC, primary-persisted). Revision 7 (18:05) answers round 6 (receipt `docs/receipts/hv/20261020T172500-plan-nativerestore-001-r6-gpt61sol/`, DISAGREE 97/97, 45 PASS, 3 FAIL, 3 ADD-AC, primary-persisted). Revision 8 (18:52) answers round 7 (receipt `docs/receipts/hv/20261020T180300-plan-nativerestore-001-r7-gpt61sol/`, DISAGREE 97/98, 50 PASS, 1 FAIL, 3 ADD-AC). Round 8 (receipt `docs/receipts/hv/20261020T185200-plan-nativerestore-001-r8-gpt61sol/`, 18:53 to 19:32, primary-persisted) returned AGREE, accuracy 98, completeness 98, 54 PASS, 0 FAIL, 0 UNKNOWN, with two low add-AC notes applied at 19:33 without changing any step; the plan is approved for execution once Payton releases it (A02). Section 7 maps every finding of all rounds to the amendment that answers it, each verified against source before the amendment was written. Scope of record: `HANDOFF.lockstep-plan.md` section 4 Phase D (steps 1 to 5 and the exit) as amended by `HANDOFF.lockstep-plan.v2.md` section 4 (PowerShell builders are canonical; step 4 runs on both machines, each after its own preservation receipt) and section 11 decisions D3 (no hostile validation of implementation gates inside the remediation phase; plans are hostile-validated before execution, Payton 12:21), D4 (restoration approved now; build artifacts are gitignored, not deleted as dirt; generated files are excluded, tracked modifications are reverted after preservation), D6 (develop only), D8 (accuracy first). Immutable-plan Phase 3 (`PLAN-VICE-IMMUTABLE-001.md`) defines the exit gate this plan must meet. This is a plan, not an execution; nothing under `native/vice` changes until this plan reaches HV AGREE at 98/98 and Payton releases implementation (A02). ## 1. Observed starting state (receipts, not memory) - Superproject gitlink and checked-out commit of `native/vice`: both `cc67418cba58e71d8e70fd353e9de47199ad2075` (`git submodule status`, 10:50). `.gitmodules` carries `ignore = dirty`, which hides the submodule's dirtiness from the superproject's status but changes nothing inside the submodule. The submodule's git dir is `.git/modules/native/vice`, so its local exclude file is `.git/modules/native/vice/info/exclude` (`git rev-parse --git-path`), a machine-local, uncommitted file (not used under R1 B). - LAB-OMARCHY: `git -C native/vice status --porcelain=v1 -uall` returns 163 entries (12:55): 8 tracked modifications (`vice/src/c64/c64cpusc.c`, `drive/drive-snapshot.c`, `drive/drivecpu.c`, `drive/drivecpu65c02.c`, `mainc64cpu.c`, `resid/filter8580new.h`, `resid/sid.h`, `sid/resid.cc`; 222 insertions, 8 deletions) and 155 untracked paths (autotools output: the `.in` files, `configure`, `compile`, `depcomp`, `missing`, `ylwrap`, copied `COPYING` and `INSTALL`, and hidden paths; the earlier figure 135 came from `git status --short` without `-uall`, which collapses untracked directories, and is corrected here; handoff v2 line 174 records 155). The Phase A classification found no untracked code file here. - PAYTON-LEGION2 (Phase 0 receipt `docs/receipts/native-vice/20261004T090000-0500-preexisting-delta/`, 2026-10-04): 12 tracked modifications in 20 hunks (the 8 files above plus `mainviccpu.c`, `vic20/vic20cpu.c`, `vic20/vic20sound.c`, `vic20/vic20sound.h`; 399 insertions, 10 deletions), 2,527 untracked entries (745 `.o`, 59 `.a`, 2 `.exe`, 1,432 `.Po` make dependency files, 106 `Makefile`, 107 `.in`, generated headers, `mon_lex.c`, `mon_parse.c`, `psiddrv.h`; `native-vice-untracked-paths.txt`) and one injected source file, `vice/src/vice-shim-runtime.h`, with `.vice-shim-configure-flags`. The receipt holds the full tracked patch (SHA256 `90604E39...`, reverse-apply validated against the dirty checkout on Oct 4), the preserved header (`5450FDA8...`) and the untracked inventory. The Oct 4 patch is a superset of today's Linux delta; whether LEGION2's tracked delta is still byte-identical to the Oct 4 patch is measured in step D0, not assumed, and an explained host difference is a listed disposition, not a failure (A01). - Build paths today: `native/Vice.Native.proj` runs `build-vice-shim.ps1` on Windows and declares `vice\vice\src\**` as inputs (writes `vice_x64.dll` under `native/`, patches and configures inside `native/vice`). It is invoked by `tests/ViceSharp.TestHarness/ViceSharp.TestHarness.csproj`: line 10 defines `ViceNativeProject` and line 72 calls `` (read 12:55). The Linux `build-vice-shim.sh` and `build-vice-shim-xvic.sh` build inside `native/vice`. The Nuke `Test` target excludes `Determinism`, `AiReview`, `ParityPending`, `ParityLegacy` and `Integration` (`build/Build.cs` line 112); no `BuildViceNative`, `GenerateNativeSnapshotFixtures` or `NativeSnapshotCompatibilityTest` target exists in `build/*.cs` and no `tools/ViceSharp.SnapshotFixtureGenerator` exists (grep 15:03; both are named by `PLAN-VSFLOCKSTEP-001` Slice 1 and created in D2 under this plan). `ViceSharp.slnx` lists `AiReview`, `Library`, `Heads` and `Library.IntegrationTests` and the TestHarness; none of the three native-safe projects (`ViceSharp.NativeClockProbe.Tests`, `ViceSharp.OracleContract.Tests`, `ViceSharp.VsfCompatibility.Tests`) is in the solution or the Nuke `Test` target. - Shim consumers (measured 12:58 and 13:47; round 2 F03): a token grep for `ViceNativeBridge`, `[ViceFact` and `[ViceTheory` yields 43 files (5 with a `Category` trait, 38 without), but that set is neither complete nor semantic: `SnapshotResumeSpikeTests.cs` (plain `[Fact]`, 14 `ViceNative` references) and `Vic20NativeLockstepTests.cs` (plain `[Fact]`, `ViceNative.CreateInstance`, `XvicOraclePrerequisites`) are outside it, while `XAudio2AudioMathTests.cs` and `XboxTestConventionTests.cs` match only in comments and sample strings. A semantic grep for `ViceNative.`, `ViceNativeXvic`, `ViceNativeBridge`, `IViceNative` and `XvicOraclePrerequisites` yields 56 candidate files; the real inventory is a per-method semantic enumeration made in D0 (R6). `ViceFactAttribute` and `ViceTheoryAttribute` set `Skip = ViceNative.AvailabilityMessage` when the library is absent; `src/ViceSharp.Core/ViceNative.cs` lines 36 to 44 resolve and load `vice_x64` (alternate `vice-shim`) and `vice_xvic` through one combined resolver, and lines 81 to 84 only return an availability string: no load or attempt is logged anywhere today (round 3b F03), so "zero loads" needs a detector that D2 adds. On LAB-OMARCHY no such library exists today, so those tests skip; on LEGION2 `native/vice_x64.dll` from the dirty build exists (Phase 0 receipt) and would still load after the builder is retired. - Known-red managed baseline (F06, round 3b F06): `docs/receipts/lockstep/20261019T202802-phase-e-step2-diagnostic-linux/` records 20 failures (4 in `CpuInterruptTests` and `Mos6510NmiTests`, 16 in `CpuVisiblePcTimingTests`), assigned to Phase E step 2; none of these classes carries a `Category`, so the current Nuke `Test` filter selects them and the full suite is red today for reasons outside Phase D. One more uncategorized plain `[Fact]` fails today outside that set: `tests/ViceSharp.TestHarness/Vic20/Vic20HalfCycleComparatorTests.cs` reflects a type `ViceSharp.TestHarness.HalfCycleState` and a static `LockstepValidator.CompareHalfCycleStates` that do not exist (focused run 15:04: 1 failed, `Assert.NotNull() Failure`), and its summary (line 7) cites `TR-CYCLE-001` AC4 for a bus-address mismatch, which the immutable plan's task 5 and `PLAN-VICEORACLE-001` name as the deferred incorrect annotation (round 3b F10). Resolved by R9 and R13. - Already in place from Phase C: `native/build-vice-observer.ps1` builds the stock VICE objects from the hash-verified copy of the materialization and relinks `x64sc-observer` and `xvic-observer` with external translation units only, through MSYS2 on Windows, with every generated file under `artifacts/immutable-vice//` (gitignored) and the materialization re-hashed unchanged; proven on both hosts (receipts `20261020T081800-phase-c-step3-s2b-observer-build-linux/`, LEGION2's `20261020T102600-phase-c-step3-s3-s4c-equivalence-windows/` with 100k, 1M and x64sc 4M equal to Linux). The observer binaries carry the per-cycle gate, the bus observations and the `VICE_OBS` records that Phase E consumes. Both `build-vice-observer.ps1` (line 26) and `tools/immutable-vice/Invoke-ObserverEquivalence.ps1` (line 20) declare `[CmdletBinding()]` without `SupportsShouldProcess` and create output directories on entry (F09; fixed in D1). The builder's Make stage (lines 220 to 231) extracts the stock link lines only from the current make stdout and throws when none is captured, so a rerun on an up-to-date tree fails even though the stages are advertised as idempotent (A06; fixed in D1). - Pinned-source facts used by the classification and the designs below (read in the materialization copy, 12:59 to 15:05): `autostart.c` lines 884 to 888 and 1552 to 1575 load a `.vsf` given with `-autostart` through `machine_read_snapshot` after a reboot and a deferred trap (`interrupt_maincpu_trigger_trap(load_snapshot_trap)` at line 1273; initial autostart delay at lines 1528 to 1537); `machine.h` line 145 declares `machine_write_snapshot` and line 148 `machine_read_snapshot`, both public, the latter called across objects from `autostart.c` line 887; `c64-snapshot.c` lines 121 to 137 read the modules in the order `MAINCPU`, C64, CIA1, CIA2, SID, drives, fsdrive, VIC-II, glue, event, memhacks, tapeport, keyboard, joyports, userport, and lines 146 to 153 reset the machine when any later module fails, so a failure after a successful `MAINCPU` read is a distinct observable case; `interrupt.h` line 305 declares `interrupt_maincpu_trigger_trap(trap_func, data)`; both CPU units include `6510dtvcore.c` (`mainc64cpu.c` line 809, `mainviccpu.c` line 636), whose `DO_INTERRUPT` macro (lines 354 to 412) services a pending NMI or IRQ (lines 359 to 407, a seven-cycle sequence) before it runs an armed trap (lines 408 to 411: `EXPORT_REGISTERS()`, then `interrupt_do_trap`), and the main loop copies `global_pending_int` into a local (line 1758) before calling `DO_INTERRUPT` (line 1763), so a trap armed at cycle T is dispatched at the first instruction boundary after T whose pending-mask copy already contains it: if T falls while an interrupt sequence is being dispatched from an earlier copy of the mask, the trap runs at the following boundary, after that handler's first opcode fetch (round 6 N22); the write clock is therefore always the measured callback clock, never derivable from T; that trap is the public seam this plan uses to obtain a complete exported register file; other export sites exist inside the core (among them DMA handling at line 451 and BRK at line 1012), the plan makes no exclusivity claim about them, and this plan's checkpoint is the trap boundary at the actual write clock (round 5, round 7 and round 8 N19 and N27); `mainc64cpu.c` line 513 defines the global `mos6510_regs_t maincpu_regs`, `maincpu_snapshot_read_module` (line 934; `mainviccpu.c` line 756, setting `maincpu_regs` at line 791) writes the loaded register file into it and is called across objects from `c64-snapshot.c` line 121 and `vic20-snapshot.c` line 129; `mos6510.h` lines 116 to 136 store N and Z apart from the raw `p` byte and recompose the architectural status through `MOS6510_REGS_GET_STATUS` (`p | (n & 0x80) | P_UNUSED | (z ? 0 : P_ZERO)`); `mainc64cpu.c` lines 359 to 362 (`mem_read_check_ba`) can steal cycles on the first read after a load; `monitor.c` lines 2237 to 2248 execute a `-moncommands` file at launch (`init_break_mode = ON_RESET`), `mon_parse.y` line 265 (`dump ""`, `mon_lex.l` line 183) writes a snapshot through `mon_write_snapshot`, and `mon_lex.l` line 221 (`resourceget`) prints a resource value; `initcmdline.c` lines 279 to 286 make `-limitcycles` an absolute `maincpu_clk` limit; `drive-snapshot.c` lines 139 to 162 create a `DRIVE` module for every unit and write `has_tde` and `has_drives` as payload bytes 0 and 1, then the TDE fields only when TDE is on; the reader (lines 315 to 319, 368 to 419, 433, 540 to 550) leaves `rotation_table_ptr` and the three clock arrays uninitialized, fills them only inside the `has_tde` block, passes the whole `rotation_table_ptr` array to `rotation_table_set` (line 433; `rotation.c` line 194 reads every entry into `speed_zone`, which line 203 overwrites from the drive's saved value before any use) and copies the clocks into every unit whose type is not `DRIVE_TYPE_NONE` (unit 8 defaults to 1541, `drive-resources.c` line 168); a missing module takes the `has_tde = 0` path (lines 333 to 339); `drive-resources.c` `set_drive_type` detaches images and changes unit and bus state, and `iecbus.c` lines 493 to 547 route the bus by resource state (round 3b N05). - Approved fixture fact (round 2 N01, reviewer byte inspection `vsf-fixture-inspection.json`, verified against the pinned reader above): `tests/ViceSharp.TestHarness/Fixtures/Vsf/ready-c64sc-truedrive.vsf` (SHA256 `5C284F5C...`) carries `MAINCPU` 1.2 (clock 109163946, PC 22377, P `$A0`) and `DRIVE8` 2.0 with `has_tde = 0`, `has_drives = 1`, while `DRIVE9` to `DRIVE11` have `has_tde = 1`. Resuming it in the unmodified reader with unit 8 at its default type copies three uninitialized clocks into unit 8 (hunk H5's path; R10 A) and performs one dead read of `rotation_table_ptr[0]` (R14 A). ## 2. Classification of the tracked modifications and the injected header (step 3, decided here, per hunk) All 20 hunks of the Oct 4 patch (12 files; today's Linux delta is the 8-file subset), listed by patch line of each `@@` header (read 13:47). Each row names the behavior, whether any oracle use in Phases D to G needs it, how that need is served without the patch, and the disposition. "Reject" means reverted from the oracle source in D4 after preservation. 1. H1 `c64/c64cpusc.c` hunks at patch lines 5 (`@@ -32`, include of `vice-shim-runtime.h`) and 16 (`@@ -44`, hosted `CLK_INC` exporting registers, `vice_shim_cycle_checkpoint`, re-import): per-cycle pause/stop control and register observation. Served by the clock gate (`--wrap=vicii_cycle`) and the bus observer; registers are interpreter locals and are not observable by wrapping (Phase E compares the observer field set instead, handoff item 1). Reject. 2. H2 `mainc64cpu.c` hunks at lines 104 (`@@ -56`, include) and 115 (`@@ -196`, checkpoint inside the stolen-cycle loop): control. Served by `__wrap_vicii_steal_cycles` (S4a, 108,213 stolen cycles observed at 4M on both hosts). Reject. 3. H3 `mainc64cpu.c` hunk at line 140 (`@@ -752`, bootstrap from a host register file, `vice_shim_take_bootstrap_maincpu`, else power-on reset): resume from host state. Served by VSF resume through the pinned binaries (R8). Reject. 4. H4 `mainc64cpu.c` hunk at line 178 (`@@ -951`, version-guarded read of `ane_log_level`, `lxa_log_level` and `maincpu_jammed` in `maincpu_snapshot_read_module`): legacy `MAINCPU` v1.2 and v1.3 compatibility inside the reader. Served by the external adapter `X64ScSnapshotCompatibility.cs` (`TR-VSFLOCKSTEP-RESUME-001` AC1, 199 green byte cases) that inserts the fields before `maincpu_ba_low_flags` so the unmodified v1.4 reader accepts them; the adapter's own remark (lines 28 to 30) says the byte contract does not establish native resume, which D5 supplies (R8, R10). Reject. 5. H5 `drive/drive-snapshot.c` hunk at line 53 (`@@ -314`, zero-initialization of `attach_clk`, `detach_clk`, `attach_detach_clk`): a reader-side behavior correction for a unit whose `DRIVE` module has `has_tde = 0` (or is missing) while the unit's configured type is not NONE, where the fields are copied from uninitialized stack. Not normalization, not covered by the adapter, and reachable by the approved fixture `ready-c64sc-truedrive.vsf` (section 1). The hunk never touched the sibling dead read of `rotation_table_ptr` (R14). Disposition: reject from the oracle (R7 A) with the external launch precondition of R10 A, enforced by the adapter and proven in D5 before any affected native load; D0 scans every fixture's `DRIVE` module payload bytes and reports each affected unit. 6. H6 `drive/drivecpu.c` hunk at line 74 (`@@ -188`) and `drive/drivecpu65c02.c` hunk at line 89 (`@@ -170`): `cycle_accum = 0` in `*_reset_clk`, a behavior correction on a drive reset that is not followed by a snapshot restore. Oracle need: every Phase D to G workload starts at process launch (the observed reset is the first thing the trace shows) or resumes from a `.vsf` (which rewrites `cycle_accum`); no workload issues a mid-run drive reset. Reject; recorded as an unserved behavior, with the constraint that no oracle workload may include a non-snapshot drive reset until a requirement covers it. R7 A. 7. H7 `mainviccpu.c` hunk at line 219 (`@@ -47`, include) and `vic20/vic20cpu.c` hunks at lines 424 (`@@ -31`, include) and 435 (`@@ -40`, hosted `CLK_INC`): as H1 and H2 for the VIC-20, served by `--wrap=vic_cycle`. Reject. 8. H8 `resid/filter8580new.h` hunk at line 270 (`@@ -551`, `vsharp_probe`), `resid/sid.h` hunk at line 291 (`@@ -61`, `vsharp_filter_probe`) and `sid/resid.cc` hunk at line 306 (`@@ -449`, `resid_shim_clock_exact`, `resid_shim_read`, `resid_shim_write`, `resid_shim_output`): observation of filter internals and a single-cycle SID clocking API for the hosted shim (`native/patches/s9-filter-probe.patch`). Oracle need: only the SID parity suites, which are shim consumers (R6) and are rebound or replaced in Phase E; whether an external SID probe is wanted is a separate requirement, planned then. Reject; the patch file stays as evidence, never applied. 9. H9 `vic20/vic20sound.c` hunks at lines 466 (`@@ -306`) and 487 (`@@ -338`): guard and clamp of the `voltagefunction` index in both sample renderers (division by `accum_cycles` of zero, index out of bounds), a behavior correction. Oracle need: VIC-20 audio belongs to Phase F item 6 ("Audio, device side effects, reset, snapshot, determinism, host pacing", handoff v1 line 140), and the existing `Vic20SoundLockstep` native audio cases are shim consumers (R6). Reject; Phase F item 6 owns the VIC-20 sound oracle and must account for this pinned behavior (if a Phase F workload reaches the zero divisor or the out-of-range index in the pinned xvic, that is a named Phase F blocker, not a reason to keep the patch). R7 A. 10. H10 `vic20/vic20sound.c` hunk at line 508 (`@@ -578`, `vic_sound_oracle_reset`, `_store`, `_render`) and `vic20sound.h` hunk at line 590 (`@@ -36`, their declarations): observation API for the hosted shim. Reject (as H8). 11. H11 injected `vice/src/vice-shim-runtime.h` and `.vice-shim-configure-flags` (LEGION2 only): injected source and configuration for the shim. Preserved in the Phase 0 receipt; retained untracked, not deleted (R4), listed in the D0 inventory. 12. H12 `mainviccpu.c` hunk at line 230 (`@@ -579`, bootstrap from a host register file for xvic, else `machine_trigger_reset`): the VIC-20 counterpart of H3. Served by VSF resume through the pinned xvic binary (R8; the xvic fixture generation is a Slice 1 obligation in section 4, D5). Reject. Hunk accounting: 2 + 2 + 1 + 1 + 1 + 2 + 3 + 3 + 2 + 2 + 1 = 20 (H1, H2, H3, H4, H5, H6, H7, H8, H9, H10 with H12 counted in its file), checked against the `@@` list of the patch; the D0 hunk map (A01) re-derives this list from the live patch on each host. Consequence (inference, stated as such): no hunk needs to migrate into managed ViceSharp code for Phase D to exit; H5, H6 and H9 are the three behavior corrections, each rejected with a stated external disposition or ownership; H5 is the only one reachable by an approved input, which R10 and R14 settle before any native load. If D0 finds a hunk that is required and uncovered, it is a named blocker before D4 and a question to Payton (A01). ## 3. Decisions for Payton Answered 2026-10-20T10:57 (verbatim option labels): - R1: "B: .gitmodules ignore = untracked only". Consequence: `.gitmodules` changes `ignore = dirty` to `ignore = untracked`; the superproject's status shows the submodule clean once the tracked delta is reverted while untracked build products remain inside it; no exclude file and no exclude script are written. The immutable Phase 3 exit criterion "`status --porcelain=v1 -uall` returns no entries" is amended (section 4, D4 and Exit): the tracked diff is empty, and the submodule's untracked entries are exactly the classified inventory recorded in the D0 receipt, none new, none deleted, none changed in content (F08). I had flagged that B leaves the submodule's own status dirty; Payton chose it anyway, so it stands as his decision. - R2 and R3: "A: retire it now". `native/build-vice-shim.ps1`, `build-vice-shim.sh`, `build-vice-shim-xvic.sh`, `Vice.Native.proj` and the harness call to it are removed in D2; history and the Phase 0 receipt keep them; `native/build-vice-observer.ps1` is the only native builder. - R4: "Yes, exclude and keep". Nothing under `native/vice` is deleted on either machine; the inventory is recorded in D0. The retained `native/vice_x64.dll` on LEGION2 is likewise kept and never loaded by a gate (R6). - R5: "Yes, add in D2". Answered 2026-10-20T13:03 (verbatim option labels): R6 "A: ShimLegacy category (Recommended)", R7 "A: reject all three (Recommended)", R8 "A: observer -autostart .vsf (Recommended)", R9 "A: known-red set of 20 (Recommended)". - R6 Shim consumers and the gate denominator (F03, tightened in revisions 3 and 4): in D2 every test method that uses the shim, found by a semantic per-method enumeration (direct use of `ViceNative`, `ViceNativeXvic`, `ViceNativeBridge`, `IViceNative` instances backed by the native library, `XvicOraclePrerequisites`, `ViceNative.CreateInstance`, the `ViceFact` and `ViceTheory` attributes, and any fixture, helper or data provider that transitively uses them; comments and string literals excluded; a managed fake implementing `IViceNative` with no native load is not a consumer), receives `Trait("Category", "ShimLegacy")`; the Nuke `Test` filter adds `Category!=ShimLegacy`; the D2 receipt lists every tagged method by file and method with the Phase E or F item that rebinds or replaces it. The gate denominator is the Nuke `Test` selection with zero skipped, proven by the per-project TRX and by the D2 load detector (section 4, D2) showing zero attempts to resolve or load `vice_x64`, `vice-shim` or `vice_xvic`. Negative controls (N06): a plain-`[Fact]` method using `ViceNative` directly (modeled on `SnapshotResumeSpikeTests`), a test whose only path to the shim is test to helper to provider, a managed fake `IViceNative` case that must not be tagged, and a string-only mention that must not be tagged (modeled on `XboxTestConventionTests`). The exclusion is explicit and bounded, not silent. - R7 Dispositions of H5, H6 and H9: reject all three from the oracle with the dispositions in section 2; H5's native-load preconditions are R10 and R14. - R8 VSF Slice 1 without the DLL ABI: the pinned binaries supply both directions (resume with `-autostart .vsf`; write at a pinned cycle through the public trap API and `machine_write_snapshot`, R12); the obligation map is in section 4, D5. - R9 Phase D known-red set: the Phase D full-suite gate is the Nuke `Test` selection in which the only failures are exactly the 20 tests named by fully qualified name in receipt `20261019T202802`; execution evidence per A05; the comparator fixture outside that set is made green in D2 (R13 B), not added to the set. Answered 2026-10-20T14:06 (verbatim option labels): R10 "A: adapter launch precondition (Recommended)"; R11 "B: require a native register observer". R11 B was offered as not feasible for per-cycle registers; Payton chose it, and it stands as his decision. It is feasible at the resume boundary without any VICE edit (section 1 facts: the global `maincpu_regs` written by `maincpu_snapshot_read_module`, called across objects), and the plan is written to that; per-cycle register observation stays impossible by wrapping (the interpreter locals reach the global copy only at the core's own export points, which an external unit cannot request per cycle; the trap is the one public seam this plan uses, at the actual write clock) and remains a Phase E question, not a Phase D obligation. - R10 Native load of a fixture whose `DRIVE` module has `has_tde = 0` or is missing while the unit type is not NONE (N01; `ready-c64sc-truedrive.vsf` unit 8). A (chosen): the adapter, which already validates the module chain, computes a launch precondition for every such unit (`-drivetype 0`, so the pinned reader's copy at lines 540 to 550 is skipped for that unit and no uninitialized clock is read), the native resume test passes exactly the computed flags last on the command line, and the adapter fails closed when a caller attempts a native load without them; the fixture stays approved and unchanged, the hunk stays rejected, VICE is untouched. B: regenerate the legacy fixtures with TDE on for every unit (replaces an approved AC1 input). C: reject such fixtures outright and amend AC1. N05 adds: the adapter rejects a truncated or invalid `has_tde` or `has_drives` payload before launch; the D5 receipt records the effective drive resources after the load (section 4, D5) and the resumed workload's continuation, on both hosts. - R11 The deferred "real snapshot MAINCPU clock and register cross-check" (`PLAN-OBSERVER-001` S5; F05). B (chosen): a native register observer. Implementation (section 4, D1 and D5): `tools/immutable-vice/snapshot-observer.c` wraps `maincpu_snapshot_read_module`, calls the real function exactly once, and on success emits `VICE_SNAP,resume,,,,,,,

` from `maincpu_clk` and `maincpu_regs`, with `

` recomposed through `MOS6510_REGS_GET_STATUS` so N, Z and the unused bit are architectural (N04; the fixture's `$A0` is the first case); on failure it emits `VICE_SNAP,resume-fail,` and no resume record. The same unit wraps `machine_read_snapshot` and emits `VICE_SNAP,load,` after the real call, so a failure in a module read after `MAINCPU` (which VICE follows with a reset) is observable as `resume` then `load,-1`, distinct from a `MAINCPU` failure (N02). Records go to stderr through the same sink as the bus observer (write and flush checked, stop 72 on failure). Answered 2026-10-20T15:30 through the session question (verbatim option labels): R12 "B: exact cycle N required"; R13 "B: implement HalfCycleState in Phase D"; R14 "A: accept as benign dead read (Recommended)". - R12 Fixed-cycle snapshot checkpoints for the xvic fixtures (`PLAN-VSFLOCKSTEP-001` line 241 and Slice 1: PAL and NTSC at 100,000 cycles; round 3b F05, round 4 F05). The public trap seam this plan uses runs at the instruction boundary whose copied pending mask includes the trap, with the complete register file exported by the core at that point; a request made inside an instruction is delayed to that boundary (or to the one after a handler's first opcode when the trigger lands inside an already-dispatched interrupt, section 1 facts, N22), and no external seam yields a snapshot with correct registers at an arbitrary cycle, so acceptance always uses the actual write clock (round 7 N19). Payton chose B, "exact cycle N required", at 15:30 and again at 16:29 when asked explicitly whether to approve a pinned boundary checkpoint instead ("B: literal 100,000 only"); it stands as his decision and is implemented literally: D1's `snapshot-checkpoint.c` arms, at the trigger clock given by `VICESHARP_SNAPSHOT_AT=:`, a trap through `interrupt_maincpu_trigger_trap` whose callback calls `machine_write_snapshot(path, 0, 0, 0)` and emits `VICE_SNAP,checkpoint,,`; the generator arms at trigger 100,000 for each xvic fixture (PAL and NTSC, `-seed 1`, pinned ROMs) on both hosts and records the trigger and the write clock; the obligation is met only if the write clock equals 100,000 on both hosts, in which case the fixture is accepted and the manifest pins trigger and write clock both at 100,000. If the write clock is not 100,000 on either host, the xvic fixture generation is the named blocker `BLOCKER-R12-XVIC-CHECKPOINT`, reported to Payton with the measured trigger and write clocks of both hosts and the interrupt or stolen-cycle context around them, never approximated: the generator writes no fixture, the obligations that need the xvic fixtures (section 4, D5: xvic fixture provisioning and hashes, regeneration determinism, the xvic manifest fixture entries, the xvic resume and round-trip cases, and the cumulative target's xvic half) are reported BLOCKED by case identifier, every independent Phase D obligation is executed and reported in its own denominator, and Phase D ends in the explicit BLOCKED exit defined in section 4 (nonpassing: the cumulative target and full Slice 1 acceptance stay pending, Phase E may not start, no done-state is claimed, and no blocked case is ever converted to pass or skip) until Payton lifts the blocker (by approving a boundary checkpoint, by allowing a VICE change, or otherwise). D1 mock controls and D5 real classification controls cover a one-host mismatch and a both-host mismatch (each must yield BLOCKED, never pass or skip) and the matching case (round 5 N14). Trigger and write clocks are always distinguished; nothing re-arms at a measured write clock. - R13 `Vic20HalfCycleComparatorTests` (round 3b F06, F10). B (chosen): D2 implements, mocks first per the immutable plan's task 5 `Vic20HalfCycleComparatorContractTests`, the `ViceSharp.TestHarness.HalfCycleState` record with the Phase 4 field set the fixture sets (`HalfCycle`, `A`, `X`, `Y`, `S`, `P`, `PC`, `Opcode`, `MicroOpPhase`, `HasBusEvent`, `BusAddress`, `BusData`, `BusAccess` enum with `Read`, `IsDummy`, `IrqStage`, `NmiStage`, `BaState`) and the static `LockstepValidator.CompareHalfCycleStates(managed, native)` returning null for equal states or a mismatch object with `HalfCycle`, `Field`, `Managed`, `Native` (hex `$1000` and `$1001` formatting) and a `Message` containing "half-cycle 37", comparing every field in the fixed order and reporting the first difference; the fixture's assertions are preserved untouched and must pass; the summary at line 7 is corrected in the same commit to its real mapping (`FR-SNP-005` AC3, `TEST-SNP-002` AC4) without the `TR-CYCLE-001` AC4 claim (F10). The managed comparison against real observer traces (Phase E item 1) is not pulled in; only the state record and comparator the fixture names are. The R9 set stays exactly 20. - R15 (asked 2026-10-20T17:20 after round 5 N12; answered 17:23, verbatim: "change to v1.2 and v1.4"): `TR-VSFLOCKSTEP-RESUME-001` AC1's real-resume inputs become external v1.2 and v1.4 instead of v1.2 and v1.3, because no real v1.3 snapshot exists and the pinned VICE writes v1.4. This is an explicit semantic amendment of a requirement, applied in D1 through the requirements wrapper (never by editing storage) and read back into the D1 receipt; `PLAN-VSFLOCKSTEP-001` Slice 1's real-resume wording changes to match while its synthetic 1.2, 1.3 and 1.4 matrix (line 340) stays as it is; the adapter's v1.3 byte-level normalization and its synthetic cases stay as they are. - R16 (asked 2026-10-20T22:58 after the D2 gate measurement, receipt `docs/receipts/native-vice/20261020T220000-phase-d-d2-linux/`; answered 22:58, verbatim option label "C: run D3 to D5 now, rule on the gate at the exit"): the measured ordinary gate (24 failures outside the R9 set, 21 of them reproduced at `af62785c` before D2 and 3 host-load pacing diagnostics; 18 cases skipped by their own opt-in, host-only or media conditions) is reported as measured; D3, D4 and D5 proceed; the denominator ruling is taken at the Phase D exit with all evidence in hand. No selector and no known-red list changes until then. - R16 exit ruling (Payton, 2026-11-23, "Yes, I approve"): replace the shared October discovery list with reviewed Linux and Windows baselines. Select tests by platform, keep explicit diagnostics out of the ordinary run, and run the host integration cases in their platform lane. Compare every selected case identifier, retaining repeated display names. Every selected case must execute and the 20 R9 failures remain the expected set. The 150% live-audio pacing assertion remains in the ordinary gate. For an A05 evaluation, pass `native/phase-d/ordinary-linux-identifiers.txt` or `native/phase-d/ordinary-windows-identifiers.txt` to `native/Test-OrdinaryGate.ps1 -RetainedIdentifiersPath` according to the host that produced the TRX. The historical October list remains with its receipt. - R17 (asked 2026-10-21T07:56 at the Phase D exit on LAB-OMARCHY, receipt `docs/receipts/native-vice/20261021T075500-phase-d-exit-linux/`; answered 11:15, verbatim option label "C: move the trigger"): `BLOCKER-R12-XVIC-CHECKPOINT` is resolved by moving each xvic fixture's checkpoint trigger from the literal 100,000 to an instruction boundary measured per model on the pinned binaries (the trap of 6510core.c 482 to 486 runs at the next boundary; at trigger 100,000 both models wrote at 100,002). The acceptance rule is unchanged: the write clock and the written `MAINCPU` clock must equal the trigger on both hosts and the candidates must be byte-identical across two fresh-command runs per host. The measured trigger replaces the literal in the generator target, the manifest, the build tests and the receipts; D5 is reopened for this one item (D5b). - 2026-11-23 operator amendment: parity with the pinned VICE behavior governs comparison. For the PAL and NTSC VIC-20 reset cohorts at cycle 100,002, compare every snapshot byte except VIA1 v2.2 payload offsets 23 and 24 (ILA and ILB), and require both input latches disabled at the checkpoint. The pinned builds omit `MYVIA_NEED_LATCHING`, while the snapshot writer saves both fields. Require two real runs from each lab host, successful writes, matching clocks, valid original hashes and lengths, and exact agreement outside those two bytes. Keep all raw files and their SHA-256 values intact. Publish one unchanged candidate and pin its raw SHA-256 in the manifest. - 2026-11-23 resume validation: run the same native x64sc v1.4 round trip for the MOS6569 (C64) and MOS8565 (C64C) on both hosts. Select the saved VIC-II model for native resume before loading each snapshot, including the supplied v1.2 fixture, and keep the same clock, register, load and continuation checks. - R18 (same question set, verbatim option label "C: fix the 21 now inside Phase D"): the 21 failures outside the R9 set that reproduce at `af62785c` (receipt `20261020T220000-phase-d-d2-linux/gate/pre-d2-af62785c/`, listed again in `20261021T053000-phase-d-d5-linux/gate-2/gate-evaluation.json`) are repaired inside Phase D as a new slice D6 before the exit; the R9 set of 20 stays known-red; host-load pacing diagnostics and the 18 self-skipping opt-in cases are reported as measured and are not part of D6. D6 is test-first by construction (each failure is an existing failing test), one commit per repaired cluster, the full `Test` selection rerun under A05 at the end. - R19 (same question set, verbatim option label "A: release LEGION2 now"): Payton's hold of 2026-10-21T05:35 is lifted; LEG-VICE# runs D3 to D5 on LEGION2 (build, matrix, fixtures at the current and then the R17 trigger, cumulative target, A05 gate, F08 bracket) and reports both hosts' clocks and hashes for the exit receipt. - R14 The dead read of `rotation_table_ptr` for TDE-off units (round 3b N03). A (chosen): D1 documents the whole pinned reader path with the source lines in section 1 and records the disposition: the value read at `rotation.c` line 194 is overwritten at line 203 before any use, the patched oracle performed the same read (hunk H5 zeroed only the clocks), no external mitigation exists short of TDE-on fixtures, and no behavior depends on it; the D5 receipt keeps the two-host trace equality of the resumed workload as the executable evidence that the read has no observable effect. The original R1 to R5 questions, for the record: - R1 Ignore mechanism for the generated output under `native/vice` (D4: gitignored, not deleted). A: a committed pattern file `native/vice-build-output.exclude` applied to the submodule's local exclude by a PowerShell script. B: edit `.gitmodules` from `ignore = dirty` to `ignore = untracked` only. C: delete the generated files after classification (the immutable-plan Phase 3 wording), which D4 superseded. - R2 Retirement of the shim DLL path. A: retire it in step D2. B: keep the shim sources and scripts in the tree, inert, until Phase E has replaced every consumer. - R3 Linux shell launchers: removal under R2 A, or thin PowerShell launchers under R2 B. - R4 LEGION2's 2,527 untracked entries and the injected header: exclude and leave in place; deletion only on Payton's explicit clearance per the never-move-a-file rule. - R5 Solution and Nuke: add the three native-safe projects to `ViceSharp.slnx` and to the Nuke `Test` target now. ## 4. Steps (BDPv4, mocks first where behavior changes; no hostile validation of implementation gates inside the phase, D3) PowerShell scripts named below are built tests first with Pester 5.9.1 tests under `native/tests/` (run with `Invoke-Pester`; a mock git tree in a temporary directory is the fixture), pass PSScriptAnalyzer 1.25.0 with zero findings, and support `-WhatIf` through `SupportsShouldProcess`; the dry run of every state-changing script is recorded before its real run. New C translation units follow the double-and-driver pattern of `ViceSharp.NativeClockProbe.Tests` (a double of the wrapped VICE function, a driver, compiled fixtures, contract tests) before they are linked into the observer. - D-pre Precondition (Payton, 2026-10-20T10:53, verbatim: "Before beginning phase D implementation, ensure both omarchy and legion2 have latest desktop build installed via nuke."): done 2026-10-20 on both machines (1.3.111 from `2c8d6028`; receipts `20261020T105400-phase-d-pre-desktop-install-linux/` and LEGION2's). AC `EntryEvidence_BindsBothHostsAndExplicitRelease` (A02): the D0 receipt records, per host, the installed desktop commit and version, the Windows trace matrix (100k and 1M both hosts, x64sc 4M on LEGION2, receipt `20261020T102600-phase-c-step3-s3-s4c-equivalence-windows/`, all equal to Linux), this plan's HV AGREE receipt, and Payton's verbatim instruction releasing implementation; D0 does not run until all four are present. - D0 Measure and preserve, both machines, read only except for the receipt. Record the gitlink and checked-out SHA, `git -C native/vice diff` (full patch, SHA256), `git diff --cached` (must be empty), `status --porcelain=v1 -uall` with explicit counts (tracked modified, untracked ordinary, untracked hidden) and per-path classification (generated by pattern; injected by name), the SHA256 and length of every untracked path and every modified tracked file (F08 baseline), the presence and hash of any `vice_x64`, `vice-shim` or `vice_xvic` library on the host, the semantic per-method shim consumer inventory with its four controls (R6, N06), and a copy of every modified tracked file and every injected source file into `docs/receipts/native-vice/-phase-d-preservation-/` with SHA256, retained (never moved). AC `DeltaComparison_ClassifiesEveryCurrentHunk` (A01): the current patch is split into hunks by `@@` header, every hunk is mapped to a section 2 row or listed as an explained host difference (same file, different context lines) or flagged as unclassified; an unclassified or required-uncovered hunk blocks D4; negative controls prove that a missing hunk and a hunk from the wrong host are reported. Fixture scan (N01, N05): for every `.vsf` under `tests/` the `DRIVE8` to `DRIVE11` presence, payload bytes 0 and 1 and payload length are recorded, every unit with `has_tde = 0` or a missing module is listed with the R10 precondition it needs, and a truncated or invalid payload is reported as a blocker for native loads. Effective requirement mappings and TODO state for `FR-VICE-001`, `TR-VICE-ORACLE-001`, `TEST-VICE-001`, `TR-VSFLOCKSTEP-RESUME-001`, `TR-CYCLE-001` and `PLAN-VICEORACLE-001` tasks 4 and 5 are read through the MCP requirements and TODO wrappers and quoted in the receipt (U02). Script `native/Save-ViceSubmoduleDelta.ps1`: Pester contract tests for its manifest (counts, hashes, classification; wrong or missing entries rejected; `-WhatIf` writes nothing) before the real run. - D1 Builder and native observer additions (handoff step 1): `native/build-vice-observer.ps1` is the canonical builder (done in Phase C S2b on both hosts). Remaining: `SupportsShouldProcess` and `-WhatIf` on `build-vice-observer.ps1` and `Invoke-ObserverEquivalence.ps1` with Pester tests proving a dry run creates no directory and no file (F09); AC `BuilderRerun_OnUpToDateTree_ReusesVerifiedLinkEvidence` (A06): when make emits no link line because the tree is up to date, the Make stage reuses the retained `stock-link-lines.json` only after re-hashing the objects it names against the receipt, otherwise stops with a named prerequisite before replacing any prior evidence; mock-first (up-to-date stdout, interrupted stage resume), then the real `All` rerun on both hosts in D5; analyzer zero findings; `native/README-native-build.md` naming the builder. New translation units, tests first: `tools/immutable-vice/snapshot-observer.c` (R11 B; wraps `maincpu_snapshot_read_module` and `machine_read_snapshot`; contract tests per N04: architectural P reconstruction over N, Z and unused-bit combinations, wide clock and PC, the real reader called exactly once with its return value and state preserved, no resume record on failure, `load` record after the real call, stderr write or flush failure stops with code 72) and `tools/immutable-vice/snapshot-checkpoint.c` (R12; armed only by `VICESHARP_SNAPSHOT_AT`, inert otherwise; contract tests with a double of the trap API: the trap is registered exactly once when the gate clock reaches the trigger, the callback writes through `machine_write_snapshot` and emits `VICE_SNAP,checkpoint,,` with the clock observed inside the callback, a write failure is reported as `checkpoint-fail`, nothing re-arms, no behavior when the variable is unset; mock cases for a pending IRQ or NMI at the trigger, for a trigger that lands during an already-dispatched interrupt after the mask copy (the trap must run at the following boundary and the measured write clock must be reported, with the literal R12 check rejecting it; N22), and for a stolen-cycle run at the trigger prove that the write clock is reported as measured and never equated to the trigger; gate interaction controls (round 5 N15) with the clock-gate double prove that arming and writing emit exactly one gate record and consume exactly one permit per advanced cycle, that no cycle advances while a permit is withheld, that quit, EOF and error outcomes of the gate are unchanged with the writer armed, and that trigger and write clocks are reported independently under the pending-interrupt and stolen-cycle requests; the same cases run for real on both hosts in D5), both added to the Link stage's wrap list and both proven inert by the no-snapshot equivalence rerun (no `VICE_SNAP` line, gate sequence and screenshot identical to the S3 reference). Adapter additions in `ViceSharp.VsfCompatibility.Tests` first, then `ViceSharp.ViceCompatibility`: the R10 precondition computation, rejection of truncated or invalid `has_tde` and `has_drives` payloads (N05), the launch argument builder that places the precondition flags last and verifies the final argument list, and the R14 documentation. The N07 budget rule (reconciled with the low-clock case, round 6 N23): a native resume launch sets `-limitcycles` to the fixture's `MAINCPU` clock C plus the required post-load window W, except when C plus W falls inside the autostart prelude, in which case the limit is the measured prelude length plus W and the receipt states that reason; the gate acknowledges every cycle through prelude and resumed interval, the window is nonempty, and the terminal outcome is bounded and explicit: after `load,0` and exactly W compared cycles (2W half-cycles) the run must end by the limit or by a gate quit within the recorded overshoot allowance, with the permit count, any retained tail and the exit reason recorded; a producer waiting on an unsupplied permit, an early stop before W, or a window stretched to fit the evidence is rejected. Generator contract (round 6 N21, mock-first in D1, real in D5): the checkpoint callback necessarily writes the candidate snapshot before the generator can compare the write clock, so on a one-host or both-host mismatch, a malformed or missing checkpoint record, a write failure or an interrupted retry, the accepted fixture and the manifest stay unchanged, every candidate byte that exists is retained under a unique receipt path (never deleted, moved or published as a fixture), every nonzero result of the pinned writer is a failure, including the positive 1 that `vic20-snapshot.c` lines 99 to 102 return when the IEEE488 VIA module write fails (round 8 N28: no successful checkpoint record, no accepted fixture, no manifest update, nonzero generator outcome), and when no bytes remain (the pinned `c64-snapshot.c` lines 92 to 94 and `vic20-snapshot.c` lines 91 to 102 close and remove a newly created snapshot on a module write failure, and creation can fail before any byte exists) the receipt records absent, not created, or removed by the native writer together with the result code, the `checkpoint-fail` record and the process logs, never an invented hash (round 7 N25); the generator exits nonzero with the BLOCKED identifiers, and a stale prior artifact is never accepted as newly generated. The `PLAN-VSFLOCKSTEP-001` Slice 1 amendment commit (R8, R12, the obligation map of D5), the `PLAN-OBSERVER-001` S5 implementation note (R11 B), and the `TR-VSFLOCKSTEP-RESUME-001` AC2 reference change (`build-vice-shim.ps1` to `build-vice-observer.ps1`, semantics unchanged: clean out-of-tree materialization, external wrapper units only) through the requirements wrapper (F11). The VSF Slice 1 tests are written mocks first against the builder's receipts (link JSON, wrap symbols, materialization-unchanged) before any further builder change. Binding allocation (round 4 N08): every Slice 1 test family named in D5 (`NativeViceSnapshotPrerequisiteTests`, `ImmutableViceBuildTests`, `NativeViceSnapshotFixtureGeneratorTests`, `ViceSnapshotStateTransferManifestTests`, the resume and round-trip tests) is created in D1 in its mock-bound form (a fake provider or recorded receipt as input) under `ViceSharp.VsfCompatibility.Tests` with the trait `Category=VsfSlice1Contract`; the real-bound same-case tests (the same assertions over the real generator output, the real manifest file, the real observer streams) are added in D5 under the trait `Category=VsfSlice1Real` in the same classes, with their fully qualified names listed in the D5 receipt; no test of either kind skips, and no artifact is read from a host path that D5 has not produced in that run. - D2 Solution and build integration (handoff step 2; R2, R5, R6, R9, R13). Exact edits: `tests/ViceSharp.TestHarness/ViceSharp.TestHarness.csproj` loses the `ViceNativeProject` property (line 10) and the `BuildNative` call (line 72); `native/Vice.Native.proj` is deleted once a grep receipt shows no remaining reference; `native/build-vice-shim.ps1`, `native/build-vice-shim.sh`, `native/build-vice-shim-xvic.sh` are deleted; `ShimLegacy` traits on every method of the D0 semantic inventory (R6); `build/Build.cs` gets one shared selector for the ordinary gates, applied to both `Test` (line 112) and `CiTest` (line 140, which carries its own identical filter today; round 6 N20): the existing exclusions plus `Category!=ShimLegacy&Category!=VsfSlice1Real`, so contract cases stay selected while shim-bound and real-bound cases leave every ordinary gate; the cumulative target selects `Category=VsfSlice1Real` with stable identifiers, BLOCKED outcomes and a nonzero exit; selection projection controls run at D2 and again after the D5 registration of the real cases (the retained identifier lists per gate must show no leakage of `ShimLegacy` or `VsfSlice1Real` into an ordinary gate and no omission from the cumulative gate), with per-gate denominators retained; `ViceSharp.slnx` and the Nuke `Test` target add the three native-safe projects; new Nuke targets `GenerateNativeSnapshotFixtures` and `NativeSnapshotCompatibilityTest` (F05) wired to `tools/ViceSharp.SnapshotFixtureGenerator` (a .NET console tool that launches the observer binaries with `VICESHARP_SNAPSHOT_AT`, the pinned ROM allowlist and `-seed 1`, verifies the pinned checkpoint clock, and writes the manifest entries; it does not reference any DLL) and to the D5 obligation map; the load detector (F03, round 4 N11): `ViceNative.cs` and `ViceNativeXvic` append one line per resolve or load attempt (`,,`) to the file named by `VICESHARP_NATIVE_LOAD_LOG` when that variable is set, written from the resolver and the create paths of both classes (the combined resolver installed by `ViceNative`'s static initialization and `ViceNativeXvic`'s own availability and create path, lines 31 to 48 and 141 to 153), never from a per-cycle path; when the variable is unset no logging work and no allocation happens and native stepping behavior is unchanged, proven by a focused seam-level test (round 5 N17) that measures zero incremental allocations and zero log calls across warmed repeated step calls for both bindings with the audit state unset, keeps deterministic output unchanged, and fails when a deliberately allocating or logging double is substituted; an unwritable log file fails the attempt loudly rather than silently passing; because `ViceFactAttribute` and `ViceTheoryAttribute` query `ViceNative` during attribute construction (line 17 of each), the retained audit interval starts before test discovery (the Nuke target sets `VICESHARP_NATIVE_LOAD_LOG` in the environment of the `dotnet test` process it launches, never inside a test) and the log is never truncated after discovery (round 5 N16); built mocks first with fresh-process controls (xvic first, x64 first, alias and fallback probing, a failing load, an attribute-only consumer and a provider-only consumer in a process whose attempts must be observed or must cause an observable gate failure, and a pure managed fake that stays selected and logs nothing) proving that every attempt is observed, with positive controls kept in separate logs; the audit scope covers path resolution and availability probes (`FindLibraryPath`, `IsAvailable`, `AvailabilityMessage`) as well as `NativeLibrary.Load`, because the `ViceFact` and `ViceTheory` attributes reach `FindLibraryPath` during ordinary discovery even when no selected test uses the library (round 7 N24: the round 7 reviewer's comparator-only run recorded that path); the D2 mock and the D5 recheck prove that ordinary discovery with the legacy attributes and providers excluded resolves and loads none of the three library names, keeps the managed fake selected and completes its denominator, while the deliberate native-attempt controls log or fail separately; `HalfCycleState` and `CompareHalfCycleStates` (R13 B) with the fixture's summary corrected (F10); `PLAN-VSFLOCKSTEP-001` validation commands replaced. Gate: `dotnet build ViceSharp.slnx` green on both hosts with a build-log receipt showing no `BuildNative` or shim script invocation on either; Nuke `Test` with the three projects included under AC `GateExecution_IsCompleteAndOnlyKnownRedFails` (A05): the selected case identifiers and the terminal TRX of every project are retained, every selected case executed (zero skipped, aborted or not executed), the only nonzero results are exactly the R9 set by fully qualified name (`Vic20HalfCycleComparatorTests` now green), the selection at this boundary contains the `VsfSlice1Contract` tests and no `VsfSlice1Real` test (those exist only from D5; the receipt lists the selected test identifiers per project and category, N08), the load log retained from the gate run exists and is empty (a missing or unwritable log fails the gate, N11) while the positive control runs show their injected entries in separate logs, and the controls reject an equal-sized swapped set, a missing project, discovery drift against the retained identifier list and a partial or aborted run; an intentional R6 denominator change is reported separately; the submodule hash and length inventory equal to the D0 baseline (F08), with a negative control on a mock tree proving that a changed existing untracked file is detected. - D3 Classification receipt (handoff step 3): section 2, confirmed against the D0 hunk map, written into the preservation receipt with the file-and-hunk list, Payton's answers to R1 to R14, and the fixture scan result. - D4 Restore (handoff step 4), per machine, only after D0's receipt is committed, this plan is at HV AGREE, and Payton has released implementation: apply R1 B (`.gitmodules` `ignore = untracked`, one superproject commit), then run `native/Restore-ViceSubmoduleDelta.ps1` which, before the first overwrite, verifies the repository identity (superproject root, submodule git dir, recorded gitlink and checked-out SHA equal to the receipt, receipt host equal to the running host; any mismatch stops, A04) and, for each listed path, that the index is clean (`git diff --cached --exit-code`) and that the live file's hash equals the preserved copy's hash or that `git -C native/vice diff --exit-code -- ` already reports the path unchanged (git applies the host's line-ending conversion itself, so this is the actual checkout-byte comparison, A04); any other state stops without overwriting (F07). It restores with `git -C native/vice checkout -- ` listing each path (no `reset --hard`, no `clean`), then proves `git diff --exit-code` and `git diff --cached --exit-code` empty, `status --porcelain=v1 -uall` equal to the D0 classified inventory by path, hash and length (none new, none deleted, none changed), the superproject `git status` showing the submodule clean, and the gitlink equal to the checked-out SHA; the preserved copies are re-hashed against the receipt before and after. Resume rule: on interruption the script reports each path as restored, untouched or unexpected from verified bytes and resumes only the untouched paths. Pester tests on a mock tree before the real run: changed live delta, staged drift, partial completion, missing receipt, corrupt receipt, wrong repository, wrong host and changed gitlink each stop; the happy path and the resume path complete on both hosts, with a CRLF-converted mock on Windows. LAB-OMARCHY first (8 files), then LEGION2 (12 files; its injected header stays, listed in the inventory), each with its own receipt. AC `PostRestoreFailure_StopsWithPreservedEvidence` (A03): if D5 or any later gate fails, work stops before Phase E, every original and receipt is retained, each host's path state is reported, and the restored source stays pinned; no automatic reapply of the old patch and no untracked deletion without Payton's scoped authority; tested for failure after the first host and after both. - D5 Native-backed suites (handoff step 5, as amended by R2, R8, R10 to R14): the observer binaries are rebuilt from the clean materialization on both hosts (`build-vice-observer.ps1`, all six stages, dry run first, A06 rerun behavior, now with the two D1 wrappers), the S3 and S4c equivalence and trace validation rerun on both hosts (`Invoke-ObserverEquivalence.ps1`, 100k both machines, 1M both, 4M x64sc; no `VICE_SNAP` line in any run), the submodule inventory bracket re-proved (F08), the three native-safe projects green, and the VSF Slice 1 obligations executed under this map (each obligation of `PLAN-VSFLOCKSTEP-001` lines 230 to 243 and 325 to 350 and `TR-VSFLOCKSTEP-RESUME-001` AC1 named with its step, immutable command, test and retained evidence, both hosts; F05): - Libraries built from the pinned commit: the observer binaries from `build-vice-observer.ps1` (D1 and this step; `NativeViceSnapshotPrerequisiteTests.C64AndVic20Libraries_AreBuiltFromPinnedViceCommit` rebound to the link receipt and the binaries' hashes); `ImmutableViceBuildTests.BuildInputsOutputsAndGeneratedFiles_StayOutsideNativeVice` and `ImmutableViceBuildTests.PinnedSourceTree_IsIdenticalBeforeAndAfterBuild` bound to the builder's inventory and materialization-hash receipts. - MSYS2 toolchain: `NativeViceSnapshotPrerequisiteTests.Msys2Toolchain_HasEveryRequiredCommand` against the builder's Windows receipt (LEGION2) and a pass-through on Linux; the prerequisite negative matrix of Slice 1 (library, tool, fixture, commit, ROM hash, media hash, manifest field, output hash, clean materialization, legacy normalization each omitted or corrupted) proven on a fake provider first. - Fixture provisioning and hashes: `RequiredFixtures_ArePresentAndHashPinned` over the supplied x64sc fixture (`5C284F5C...`, 190,854 bytes) and the two xvic fixtures (PAL and NTSC at literal trigger and write clock 100,000 per R12, model, ROM and media hashes, generation command and checkpoint metadata recorded in the manifest); while `BLOCKER-R12-XVIC-CHECKPOINT` is open the xvic cases are reported as blocked by name in the receipt (not skipped, not passed) and the exit lists the blocker. - Native snapshot writing and deterministic regeneration (R12): `GenerateNativeSnapshotFixtures` launches `xvic-observer` with the pinned model, ROM allowlist, `-seed 1` and `VICESHARP_SNAPSHOT_AT=100000:` on both hosts, reads `VICE_SNAP,checkpoint,100000,`, and accepts a fixture only when the write clock is 100,000 on both hosts and the written `MAINCPU` clock equals it; otherwise it writes nothing and raises `BLOCKER-R12-XVIC-CHECKPOINT` with both hosts' measured clocks and context (R12). When accepted, the output is byte-compared across two fresh-command runs and across hosts (`NativeViceSnapshotFixtureGeneratorTests.Regeneration_IsByteDeterministic`), the mock cases cover a pending IRQ or NMI and a stolen-cycle run at the trigger, and the exact invocation is proven tests-first with a mock command runner before the real binaries. - Deterministic-module manifest: `docs/requirements/oracles/vice-vsf-state-transfer-manifest.json` with schema version 1 exactly as `PLAN-VSFLOCKSTEP-001` lines 230 to 243 define it (`viceCommit`, `fixtureGeneratorVersion`, `containerFraming` with the 19-byte magic, the two container-version bytes, the 16-byte machine field and the header sizes, `romAllowlist`, `fixtures` with hash, length, model, generation command, trigger and write clock, ROM and media hashes, and `machines` with, per module, machine, name, version, restore order, state categories, native export and import functions, managed record, managed adapter, mandatory or optional classification and source anchors). `ViceSnapshotStateTransferManifestTests` keeps a per-line Slice 1 ledger (round 4 N12): one test per required schema-1 field and per edge (source function, managed field, adapter, test identifier) with independent omission and duplicate controls, fixture hash, length and order checks, ROM and media hash checks, restore-order check against the pinned readers' module order, and blank or duplicate entries rejected; `Manifest_CoversEveryDeterministicModule` checks the module names and versions read from the pinned writers and from every accepted fixture. - Legacy adapter byte cases: the 199 existing `NativeViceSnapshotLegacyMainCpuCompatibilityTests` (done, unchanged), plus the R10 precondition and N05 payload cases from D1. - Real v1.2 resume and v1.4 round trip (AC1 as amended by Payton 2026-10-20T17:23, R15: "change to v1.2 and v1.4"): the v1.2 input is the supplied `ready-c64sc-truedrive.vsf` (pinned path, hash and provenance) and the v1.4 input is the round-trip fixture written by the pinned VICE in this step; no real v1.3 resume is claimed, because no real v1.3 snapshot exists in the repository and the pinned VICE writes v1.4 (round 5 N12); the v1.3 layout stays covered at the byte level by the adapter's existing synthetic cases, labeled synthetic. The AC1 amendment (external real inputs v1.2 and v1.4 instead of v1.2 and v1.3) is applied in D1 through the requirements wrapper and read back before any acceptance claim; the D1 readback must show the external real inputs as 1.2 and 1.4, the synthetic 1.2, 1.3 and 1.4 byte-case matrix of `PLAN-VSFLOCKSTEP-001` line 340 unchanged (that line is the synthetic matrix, which R15 does not touch), AC2's semantics unchanged, and the requirement, plan and projection blocker lists reconciled (round 7 N26). The adapter normalizes the legacy fixture to a temporary `.vsf` (that is how normalized bytes reach the unmodified reader), computes the R10 launch precondition, and the test launches `x64sc-observer -autostart .vsf -limitcycles +logcolorize -seed 1` with the `VICE_OBS`, `VICE_GATE` and `VICE_SNAP` streams captured; the v1.4 round trip writes a fixture through `VICESHARP_SNAPSHOT_AT` at a trigger whose write clock is recorded (for x64sc the round trip needs no pinned literal; trigger and write clock are both recorded in the receipt), resumes it the same way, and compares the observed post-resume sequence with the sequence observed after the checkpoint in the writing run over the whole required interval. Window alignment (round 4 N10): each origin's window starts at its own marker (`VICE_SNAP,checkpoint` in the writing run, `VICE_SNAP,load,0` in the resumed run) and runs for the required interval from its first half-cycle; raw process-relative half-cycle indices are preserved in the receipt and compared relative to the marker, never shifted or trimmed; the derived AEC of a BA-low or stolen first access in the resumed run is computed from that run's own observed BA history and must equal the writing run's value at the same offset; rejected cases: a shifted window, a discarded warm-up prefix, stale observational history carried across the marker, and unequal or reused prelude clocks presented as aligned. Budget and window (round 4 N13, round 5 N18): the receipt records, per fixture and host, the prelude limit evidence (the autostart delay of three seconds in `c64.c` line 1070 and `vic20.c` line 951 and the deferred load), the exact positive continuation interval stated in CPU clock cycles with its half-cycle count (two `VICE_OBS` records per clock cycle, so a window of W cycles is 2W half-cycles; the window is always specified in whole cycles, an odd half-cycle request is rejected), the `-limitcycles` value derived as the fixture's `MAINCPU` clock plus W (an absolute `maincpu_clk` limit, overflow rejected), the expected gate permit count for prelude plus window, and the final observation window; positive cases include a low-clock fixture (a round-trip fixture written early in the reset workload, whose C plus W would fall inside the three-second prelude: under the D1 budget rule the limit is the prelude length plus W with the reason stated, the test must observe `load,0`, then exactly W compared cycles, then the bounded terminal outcome, N23) and a restored clock above the launch budget (the legacy fixture at 109,163,946); negative controls: one-instruction overshoot at the end of the window (the extra tail is retained as evidence outside the compared window, never silently dropped, with the termination reason recorded), a budget reached inside the prelude (rejected before acceptance with its reason), budget overflow, and a truncated baseline; every required sample in the window is checked and the comparison interval never changes to fit the evidence. AC `SnapshotResume_ObserverClockAndPcMatchVsfMainCpu` (N02, N07): the record ordering is authoritative, not a clock heuristic: `VICE_SNAP,resume` carries clk, A, X, Y, SP, PC and P equal to the normalized fixture's `MAINCPU` bytes; `VICE_SNAP,load,0` follows it before the next gate line; the first gate line after `load,0` carries the fixture's clock plus one; between that line and the first CPU access only idle or stolen half-cycles may appear (the pinned `mem_read_check_ba` may steal cycles first); the first CPU access is a `read` or `dummy` at the fixture's PC (an opcode fetch, or the first cycle of a pending interrupt sequence, which also reads at PC); the gate then continues for the whole required interval. Preconditions stated in D1: normalized fixture, R10 flags, N05-valid payloads, budget per N07. Rejected cases, each with an independent mock before the same real observer cases: no `resume` record; `resume` with any register or clock mismatch; `resume-fail`; `resume` followed by `load,-1` and the reset signature (failure after `MAINCPU`); `load,0` followed by an unrelated reset signature; a first CPU access not at PC; a post-load gate clock that does not equal the fixture clock plus one; a prelude-only exit (budget reached before the load); early termination, missing, extra or reordered half-cycles, or a truncated baseline in the round trip; and a missing R10 precondition. Two matching fields are never reported as a complete resume; the AC1 claim rests on `load,0` plus the whole post-resume sequence comparison of the round trip. The receipt records the effective drive resources and media after the load (`VICE_SNAP,drives,` emitted by the snapshot observer through `resources_get_int` and `file_system_get_disk_name`, so an image detached by the R10 precondition is visible as an explicit no-media context, N05, N12) and the resumed workload's continuation on both hosts. - Cumulative target: `.\build.ps1 NativeSnapshotCompatibilityTest --configuration Release --native-snapshot-through-slice 1` runs the above on both hosts (the target is created in D2). - Missing native binaries or fixtures fail instead of skip (Slice 1's last item): the `ViceFact` skip is not used by any of these tests; absence is an assertion failure. The `VsfSlice1Real` tests run only inside the cumulative target, which has its own denominator separate from the Nuke `Test` selection of A05; when `BLOCKER-R12-XVIC-CHECKPOINT` is open, the cumulative target reports each xvic-dependent case identifier as BLOCKED with the blocker name and the measured clocks (a third outcome beside pass and fail, never a skip and never a pass), reports every independent case normally, and exits nonzero, so the blocked state is observable in the receipt and cannot be mistaken for acceptance (N14). Also in D5: `REAL-C64-PHI2-AEC-001` as a trace-level test in `ViceSharp.OracleContract.Tests` over the retained S4c `VICE_OBS` traces asserting that every CPU `read`, `write` and `dummy` access occurs on PHI2 with AEC high under the approved A2 derivation, with a negative control trace; this is supporting reference evidence from the oracle side, while `TR-CYCLE-001` AC4 itself concerns the managed core, and both its managed acceptance and `PLAN-VICEORACLE-001` task 5 stay pending until Phase E supplies the managed comparison and the immutable plan's final gate (F10). The XML documentation of `tests/ViceSharp.TestHarness/LockstepValidator.cs` is corrected to describe what the class does today (an `IViceNative`, register and CIA based validator bound to the retired shim, `ShimLegacy` until Phase E item 1 replaces it with the observer-field, half-cycle comparator, of which `CompareHalfCycleStates` from D2 is the state-level piece) and must not describe the future comparator as implemented; because `XmlDocsConventionTests` scans only attributed test methods, the correction is verified by a new test in the TestHarness that reads the class summary and asserts the current-behavior wording, and by the receipt quoting the corrected text. The full Nuke `Test` selection runs under A05 with the R9 set only and the empty load log. The legacy shim-bound suites are not run (they have no binary and are `ShimLegacy`); their methods are listed in the receipt with the Phase E item that rebinds each. Exit (immutable Phase 3 gate, as amended by R1 B, R6, R8 to R14): gitlink and checked-out SHAs equal; `diff --exit-code` and `diff --cached --exit-code` empty on both machines; `status --porcelain=v1 -uall` lists exactly the D0 classified inventory on each machine by path, hash and length (R1 B, R4, F08) and the superproject status shows the submodule clean; no generated output, injected source or wrapper input under `native/vice` participates in the oracle build (the builder reads only the materialization copy); `TEST-VICE-001` AC1 and AC2 clean-target preflight pass; `REAL-C64-PHI2-AEC-001` passes on real traces (reference evidence; managed `TR-CYCLE-001` AC4 and task 5 pending Phase E); comparator XML docs corrected and verified; `Vic20HalfCycleComparatorTests` green (R13 B); every VSF Slice 1 obligation in the D5 map green on both hosts, including the AC1 real resume and round trip under R10 and the S5 register cross-check under R11 B and the pinned checkpoints under R12; Nuke `Test` with the three native-safe projects included under A05, failures exactly the R9 set, load log empty; receipts with self-assessment on both hosts; `PLAN-VICEORACLE-001` tasks 4 and 5 left pending through the TODO wrapper with the executed evidence attached to each (task 4's done-state is set at step 12 after the required AGREE, task 5's after Phase E, so no done-state is claimed inside Phase D, round 4 N09); hostile review of the implementation deferred to step 12 (D3). Phase D has exactly two end states (N14): COMPLETE, when every item above holds and no blocker is open; or BLOCKED, a nonpassing state entered when a named blocker (today only `BLOCKER-R12-XVIC-CHECKPOINT`; the v1.3 input question was resolved by R15, not by a blocker, round 7 N26) is raised, in which the exit receipt lists every blocked obligation and case identifier with the blocker name and measured evidence, the cumulative target and full Slice 1 acceptance stay pending, every independent obligation is reported with its own counts, Phase E may not start, no done-state is claimed for any task or acceptance criterion, and the state persists until Payton lifts the blocker and the blocked cases are executed; a BLOCKED exit is never reported as complete, partial pass or skip. ## 5. Blast radius and reversibility - Tracked changes outside the submodule: `tests/ViceSharp.TestHarness/ViceSharp.TestHarness.csproj` (two lines), `native/Vice.Native.proj` (deleted), `native/build-vice-shim.ps1`, `native/build-vice-shim.sh`, `native/build-vice-shim-xvic.sh` (deleted), `native/build-vice-observer.ps1` (`SupportsShouldProcess`, A06 rerun, two more wraps) and `tools/immutable-vice/Invoke-ObserverEquivalence.ps1` (`SupportsShouldProcess`), new `native/Save-ViceSubmoduleDelta.ps1`, `native/Restore-ViceSubmoduleDelta.ps1` and their Pester tests, `native/README-native-build.md`, `.gitmodules`, `ViceSharp.slnx`, `build/Build.cs` (filter, two new targets), `ShimLegacy` traits on every method of the D0 semantic inventory (56 candidate files, final list in the receipt), `src/ViceSharp.Core/ViceNative.cs` and `ViceNativeXvic` (load detector, env-gated), new `tests/ViceSharp.TestHarness/HalfCycleState.cs` and `CompareHalfCycleStates` in `LockstepValidator.cs` with its corrected summary and the corrected summary of `Vic20/Vic20HalfCycleComparatorTests.cs` (assertions untouched), the adapter's R10 precondition, N05 validation and launch builder with their tests in `ViceSharp.VsfCompatibility.Tests`, new `tools/immutable-vice/snapshot-observer.c` and `snapshot-checkpoint.c` with doubles, drivers and contract tests, new `tools/ViceSharp.SnapshotFixtureGenerator`, new manifest `docs/requirements/oracles/vice-vsf-state-transfer-manifest.json`, two generated xvic fixtures, new tests in the three native-safe projects and the TestHarness (XML doc test, Slice 1 families), `PLAN-VSFLOCKSTEP-001` (Slice 1 amendment), `PLAN-OBSERVER-001` (S5 implementation note) and `TR-VSFLOCKSTEP-RESUME-001` AC2 reference (through the wrapper), receipts and docs. No exclude file and no exclude script (R1 B). Reversible by git. - Inside the submodule: the tracked delta is reverted (recoverable from the preservation receipts and the Phase 0 patch; recovery is a Payton-scoped action, never automatic, A03); nothing untracked is deleted (R4). - Consumers that change: the shim-bound methods become `ShimLegacy` and leave every gate until Phase E rebinds them; `ViceNativeBridge.cs` and `ViceSharp.Core/ViceNative.cs` keep compiling (they load the DLL at run time) until Phase E replaces them; that replacement is Phase E work, listed there, not silently started here. - Requirements touched: `TR-VSFLOCKSTEP-RESUME-001` AC1 (semantic amendment by Payton, R15: real resume of external v1.2 and v1.4, applied through the requirements wrapper in D1; served in D5 under R10 to R12) and AC2 (reference update, semantics preserved), `TEST-VICE-001` AC1 and AC2 (clean-target preflight), `TR-CYCLE-001` AC4 (reference evidence only; managed satisfaction pending Phase E), `FR-SNP-005` AC3 and `TEST-SNP-002` AC4 (the comparator fixture's real mapping, R13 B), `PLAN-VICEORACLE-001` tasks 4 and 5 (evidence attached, done-states at step 12 and after Phase E). Status changes stay pending until step 12 (D3, 4.5); the only acceptance criterion reworded is AC1 under R15, by Payton's explicit decision and through the wrapper; the R12 literal checkpoint is kept as written in `PLAN-VSFLOCKSTEP-001` line 241 and, if the pinned VICE cannot meet it, becomes the named blocker `BLOCKER-R12-XVIC-CHECKPOINT` for Payton. ## 6. Not in this plan Managed-core comparison against the observer traces (Phase E, including the 20 known-red CPU tests, the managed `TR-CYCLE-001` AC4 evidence and any per-cycle register question), VIC-20 lockstep and the VIC-20 sound oracle (Phase F), any edit of VICE source, deletion of any file under `native/vice`, the step 10 plans' approvals. ## 7. Hostile validation findings and where each is answered Round 1 (receipt `20261020T122200-plan-nativerestore-001-gpt61sol/`): - F01 (155 not 135): section 1; D0 counts. PASS since round 2. - F02 (harness invokes `BuildNative`): section 1; D2. PASS since round 2. - F03 (shim consumers and the gate denominator): section 1, R6, D0, D2. Round 3b FAIL: no load logging exists to prove zero loads; revision 4 adds the env-gated load detector in D2 with positive, failing and unset controls, and N06's helper-only and managed-fake controls. - F04 (hunk classification): section 2. PASS since round 3b. - F05 (VSF Slice 1 and S5 obligations): R8, R11, R12, D1, D5. Round 3b FAIL: map incomplete (fixed-cycle xvic fixtures, manifest schema, missing Nuke targets and generator, immutable-build cases, prerequisite matrix); revision 4 names each obligation with its mechanism, including the trap-based pinned checkpoint of R12 and the D2-created targets and generator. - F06 (Phase E failures inside the full-suite gate): R9, A05. Round 3b FAIL: a 21st uncategorized failure (`Vic20HalfCycleComparatorTests`); revision 4 makes it green in D2 under R13 B, so the R9 set stays 20. - F07 (D4 pre-overwrite and resume): D4. PASS since round 2; A04 added. - F08 (inventory bracket): D0, D2, D5, Exit. PASS since round 2. - F09 (`SupportsShouldProcess`): D1. PASS since round 2. - F10 (`REAL-C64-PHI2-AEC-001` and comparator XML docs): D5, Exit. Round 3b FAIL: the fixture's own annotation still claims `TR-CYCLE-001` AC4 and task 5 stays pending; revision 4 corrects the fixture summary in D2 (R13 B) and leaves managed AC4 and task 5 pending with the reason in the exit. - F11 (stale blast radius, AC2 reference): section 5, D1. PASS since round 2. - R01 (reviewer printed the marker credential): not repeated in rounds 2 and 3b. The round 1 raw stream stays private; rotation remains Payton's decision. - U01 (reviewer turn queued only): cause found 14:13 (the Codex workspace-write sandbox denied network; Payton 14:14: "sandboxes need network access, at least to loopback"); round 3b launched with `sandbox_workspace_write.network_access=true` and its turn is primary-persisted with history proof. PASS. - U02 (store mappings unattested): D0 wrapper read quoted in the receipt. PASS since round 3b. - A01, A02, A03: ACs in D0, D-pre and D4. PASS since round 2. Round 2 (receipt `20261020T131300-plan-nativerestore-001-r2-gpt61sol/`): - N01 (approved fixture reaches the H5 path): section 1; section 2 row H5; R10; D0 fixture scan; D5 precondition. PASS since round 3b (limited to the three clock copies; the wider reader path is N03). - N02 (resume boundary rules): D5 AC. Round 3b FAIL: no opcode-fetch tag, stolen cycles before the load, later-module failure after a successful `MAINCPU` read, preconditions unstated; revision 4 makes the `VICE_SNAP` record ordering authoritative (`resume`, `load`, first gate clock, idle or stolen cycles, first CPU access at PC), states the preconditions in D1 and the rejected cases, and separates full-load success from the CPU-module record. - A04 (repository identity, checkout bytes): D4 (git's own diff decides "already restored"). PASS since round 3b. - A05 (gate execution evidence): D2 and D5 AC. PASS since round 3b. - A06 (builder rerun on an up-to-date tree): D1 AC; D5 rerun. PASS since round 3b. - R02 (reviewer's first progress stamp estimated): not repeated in round 3b. PASS. Round 3b (receipt `20261020T141600-plan-nativerestore-001-r3b-gpt61sol/`): - N03 (uninitialized `rotation_table_ptr` read for TDE-off units): section 1 facts; section 2 row H5; R14 A; D1 documentation; D5 two-host trace equality. - N04 (architectural P and wrapper contract): R11 B; D1 contract tests. - N05 (drive-type resource side effects, invalid payloads): R10; D0 fixture scan; D1 adapter validation and argument builder; D5 effective-resource record and continuation evidence. - N06 (helper-only and managed-fake controls): R6; D0; D2. - N07 (absolute cycle budget above the restored clock): D1 budget rule; D5 rejected cases. PASS since round 4. Round 4 (receipt `20261020T153600-plan-nativerestore-001-r4-gpt61sol/`): - F05 (trap fires after a dispatched interrupt; revision 4 froze a later boundary and re-armed at the measured clock; literal 100,000 or an approved different checkpoint): section 1 fact on `DO_INTERRUPT`; R12 rewritten to the literal trigger with trigger and write clocks distinguished, no re-arming, and `BLOCKER-R12-XVIC-CHECKPOINT` when the write clock is not 100,000, per Payton's repeated ruling at 16:29. - N08 (binding allocation of the Slice 1 tests across D1, D2 and D5): D1 `VsfSlice1Contract` mock-bound tests, D5 `VsfSlice1Real` same-case tests, D2 gate selection stated by identifier. - N09 (internal gate cycle on task 4): exit and section 5 leave tasks 4 and 5 pending with evidence attached; done-states at step 12 and after Phase E. - N10 (window alignment, process-relative indices, derived AEC at the first restored cycles): D5 window alignment rules and rejected cases. - N11 (detector coverage per initialization order, unwritable log, no per-cycle work): D2 detector contract and gate rule. - N12 (per-line Slice 1 ledger, external v1.2 and v1.3 provenance, media identity after load): D5 manifest ledger, pinned inputs with the synthetic v1.3 labeled, `VICE_SNAP,drives` with image names. - N13 (prelude limit evidence, interval length, low-clock and overshoot cases): D5 budget and window paragraph. PASS since round 5. Round 5 (receipt `20261020T163300-plan-nativerestore-001-r5-gpt61sol/`): - N12 (no real v1.3 input; synthetic cannot be claimed as real): R15, Payton's amendment of AC1 to v1.2 and v1.4; D5 AC1 bullet; section 5. - N14 (explicit BLOCKED exit for the R12 blocker): R12 paragraph; D5 cumulative-target denominator; the exit's two end states. - N15 (checkpoint writer and gate interaction): D1 contract tests and D5 real cases. - N16 (audit interval before discovery; attribute construction queries `ViceNative`): D2 detector paragraph. - N17 (seam-level zero incremental allocation test): D2 detector paragraph. - N18 (CPU-clock versus half-cycle conversion, odd window, prelude budget): D5 budget and window paragraph. - N19 (other `EXPORT_REGISTERS` sites): section 1 trap fact narrowed. Round 6: FAIL again because R11's sentence still carried the exclusive list. Round 7: FAIL again because R12 still carried an exclusivity sentence about where the core exports registers (BRK, for one, exports after the opcode fetch); revision 8 states the narrow checkpoint claim (the trap seam at the boundary whose copied pending mask includes it, acceptance by the actual write clock) in section 1, R11 and R12, notes that other export sites exist inside the core, and claims nothing exclusive about them; round 8 N27 asks D1 to re-check that these four passages describe only the chosen seam and its acceptance rule and that this summary matches the retained prose. Round 6 (receipt `20261020T172500-plan-nativerestore-001-r6-gpt61sol/`): - R02 (the reviewer reused an earlier measured stamp once and disclosed it): reviewer process defect, recorded; the round 7 prompt repeats the rule. - N20 (`CiTest` carries its own filter; `VsfSlice1Real` and `ShimLegacy` leakage): D2 shared selector for `Test` and `CiTest`, cumulative selection, projection controls at D2 and after D5. - N21 (generator retains candidates and never publishes on mismatch): D1 generator contract; D5 real cases. - N22 (trigger during an already-dispatched interrupt): section 1 pending-mask fact; R12 wording; D1 mock control. - N23 (D1 C plus W versus the D5 low-clock exception; bounded terminal outcome): D1 budget rule; D5 low-clock case. PASS since round 7. Round 7 (receipt `20261020T180300-plan-nativerestore-001-r7-gpt61sol/`): - N24 (audit scope must include path resolution and availability probes reached during discovery): D2 detector paragraph. - N25 (unique candidate paths; native writer removes a failed snapshot; no invented hash): D1 generator contract. - N26 (obsolete optional v1.3 blocker phrase; D1 readback contents): exit end states; R15; D5 AC1 bullet. Round 8 (receipt `20261020T185200-plan-nativerestore-001-r8-gpt61sol/`): AGREE, accuracy 98, completeness 98, 54 PASS, 0 FAIL, 0 UNKNOWN; two low add-AC notes applied in this revision without changing any step: - N27 (export wording propagation): section 1, R11, R12 and this entry describe only the chosen trap seam and its acceptance rule and note that other export sites exist; D1 re-checks the four passages. - N28 (positive nonzero writer result): D1 generator contract treats every nonzero writer result, including the +1 of `vic20-snapshot.c` lines 99 to 102, as failure. Signed: claude-fable-5-1-high@ClaudeCode | Confidence: correctness 95%, accuracy 97%, completeness 95%