reEngine
Documentation Menu
On This Page

reEngine — Operations Runbook

Synced Version: 0.7.0 (2026-11-29)
Scope: Build Verification, Static & GitHub Polish Audits, Offline Toolchain Staging, SingleSetup7 Packaging & 0.7 / 0.6 / 0.5 Retention, Stage 2 Sandbox E2E (Stage2V060Probes + Stage2V061ParityProbes + Stage2V070Probes) & Two-Tier Log Checks


1. Build, Zero-Warning Test Gate & Pre-Flight Checks

  1. Dual Zero-Warning Build & Full xUnit Suite (32 Suites, 163 Tests, 0 Warnings, 0 Skips): powershell $env:APP_ISOLATED_TEST = "1" dotnet test Dev\reEngine.slnx -c Release /warnaserror dotnet publish Dev\src\reEngine.App\reEngine.App.csproj -c Debug -p:ReEngineTestAutomation=true "-t:Rebuild,Publish" /warnaserror dotnet test Dev\reEngine.slnx -c Debug -p:ReEngineTestAutomation=true /warnaserror Confirm 163/163 deterministic tests pass across all 32 suites (29 prior v0.1.0–v0.6.2 suites plus 3 added in v0.7.0): - Prior Suites (29): ManifestAndResolverTests, DecompAndToolchainTests, DecompProviderAndD4ValidatorTests, AotCacheManagerTests, InstallerAndAppStatusTests, InstallerWizardAutoSortTests, AssociationUpdateAndContainmentTests, UpdateStagingAndTracksTests, UpdateSweepAndTelemetryTests, LauncherAndLaunchPlanTests, SettingsMigrationAndLaunchTests, HostSurfaceAndInputTests, HostUiDrawerAndGateTests, HostReleaseAutomationStripTests, HostMultiBackendAndAudioTests, HostMultiBindInputAndTouchTests, MediaTreeWalkerAndVerifyModuleTests, SyncWaitShutdownAndDecompUiTests, HostViewportGeometryAndPresentersTests, HostMultiPortInputAndHotkeysTests, EngineRoutingAndMediaDiscoveryTests, HostExecutionResilienceAndSettingsSplitTests, HostDisplayVrrFiltersAndCaptureTests, HostAudioDspAndJukeboxTests, AppV060RoutingAndUiTests, EngineResolutionV061AndCrashFallbackTests, HostParityUiScaleMediaGateAndControllerNavTests, HostNonQuittingEscMouseCaptureAndHotkeysTests, HostV062PrelaunchParityTests. - Added in v0.7.0 (3): HostV070FocusAndInputTuningTests, HostV070PromptsAccessibilityAnd10RailTests, AppV070SdlManagerAndPurityTests.
  2. Static Scanner, SLOC Caps, Installer & Public-Repo Polish Audits: - Run static scanner against Dev\ (0 P0–P3 findings across Dev\src, Dev\tests, Dev\scripts): powershell python "%USERPROFILE%\.gemini\config\skills\audit\scripts\audit_scanner.py" ".\Dev" --format markdown - Verify source .cs and .ps1 files obey <= 250 preferred / <= 400 soft / <= 600 hard code-only SLOC caps (HostSessionRunner.cs 398 SLOC, ReEngineSdlManagerState.cs 346 SLOC, F1SettingsDrawerView.cs 298 SLOC), manuals (Dev\docs\*.md) stay <= 580 SLOC (or split flat into <DOC>.<Topic>.md), and AGENTS.md stays <= 40 lines (<= 2,048 B) with zero machine-local paths or personal usernames. - Verify all 4 Root Quartet docs, SECURITY.md, active.state, and all Manual Shelf files match 0.7.0 with zero internal jargon or emojis in public root docs, then run audit_github_polish.ps1: powershell powershell -NoProfile -ExecutionPolicy Bypass -File "%USERPROFILE%\.gemini\config\skills\audit\scripts\audit_github_polish.ps1" -ProjectRoot <PROJECTS_ROOT>\Personal\reEngine
  3. Clearance Before Packaging: Verify 163/163 tests in both builds, 0 P0–P3 findings, binary purity (0 Foundation.Automation, Foundation.UI, or System.Windows.Forms refs in Release reEngine.Core.dll, reEngine.Host.dll, reEngine.dll, reEngine.Installer.dll, and Setup EXE; IHostAutomationBridge decoupled via AutomationBridgeFactory), installer.manifest.json "suiteId": "reEngine" (Foundation v0.6.0), and full manual parity before running build_release.ps1.

2. Offline Toolchain Staging & Single-Pass Release Packaging

2.1 Offline CLI Toolchain Staging (<= 160 MB, Zero GPL Leak)

Run Dev\scripts\stage_offline_toolchain.ps1 when preparing or validating a Full profile toolchain\ bundle:

powershell -NoProfile -ExecutionPolicy Bypass -File Dev\scripts\stage_offline_toolchain.ps1 `
  -GhidraSourceDir "<LocalGhidraRoot>" `
  -JdkSourceDir "<LocalJlinkJdkRoot>" `
  -OutputDir "Builds\toolchain" `
  -MaxBudgetMB 160

2.2 Single-Pass Release Build (SingleSetup7), 0.7 / 0.6 / 0.5 Retention & SDK Drop

Run:

powershell -NoProfile -ExecutionPolicy Bypass -File Dev\scripts\build_release.ps1 -Version 0.7.0

Pipeline stages executed by Dev\scripts\build_release.ps1: 1. [1/6] Test Gate & OS Junk Scrub: Removes OS metadata files (desktop.ini, Thumbs.db, ehthumbs.db, .DS_Store, ._* by exact filename) and runs APP_ISOLATED_TEST=1 dotnet test Dev\reEngine.slnx -c Release /warnaserror (skippable only with -SkipTests). 2. [2/6] Portable Staging & Binary Purity: - Publishes reEngine.App (Builds\v0.7.0\app\) and single-file reEngine.Launcher (Builds\v0.7.0\reEngine.exe, < 2 MB, all v0.7.0 CLI flags registered in LauncherArgsHelper.ValueOptions plus optional-value --require-backend [<id>] and wait-only LauncherJobObjectGuard). - Writes app\version.txt (0.7.0), copies root LICENSE to Builds\v0.7.0\app\LICENSE, copies Dev\settings.example.json (schemaVersion: 2, domain: "core", shouldEnableRuntimeLogs: false) and Dev\scripts\THIRDPARTY_LICENSES.txt into Builds\v0.7.0\, copies association batch scripts, strips .pdb/.xml (0 AGENTS.md inside Builds\), verifies 0 Foundation.Automation / System.Windows.Forms / Foundation.UI refs in reEngine.Core.dll, reEngine.Host.dll, and reEngine.dll, Authenticode-signs both executables, asserts Release --automation-port 5199 returns ExitCode = 2, and keeps at most 2 newest Builds\v* folders. 3. [3/6] Pre-Package Scan & Pure Win32 Single-EXE Installer (Foundation v0.6.0 "suiteId": "reEngine"): Fails if any .pdb, .db, .sqlite, .sqlite3, .log, .env, or *secret*.json sits in Builds\v0.7.0\; packs payload.zip and publishes self-contained reEngine.Installer embedding Dev\Installer\installer.manifest.json ("suiteId": "reEngine", AllowAutoStart = false), asserting zero Foundation.Automation / Foundation.UI / System.Windows.Forms refs in both reEngine.Installer.dll and the self-contained Setup EXE. 4. [4/6] Sanitized SingleSetup7 Releases\ Bundle (+ Portable ZIP), Hardlinks & 0.7 / 0.6 / 0.5 Retention: - Authenticode-signs reEngine-Setup-v0.7.0-win-x64.exe into Releases\v0.7.0\ (asserting Release --automation-port 5199 exits 2), compiles sanitized README.md (from USER_GUIDE.md), FEATURES.md, RELEASE_NOTES.md, and CHANGELOG.md via Sanitize-Markdown + Assert-NoEndUserLeaks, builds reEngine-v0.7.0-win-x64-Portable.zip (zero installer EXEs inside), writes SHA256SUMS.txt, mirrors via NTFS hardlinks (New-Item -ItemType HardLink with copy fallback) to Releases\Latest\ + hub junction (<RELEASES_HUB>\Personal\reEngine\), packs reEngine-v0.7.0-win-x64.7z & Latest.7z (-mx=9), and validates via audit_installer.ps1 -ReleaseLayoutMode SingleSetup7 (Passed: True, 0 findings). (Dual-Installer Online + Offline 8-file layout is scheduled for v0.8.0.) - Enforces the 3-MINOR retention window (0.7, 0.6, 0.5): removes suffixed pre-release/hotfix unpacked directories, retains only the 2 newest unpacked versioned folders (Releases\v0.7.0\, Releases\v0.6.2\, plus Latest\), and prunes .7z release archives older than 0.5.x (0.4.x retired). 5. [5/6] SharedLibs SDK Drop & Purity Check: Builds -f net8.0 -c Release reEngine.Host.csproj, asserts 0 Foundation.Automation / System.Windows.Forms / Foundation.UI refs in net8.0\reEngine.Core.dll and net8.0\reEngine.Host.dll, and copies reEngine.Core.{dll,xml,deps.json}, reEngine.Host.{dll,xml,deps.json}, SDL3.dll, LICENSE, THIRDPARTY_LICENSES.txt, and reEngine-Setup-v0.7.0-win-x64.exe into <SHARED_LIBS>\reEngine\v0.7.0\ and Latest\, recording SHA-256 checksums in sdk-manifest.json. 6. [6/6] Source Archive: Packs Archive\reEngine-v0.7.0-src.7z including Dev, Root Quartet, AGENTS.md, LICENSE, SECURITY.md, and active.state while excluding bin, obj, TestResults, data, logs, .vs, *.pdb, *.tmp, *.bak, and *.user.


3. Visible-Window Stage 2 Sandbox E2E (APP_ISOLATED_TEST=1)

Run the parameterized Stage 2 E2E harness strictly inside temporary sandboxes (Write-DesktopPreflightInfo reports live GetThreadDesktop() Default vs WinSta0\exebox-*, and Start-ExeboxStreamForPort streams live GUI runs over UDP 5004). See OPERATIONS.E2ECoverage.md for the live coverage ledger and Base-vs-Current perf table.

powershell -NoProfile -ExecutionPolicy Bypass -File Dev\scripts\run_stage2_sandbox_e2e.ps1 -Version 0.7.0
  • [1/7] Foundation 12-Point 4-Drive Installer Sandbox: Runs run_sandbox_e2e.py (silent install into virtualized O:\Programs\reengine, shortcuts + uninstall entry, --version, coexistence, missing-path standby, unplug/remount, upgrade preserving data\ & data\rom\ + split configs, real uninstall, log sweep, and S2-12 host diff filtering external Google Drive .tmp.driveupload noise).
  • [2/7] Visible SDL3 Library Manager & Inspector Drawer E2E: Launches Debug + ReEngineTestAutomation reEngine.exe --window, verifies Chk_Fullscreen, 8x scale option, and Btn_VerifyPackage, clicks Pill_Engines -> Pill_BringUp -> Pill_Library -> Btn_ToggleDrawer, verifies Drawer_Panel, captures non-blank sdl3_library_live.png, and exits cleanly via Btn_Close.
  • [3/7] Interactive Explorer .decomp Launch onto SDL3 Bring-Up Shelf: Launches reEngine.exe decomp --module SampleDecomp.decomp onto BringUp, verifies Btn_RunStage and clicks Btn_VerifyDecomp, captures non-blank sdl3_bringup_decomp_live.png, and exits via Btn_Close.
  • [4/7] Standalone --verify-module --json Check: Runs reEngine.exe --verify-module on .recomp and .decomp fixtures, asserting ExitCode = 0 and "isPassed": true.
  • [5/7] Synchronous Frontend --open --wait & WM_CLOSE Save Flush: Launches --open SampleRecomp.recomp --wait --fullscreen --save-dir <saveDir> --backend directx --scale 4, verifies forwarded args, posts WM_CLOSE (0x0010) to the child window, and confirms memcard.sav flushes into <saveDir> with ExitCode = 0.
  • [6/7] Visible SDL3 Host E2E (Aspect, Hotkeys, Non-Quitting Esc, System_QuitGame & ExitCode = 6): Launches --host-demo --backend opengl --require-backend --aspect-mode fourByThree --window --preload-media, clicks MediaGate_LaunchDemoButton, presses F1, exercises controls, dispatches F5/F9, verifies ESC does not quit, opens Tab_System -> clicks System_QuitGame for ExitCode = 0, and asserts --backend metal --require-backend returns ExitCode = 6.
  • [7/8] Stage2V060Probes & [7.5/8] Stage2V061ParityProbes: Verifies settings*.json split persistence, 4-backend filters (crtLite, xbrz, ntscComposite, horPlus21By9), Audio Sound Test non-zero WAV, booting.sentinel Safe Mode + --safe-mode-reset, --demo-cart, Glass Media Gate, F3 HUD badges + Clean-Capture hide, and settings.controls.json persistence.
  • [7.7/8] Stage2V070Probes (Stage2V070Probes.ps1):
  • Probe 1 (10-Rail Two-Column Overlay, Dynamic Xbox Prompts, Accessibility & Drawer_QuitGame): Launches --host-demo --backend opengl --require-backend --window --prompt-glyphs xbox --pause-on-focus-loss --bg-controller-input, captures pre-overlay delta hash, opens F1, verifies all 10 Tab_* rails + Drawer_QuitGame in /v1/tree, clicks Tab_QuickActions (QuickActions_Resume..QuickActions_QuitGame), clicks Tab_Accessibility (Access_FastText, Access_ColorblindMode), captures anti-stale sdl_v070_overlay_10rail.png, clicks Drawer_QuitGame (ExitCode = 0), and verifies isFastTextEnabled: true in settings.json + non-none colorblindMode in settings.video.json.
  • Probe 2 (Colorblind + Flash Reduction): Runs --host-demo --backend parallelCpu --require-backend --frames 3 --colorblind-mode deuteranopia --flash-reduction --dump-screenshot and asserts non-blank sdl_v070_colorblind.png.
  • [8/8] Dual-Binary Release Fail-Closed Automation Gate: Runs both Release reEngine.exe --automation-port 5199 and Release reEngine-Setup-v0.7.0-win-x64.exe --automation-port 5199 and asserts ExitCode = 2 on both executables.

4. Split-Domain Configs, Protocol Gating, Logs, Exit Codes & Git Release

  • Split-Domain Config (<DataDir>\config\, Dev\settings.example.json):
  • settings.json (schemaVersion: 2, domain: "core"): core execution, updates, paths, shouldPauseOnFocusLoss, allowBackgroundControllerInput, promptGlyphMode, isFastTextEnabled, isFlashReductionEnabled, isSubtitlesEnabled.
  • settings.video.json (schemaVersion: 2, domain: "video"): display, scale, aspect, filters, uiTextScale, isFpsOverlayEnabled, isCleanCaptureModeEnabled, colorblindMode, isFlashReductionEnabled.
  • settings.audio.json (schemaVersion: 2, domain: "audio"): driver, playback endpoint, mixer gains, biquad LP/HP, stereo width, resampling, FF clamping.
  • settings.controls.json (HostControlTierStore + HostInputTuningCodec): inputProfileMode, controlMode, mouseSensitivity, menuControllerChord, allowBackgroundControllerInput, promptGlyphMode, isLookYInverted, inputTuning (deadzones, stick curve, stick swap, mouseSensitivityY, Hold/Toggle, Turbo, Gyro), hostActionBindings, and 3-tier bindings with SerializeDirtyCheckJson() idle write prevention.
  • Engine Resolution, Resilience, Protocol Gating & Exit Codes:
  • EngineCompatibilityEvaluator + EngineVersionResolver, SessionRecoveryLocator + prompt-first TryCrashFallbackRelaunchAsync (HostDialogService), BootCrashSentinel, MediaRamPreloader, ExecutionTierPolicy, wait-only LauncherJobObjectGuard, and RecompLaunchFlagRouter (>= 0.7.0, >= 0.6.1, >= 0.6.0, >= 0.3.0, pre-0.3.0).
  • Clean exit codes: 0 (success / valid --verify-module), 1 (missing compatible engine / .recomp --require-media fail), 2 (invalid CLI args / malformed package / Zip-Slip / containment error / Release --automation-port), 3 (unbuilt .decomp engine / .decomp --require-media fail), 4 (offline --check-updates --strict), 6 (unavailable backend under --require-backend), 130 (Ctrl+C + bounded <= 3s WM_CLOSE tree flush).
  • Two-Tier Log Check: Inspect live install logs (%LOCALAPPDATA%\Programs\StreamItAll\reEngine\reEngine\logs\ or configured install root, read-only) alongside Dev\logs\ (reengine.log, crashes\crash_reengine_*.json) verifying [v0.7.0] [PID:<id>/T:<tid>] headers, single [HEARTBEAT] tags, and zero crash dumps.
  • Downstream SDK Consumers: Platform engines (reStation/reSlate, reCart/reCartOne/reNes) consume <SHARED_LIBS>\reEngine\v0.7.0\ (reEngine.Core.{dll,xml,deps.json}, reEngine.Host.{dll,xml,deps.json}, SDL3.dll, LICENSE, THIRDPARTY_LICENSES.txt, sdk-manifest.json, and reEngine-Setup-v0.7.0-win-x64.exe).
  • Outer Git & Public Release Publication: Scrub OS metadata junk (desktop.ini, Thumbs.db, ehthumbs.db, .DS_Store, ._* by exact filename) before any git command, commit tracked files on main, tag v0.7.0, push main --tags (when approved/unrestricted), keep GitHub Pages (pages.yml) and CI (ci.yml) green, and publish release artifacts exclusively via GitHub Releases (--prerelease for 0.x) + Discord devlog post (zero Google Drive binary uploads; manual-only Notion sync).