Files
linuxdistro-roguelite/Tools/README.md
T

49 KiB
Raw Blame History

Unity package metadata recovery

Repair-UnityPackageMetadata.ps1 repairs the package-cache GUID corruption that caused the URP/Shader Graph CS0246 / CS0234 error cascade in this workspace.

The cached .asmdef.meta files had regenerated GUIDs. For example, Unity.Collections was registered as 20584ab9ce8473748b0938382416bb61, while its dependents referenced the official e0cd26848372d4e5c891c569017e11f1. Shader Graph had the same problem. The missing types were present in source; Unity omitted the assemblies from compiler references because their GUIDs did not resolve.

From the project root:

# Prepare official sources and preview changes. Note the printed recovery directory.
./Tools/Repair-UnityPackageMetadata.ps1

# Apply that preview, retaining backups of every replaced file.
./Tools/Repair-UnityPackageMetadata.ps1 -RepairDirectory '<printed-directory>' -Apply

The tool uses matching-version packages bundled with Unity 6000.4.8f1, or official Unity registry archives whose SHA-1 matches the installed package fingerprint. Pass -EditorPath for another installation location. It restores only .meta files under Library/PackageCache, not game assets, source, save files, package versions, or manifests. Original files are backed up under the recovery directory's backup folder. Re-running is safe; matching files are left alone.

Save your work and close Unity before applying repairs. Do not edit generated compiler response files or replace missing package types with stubs.

Stale imports in an already-open editor

An editor that imported the regenerated GUIDs can retain stale assembly references even after the correct metadata is restored. Assets > Refresh is not sufficient in this case. In this workspace, the Core Runtime compiler response file still omitted Burst, Collections, Input System and Mathematics; Shader Graph also omitted its Core dependencies. A fresh import of the same repaired files compiled successfully.

After saving and closing Unity, back up the generated import/compiler caches:

./Tools/Reset-UnityImportCache.ps1          # Preview exact targets
./Tools/Reset-UnityImportCache.ps1 -Apply   # Refuses while this project's editor is open

The reset moves only the listed generated databases, artifacts and compiler caches into Logs/ImportCacheBackup-<id>. It does not delete files or move the repaired Library/PackageCache, project assets, packages, settings or saves. Reopen the project and let Unity finish importing and compiling. The first import will take longer than a normal refresh. Keep Unity closed while the script runs. Backup copies remain available if recovery is needed; do not restore the stale caches as part of normal repair.

Verified recovery

  • Restored 12,361 metadata files; the subsequent audit reported 0 changes needed.
  • Backups: C:/Users/frederik/AppData/Local/Temp/KernelPanicPackageRepair-838ec83e055348f58c8c2aec85fe62c4/backup.
  • Unity 6000.4.8f1 compiled the complete installed package set, including URP/Shader Graph, with 0 C# compiler errors in an isolated project copy. Its validation-only manifest maps the same package versions to the repaired local cache; the working project's manifest and lock file were not changed.
  • EditMode tests: 162 passed, 0 failed, 0 skipped, Unity exit code 0; test duration 8.0090255 seconds, excluding compilation/import.
  • Results: C:/Users/frederik/AppData/Local/Temp/KernelPanicGentoo-40125afe059144ab80f37bca6f1bb860/results-full-packages.xml; log: editor-full-packages.log alongside it.
  • The open editor was not closed automatically. The isolated test does not verify its live import database; use the cache-reset procedure above if its previous assembly references persist. No standalone player build was run.

Gameplay validation and Windows player builds

The commands below are a repeatable workflow, not a record of completed validation. Use Unity 6000.4.8f1 with Windows build support. Close the editor for the target project first, or use a disposable project copy so the working editor can stay open. Preserve the complete Assets, Packages, and ProjectSettings content, including the package manifest and lock file. If offline validation needs local package mappings, retain every installed dependency at the same version; do not replace the production package set with a reduced test manifest. The recovery instructions above apply if copied package metadata is damaged.

Set paths in PowerShell, adjusting the editor installation and project location:

$unity = 'C:\Program Files\Unity\Hub\Editor\6000.4.8f1\Editor\Unity.exe'
$validationProject = 'C:\work\KernelPanicValidation'
$artifacts = Join-Path $validationProject 'Artifacts\Validation'
$player = Join-Path $artifacts 'Windows\KernelPanic.exe'
New-Item -ItemType Directory -Path $artifacts -Force | Out-Null

Run the complete EditMode suite. Omit -quit here so the test runner can finish and write its XML. Piping the native command to Out-Host makes PowerShell wait for the Windows GUI executable:

& $unity -batchmode -projectPath $validationProject -runTests -testPlatform EditMode `
  -testResults (Join-Path $artifacts 'editmode-results.xml') `
  -logFile (Join-Path $artifacts 'editmode.log') | Out-Host
if ($LASTEXITCODE -ne 0) { throw "EditMode validation failed: $LASTEXITCODE" }

KernelPanic.Editor.PlayerBuild.BuildWindows builds all enabled scenes from Build Settings into a Windows development player. Keep the resulting executable beside its generated data directory and DLLs:

& $unity -batchmode -quit -projectPath $validationProject `
  -executeMethod KernelPanic.Editor.PlayerBuild.BuildWindows `
  -kernelPanicBuildPath $player `
  -logFile (Join-Path $artifacts 'player-build.log') | Out-Host
if ($LASTEXITCODE -ne 0) { throw "Windows build failed: $LASTEXITCODE" }

The opt-in player smoke check selects Ubuntu through the starter flow, configures a seeded run, plays the first wave, buys a repository offer, advances, surrenders, verifies saved rewards, returns to the menu, and starts a fresh run. It uses real scene controllers and combat; it is not a replacement for a manual mouse/keyboard and visual review. Run with graphics enabled, without -nographics, so UI scheduling and screenshot capture can work. Use an absolute save path whose primary file and .bak do not exist; the unique directory below gives every run its own progression:

$smokeDirectory = Join-Path $artifacts ('Smoke-' + [Guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $smokeDirectory | Out-Null
$smokeSave = Join-Path $smokeDirectory 'progression.json'
& $player --kernel-panic-smoke --kernel-panic-save-path $smokeSave `
  -screen-width 1366 -screen-height 768 -screen-fullscreen 0 `
  -logFile (Join-Path $smokeDirectory 'player.log') | Out-Host
if ($LASTEXITCODE -ne 0) { throw "Player smoke check failed: $LASTEXITCODE" }
Get-Content (Join-Path $smokeDirectory 'player-smoke-result.txt')

The player exits after completion. The smoke directory contains player-smoke-result.txt, player.log, its isolated progression files, and runtime panel images first-battle.png, repository.png, and run-report.png for stages reached. It temporarily renders each real UI panel to a texture because hidden Windows backbuffer screenshots can be black; empty panel images fail verification. Matching *-panel.txt files record bounds, visibility, opacity, and graphics API. This verifies runtime UI rendering but not desktop-window compositing. The runner enables background execution only for the smoke process. Check the result text, process exit code, log, and images together. The smoke runner and command-line save override are available only in the editor or development builds; normal player launches do not activate the smoke scenario.

Seeded balance comparisons

KernelPanic.Editor.BalanceComparison.RunBatch starts an empty Play Mode scene in a separate batch editor and drives the actual combat manager through public gameplay operations. It performs 1,680 measured runs by default: 56 scenarios across 30 fixed seeds, beginning with the original 17, 101, and 2027. It also repeats the first seed for each scenario (56 additional runs) and requires identical recorded metrics and event hashes before reporting success. The matrix covers all five authored distributions with and without DNF, plus Gentoo V5 controls for Haskell/C, C/Rust, Python/JavaScript, zram, and zram with DNF. Package-bearing builds run at both levels 0 and 5; every build runs with no shopping and upgrade-first shopping. Package-free controls are not duplicated across irrelevant package levels. Gentoo V1 Haskell/C controls come from the distribution baseline.

& $unity -batchmode -projectPath $validationProject `
  -executeMethod KernelPanic.Editor.BalanceComparison.RunBatch `
  -balanceOutput (Join-Path $artifacts 'Balance') `
  -logFile (Join-Path $artifacts 'balance.log') | Out-Host
if ($LASTEXITCODE -ne 0) { throw "Balance comparison failed: $LASTEXITCODE" }

Omit -quit for this command. The tool enters Play Mode and exits Unity itself after the run matrix and output writes finish. Defaults are 10 waves and 100 total rounds per run. Optional arguments are -balanceSeeds 17,101,2027, -balanceSeedCount 30 (1..1000), -balanceWaves 10, -balanceRounds 100, -balancePackageLevels 0,5, and -balanceShop both (none and upgrades select a single policy). The last seed/seed-count option wins. The round cap counts started Execute phases, including partial defeat/clear rounds, and is not a per-wave limit. For a short infrastructure check, use -balanceSeeds 17 -balanceWaves 2 -balanceRounds 12; this still exercises all 56 scenarios and their repeats. Add -balancePackageLevels 5 -balanceShop none to restrict it to the original 18 loadouts. Do not present a smaller check as the full comparison.

The output directory receives balance-comparison.md and schema-2 balance-comparison.json. Markdown compares observed enemy uptime damage per round, mean rounds, waves cleared, defeats, and survivors reaching either limit. A second table reports unused Cycles per ended turn, empty-hand turns, empty-hand plus unused-Cycles turns, no-usable-card plus unused-Cycles turns, plays per round, purchases, draw riders, Bits spent, and play-cap hits. These percentages use explicitly ended Execute turns; native wave-clearing plays and mid-turn deaths are excluded. Cycles are sampled before deferred effects resolve. Usable-card checks exclude tokens, broken and locked cards but ignore affordability, so an expensive card is not mistaken for an empty hand. JSON retains each seed, exact starter card IDs, incoming uptime damage, enemy shield damage, cards played, resource counters, repository visits and spending, ending uptime, stop reason, and trace hash. Uptime damage excludes shield damage and overkill; partial defeat/clear rounds count. A runtime error, stalled combat, or replay mismatch fails the batch instead of producing a successful comparison. The known Unity SearchDatabase.EnumerateAll startup exception is recorded separately only when its complete stack contains the specific editor startup path and no game or other unknown frames; its full diagnostic remains in JSON and the editor log, with an explicit note in Markdown. This exception does not validate or repair Unity's search index, and all other errors still fail the batch.

Interpret these results as a bounded heuristic benchmark, not optimal play or a balance verdict. The combat bot chooses the highest preview value per (cost + 1), targets the living enemy with least uptime, breaks ties by hand order, and caps plays at 64 per round. It starts with the first four authored exclusive cards and both language starter decks and undervalues conditional, draw, and setup effects. The upgrade-first shopper uses real offers and earned Bits, prioritizing healing at <=50% uptime, draw riders, magnitude, cost reduction, max uptime, RAM, Cycles, cards, then useful healing. It re-evaluates after each purchase, breaks ties by offer order, and does not reroll or remove cards. This is deliberately repeatable, not optimal deckbuilding. No rolls or currency are forced. Death-animation completion is acknowledged by the harness while the engine still handles death, revival, and spawning. Different loadouts consume random values differently, so a shared seed does not guarantee identical later encounters. Survivors at a limit are censored results, not completed-run victories. A high empty-hand/unused-Cycles rate is a reason to investigate card flow, not automatic proof that extra draw is the correct fix. Compare both shopping policies and package levels before tuning. No balance values are changed by this tool.

Features to verify during manual review

  • First battle guide: a dismissible, replayable guide explains health/resources, immediate Native execution, Python FIFO, Haskell LIFO, and Gentoo Compilation when relevant. Reopen it with ? guide in the dispatch header. It observes actual battle events and does not alter damage or card timing. Dismissal is remembered in local preferences.
  • Run seeds: enter a signed integer in run setup to reproduce a run, or leave the field empty for a new seed. Combat and repository randomness have separate seeded streams. Reproduction also requires the same loadout, content version, and action sequence; changing plays or repository choices changes the subsequent state.
  • Progression recovery: saves use a versioned envelope with an integrity checksum, a flushed temporary file, atomic replacement, and a previous valid .bak. Valid legacy saves remain readable. A damaged primary can recover from a valid backup; the next successful save repairs the primary. Unsupported future schemas and unrecoverable files surface a recovery error and remain unchanged. Restore a known-good save and use the retry control; never delete a live save merely to make validation pass. Save failure during reward settlement must leave the rewards available for retry.

Improvements verification (2026-10-23)

  • Complete EditMode suite: 487 passed, 0 failed, 0 skipped with graphics enabled. Results: Logs/improvements-complete.xml; editor output: Logs/improvements-complete.log. This includes save failures/recovery, exactly-once reward retry, deterministic repository streams, seed entry, and first-battle guidance at five viewport sizes with standard/large text.
  • After the final dispatch spacing adjustment, all 5 CombatLayoutTests passed again, including the assertion that the end-turn button cannot overlap resource readouts: Logs/improvements-layout-final.xml.
  • Windows development build succeeded with 0 build errors: Builds/Windows/KernelPanic.exe (retain its adjacent data and DLLs), log Logs/improvements-build-delivery.log.
  • That final executable passed the complete isolated-profile smoke scenario with exit 0: starter selection, configured seeded combat, repository purchase, next wave, defeat, saved rewards, menu, and fresh run. Result, runtime log, and inspected UI images: Logs/Smoke-Final/. No player progression was used by the smoke check.
  • The balance comparison completed 54 measured runs and 18 exact replays, using the full installed package set: Logs/Balance/balance-comparison.md and .json. Example observations: Gentoo V5 Haskell/C damage per round rose from 10.63 to 18.12 with level-5 DNF in this small sample; Mint's five-wave survival changed from 0/3 to 3/3. These are heuristic measurements, not grounds for an automatic balance change. No tuning values were changed.
  • Balance validation recorded one known Unity Search index startup exception separately, preserving its complete editor-only stack in the report. Game errors remain fatal to the harness.
  • Standalone visual checks use the player's actual UI panel rendered to a texture. Hidden-window backbuffer captures were black on both D3D11 and D3D12; panel captures showed the live guide, repository, and run report. Rider could not attach a Mono debugger to this standalone player, so runtime panel bounds, visibility, opacity, and graphics state were recorded by the isolated smoke runner instead. Desktop window compositing and a manual mouse/keyboard playthrough remain separate checks.

Run usability improvements (2026-10-23)

  • Build drafts: each distro retains its cards and language pair through menu navigation and restarts. Package slots continue to use the existing per-distro package loadout. Temporarily removing a card no longer clears the selected languages.
  • Repeat builds: the run archive screen (history --runs, between settings and quit) offers same-seed and new-seed retries. The saved build includes the original distro version and package upgrade levels, so later meta upgrades do not silently change a repeat. Missing/unowned content disables retry with an explanation. Old saves without language/seed information remain editable drafts rather than inventing a reproducible build.
  • Pile inspection: during player input, select draw, discard, or exhaust in the resource panel. A centered, responsive card grid shows full rules and relevant upgrades. Search supports a visible input hint and Clear control; empty piles and unmatched searches have distinct messages. Every pile is displayed alphabetically; the actual draw order and RNG are untouched. Escape closes, PgUp/PgDn scroll, and keyboard focus returns to the originating pile button.
  • Save & exit: use this control in the repository after clearing a wave. It saves the current repository, including sold offers, reroll cost, Bits, health, permanent card changes, stat upgrades, original build, pending rewards, carried combat effects, and both random-stream cursors. It does not pay rewards or create a completed-run history entry. A failed write keeps the live run open for retry.
  • Resume saved run: this home-screen control returns to the same repository. The checkpoint is claimed once before play to prevent paying its rewards repeatedly. Save & exit again at a later repository to suspend again; this is an explicit suspension feature, not crash recovery or mid-combat autosaving. Starting a different run requires confirmation and commits the checkpoint discard together with the new build. Saves now use envelope schema 2, preserving legacy/schema-1 progression while preventing older builds from dropping the new data.
  • Defeat feedback/history: run reports show the killing action, final-round uptime damage dealt/lost, damage blocked by shield, and up to eight incoming hits. Surrender is explicitly identified and its synthetic damage is excluded. The latest 20 completed runs persist alongside reward settlement in the same save; repeated settlement does not duplicate history. Open recent runs inside run archive.
  • Wave-transition safety: player actions are blocked while the next wave's opening hand is still being prepared. Combat readiness now requires that initialization has finished, including after resuming.
  • DNF damage scope: the package's advertised stacking damage buff now affects card damage only. Previously it was stored in the general effect bonus, also amplifying draw, Shield, healing and other utilities. The base +2 and level-5 +7 damage stacks, once-per-round trigger, wave reset, and Fedora passive remain. Native damage resolves before the trigger; deferred damage resolves after it. Previews use those same rules, and Update Manager captures the bonus once for its delayed repeat. Mint's general effect bonus and other package effects are unchanged. No blanket draw-rate increase or arbitrary package-number reduction was applied.

Verification artifacts for this pass:

  • Logs/next-improvements-release-final.xml: 540 passed, 0 failed, 0 skipped, including checkpoint failure/consumption, RNG continuation, legacy saves, build drafts, pile UI across viewport/text sizes, damage attribution, history, transition-input guards, and DNF damage/utility isolation and preview timing.
  • Logs/next-improvements-release-build.log: successful Windows development build with zero build errors.
  • Logs/Smoke-Delivered/: the delivered executable's isolated-profile smoke passed starter selection, pile search, a real repository purchase, save/exit without payout, exact resume, next-wave readiness, reward/history settlement, both retry modes, and a natural defeat with an attributed killing action. Screenshots render the live player UI panel; desktop compositing and a human-input playthrough are not covered by this automated check.
  • Logs/Balance-Next/: the pre-DNF-correction baseline completed 1,680 measured runs and 56 exact replay checks across 30 seeds. Logs/Balance-Next-Dnf/: the corrected build completed 560 measured runs and 56 exact replay checks, using the first 10 matching seeds and all 56 scenarios. Both batches exited successfully with no round-cap stops or 64-play-cap hits. The final build was tested on 10 seeds per scenario, not the full 30-seed baseline matrix.
  • All 200 paired non-DNF control runs retained identical recorded results and event trace hashes. Across the 360 paired DNF runs, ten-wave survivors changed from 205 to 137 and mean waves cleared from 8.82 to 8.18. The corrected build also fixes prospective deferred-damage previews, which can change the bot's decisions; this comparison does not isolate utility amplification as the sole cause. These capped heuristic results are not completed-run wins or proof of final balance and do not justify additional numerical nerfs. The known editor-only Search startup diagnostic remains separately recorded in the reports.
  • The larger baseline also exposed a resource/card-flow mismatch worth further investigation: for Gentoo V5 Haskell/C without shopping, level-5 zram raised unused Cycles per ended turn from 1.10 to 7.04 while plays per round barely changed (2.36 to 2.38). This does not by itself justify increasing draw or resources; shopping policy, card choices, and the bot's limitations matter.

Run archive navigation (2026-10-23)

  • Added run archive (history --runs) between settings and quit. Both retry actions and recent runs now live inside that screen; resume saved run remains on the home menu. The command supports prompt entry/completion, click, and shortcut 5; Quit moves to shortcut 6. Escape and the Back button return home, while closing history returns to the archive.
  • The archive shows the saved build or an explanation when retries are unavailable. Its three actions wrap within narrow layouts and respect standard/large text.
  • Logs/run-archive-verified.xml: 573 passed, 0 failed, 0 skipped. This includes command routing, archive ownership/navigation, empty state, and narrow/large-text checks. Repaired the malformed GUID on MenuPersistenceTests.cs.meta: Unity had silently excluded that file from earlier suites, including the 540-test run above. All 25 menu persistence/navigation cases are now discovered and passed; their detached scrolling fixture was also corrected.
  • Logs/run-archive-build.log: Windows development build succeeded with zero build errors. The rebuilt Builds/Windows/KernelPanic.exe passed the expanded isolated-profile player smoke with exit 0, including command entry, clicking the new menu row, Escape/Back, history, and both retries. Results and inspected home/archive panel screenshots: Logs/Smoke-RunArchive-a170ddaba7cb434c9a6c3506e00007ce/. This remains automated runtime-panel verification, not a manual playthrough.

Pile inspector polish (2026-10-23)

  • Replaced the left-aligned full-width card strips with a centered modal and a one-, two-, or three-column grid sized from the actual scroll viewport. Cards retain natural heights and full inline rules; search and Close remain outside the scrolling area. The pile-only overlay layout is removed before repository or run-report views.
  • Added a bordered search field with a persistent placeholder, a Clear control that restores focus and scroll position, and a compact card count. RAM remains visible, while zero-valued patch/cost/magnitude/draw fields are omitted. Nonzero permanent/temporary changes and corruption recovery details remain inline; redundant hover tooltips no longer cover cards.
  • Logs/pile-view-verified.xml: 577 passed, 1 failed, 0 skipped. All pile checks passed, including five viewport sizes at both text settings, centering, column counts, full text, search/clear, keyboard scrolling, state badges, and unchanged draw order. The remaining failure is GachaRevealTests.LayoutMatrixKeepsOrderReadableTilesAndAccessibleControls: a rarity label extends 1.6px past its tile at 1024x768, exceeding the test's 1px tolerance. It also fails in isolation (Logs/pile-view-gacha-isolated.xml). That fixture does not load the pile view or its stylesheet; no reward-screen code or tolerance was changed in this pass.
  • Logs/pile-view-build.log: successful Windows development build. The delivered executable passed the complete isolated-profile smoke with exit 0, including all three pile views, Clear/search focus, multiple columns, centered bounds, and overlay cleanup. Inspected populated and empty-state runtime panel images: Logs/Smoke-PileView-782e9cbed68544d798837536575dcf24/. These captures do not replace a manual input/desktop-compositing check.

Pile browser and archived builds (2026-10-23)

  • Draw, Discard and Exhaust now share a tabbed inspector with live-snapshot counts. Each tab retains its own search, language/stored-cost filters, grouping preference and scroll position while the inspector is open. Reset filters and keyboard navigation remain available outside the card scroll area; viewing does not reorder the live deck or consume randomness.
  • Identical copies are grouped by default with a count, with an option to show every copy. Upgrades, cost adjustments, corruption/recovery, lock state and differing cost context stay separate. Cards distinguish stored Cycles from the current hypothetical estimate; expandable details explain modifiers and warn that the hand and ready discounts can change before the card is played.
  • New completed-run records preserve the original starting deck, selected exclusive cards, languages, distro version, seed and package levels. Recent runs can inspect that build, copy its seed, or load selections into setup without launching. Setup deliberately uses current owned versions/levels and reports differences. Missing legacy snapshots and unavailable content disable loading with an explanation; loading preserves the retry snapshot and repository checkpoint.
  • Reward-tile index/rarity headers wrap without overlap, fixing the earlier reward-layout failure. Modal focus now handles Unity's navigation event rather than also advancing on KeyDown, preventing double Tab movement; dropdowns participate in the focus loop. Rider did not expose a debugger run point for the Unity focus test, so the issue was verified with isolated test event traces and Unity 6000.4 reference source. No user breakpoints or run configurations were changed.
  • Logs/usability-final-tests.xml: 615 passed, 0 failed, 0 skipped. Includes five pile viewport sizes at both text settings, tab-state and scroll restoration, grouping variants, cost-query non-mutation, archive save compatibility/setup loading, narrow archive labels, and reward layouts at standard/large text. Logs/usability-build.log records the Windows development build. The opt-in player smoke now also exercises pile tabs/grouping/cost details/runtime keyboard navigation and archive inspect/copy/load, restoring the clipboard after its copy check. Smoke profiles are isolated from real progression; runtime-panel captures are automated verification, not a manual playthrough.
  • Final delivered build: 0 build errors, complete player smoke PASS / exit 0 at both 1366x768 and 390x844. Results and panel captures: Logs/Smoke-Usability-Final-1366-7f8bcfb9a2474be592d69d12f5f88bad/ and Logs/Smoke-Usability-Final-390-23c95306f31a4a2685f3743fdbceee5b/. Narrow archive foldout titles wrap fully, and the pile browser keeps its filters and Close action accessible.

Campaign, routes and execution preview (2026-10-23)

  • New runs have five authored encounters: Boot diagnostics, Firewall maintenance, Process explosion, Concurrency fault, and Kernel Overseer. The first four introduce revivals/growing damage, protection/countdowns, splitting, and paired enemies/death payloads. EncounterDirector owns composition and encounter advice; spawning still uses the seeded combat stream for Uptime and ordinary intents.
  • The Kernel Overseer repeats a visible shield / probe / heavy-interrupt cycle. At half Uptime, its next announced attacks gain +3 damage. Taking damage never secretly increases an already announced attack. Clear wave five to choose Finish campaign (victory report and normal reward settlement) or Continue into endless (same run, build and earned rewards; no early payout). Endless mode rotates harder authored combinations with increasing Uptime.
  • Each repository offers Repair stop (restore up to 6 Uptime on departure) or Elite detour (an additional Daemon). Clearing a challenge grants 4 Bits and a permanent +1 draw rider on the first non-token, non-junk deck card without one. If all eligible cards already have riders, the reward is 8 Bits instead. Selection itself grants nothing; departure and wave-clear guards prevent repeated healing/rewards. The default route is repair. Draw, costs, DNF and zram base values are unchanged.
  • The repository presents route details and the previous challenge reward. The combat header shows campaign progress out of five, and encounter advice appears in the scrolling workspace. Victory uses the theme's success accent and records wave five, not the internal next-wave counter of six. It is a separate history outcome from surrender or defeat. A victory resumed from a checkpoint explicitly marks its unavailable combat recap instead of showing invented zero statistics.
  • End-turn execution preview, in the combat workspace, lists queued Python in FIFO order, Haskell in LIFO order with captured multipliers and targets, current announced enemy intents, and cleanup. Expanding scrolls it into view; when the workspace is too short it opens a focused, scrollable dialog instead, with Close/Escape and combat-shortcut blocking. Estimates use current state independently and disclose retargeting, randomness, deaths, race-pair order, status ticks and other changes; they do not promise a final damage total or reveal hidden intents. Opening it never rolls RNG, simulates effects, or mutates combat.
  • Checkpoint version 2 persists selected/active routes, the milestone choice and endless state. The save envelope is schema 3 so older players cannot silently overwrite these fields. Version-1 checkpoints retain their existing structural endless encounter rules. Both sides of the boss milestone can be suspended/resumed. As before, save-and-exit is an explicit repository suspension, not mid-combat crash recovery.
  • RunJourney, EncounterDirector, RunRouteView, ExecutionPreview/ExecutionPreviewView, and PackageCostRules keep new progression, presentation and pure package pricing outside the main controllers. Existing package price calculations and preview callers share the same pure pricing helper.

The balance harness accepts -balanceRoute repair (default) or -balanceRoute challenge. No-shopping runs still enter the repository and select their route; they simply buy nothing. Reports use schema 3 and identify the authored encounter revision and route. Use -balanceWaves 5 to compare the introductory campaign, or a larger cap to exercise endless continuation. These results are not directly comparable to reports from the old structural encounters.

The player smoke runner also supports --kernel-panic-campaign-smoke alongside the existing --kernel-panic-smoke and isolated save arguments. It plays the real five-wave Ubuntu campaign, buys real offers with earned Bits, chooses repair, captures the boss/milestone/report panels, finishes, and verifies exactly-once saved rewards/history after returning to the menu. Add --kernel-panic-endless-smoke to continue into wave six and surrender instead. No damage, currency, health or ownership is injected. The ordinary smoke scenario additionally checks execution-preview non-mutation and saves/resumes an elite-route choice.

Campaign balance findings

Logs/Campaign-Balance-Repair/ and Logs/Campaign-Balance-Challenge/ each contain Markdown and schema-3 JSON reports for 560 measured runs plus 56 exact replays: 56 builds/policies across ten seeds, capped at five waves or 100 rounds. All 112 replay checks matched. Seeds were 17,101,2027,12345,1831565813,-631835670,1199730143,-1263671340,567894473,-1895507010. Both passes used the full installed package graph and actual Play Mode combat. Known editor-only Search startup diagnostics, if present, remain recorded separately by the harness.

Package-free V1 builds reaching the five-wave cap (out of ten per cell):

Distro Repair, no shop Repair, upgrade shop Challenge, no shop Challenge, upgrade shop
Arch 10 10 10 10
Fedora 10 10 9 8
Gentoo 10 10 9 8
Mint 10 10 10 8
Ubuntu 10 10 0 6

This supports repair as an introductory default and elite as an optional build-dependent risk. It does not establish human win rates: the bot uses one fixed exclusive selection and a greedy policy, and buying an upgrade is not guaranteed to improve its decisions. The two routes change encounters, rewards, and later RNG consumption together, so their differences do not isolate the causal effect of extra draw.

Card-flow checks still show excess zram capacity: Gentoo V5 Haskell/C with level-5 zram and no shopping averaged 2.43 plays/round and 6.77 unused Cycles/ended turn on repair; challenge averaged 2.70 and 6.78. Without packages, the same repair build averaged 2.42 plays/round and 0.93 unused Cycles. Level-5 DNF raised its repair damage/round from 13.26 to 19.36. The route reward provides earned draw progression, but does not justify declaring the zram mismatch solved or applying a global package nerf. Package stats remain unchanged pending broader human playtests and longer runs.

Campaign validation

  • Logs/campaign-verified-tests.xml: 636 passed, 0 failed, 0 skipped. Coverage includes authored compositions/race pairs, the boss cycle and announced enrage, route reward idempotence, healing once on departure, campaign victory/endless guards, milestone and legacy checkpoint compatibility, invalid routes, victory save failure/retry, recap round retention, non-mutating FIFO/LIFO previews, route/preview layouts at five viewports with standard/large text, success styling and unavailable resumed recaps.
  • The initial hidden-player checks exposed a smoke-runner startup assumption: it asserted starter readiness after two seconds, while its reduced-motion override ran after menu initialization. The runner now applies the override before scene load and again after preference loading, uses the normal boot-skip key input if needed, and waits for readiness with a bounded timeout. Normal player startup and saved preferences are unchanged. Rider could not attach its Mono debugger to the isolated standalone process (only native LLDB was offered); the fallback used the isolated runner and save/log evidence. No user breakpoints or run configurations were modified.
  • After the final responsive-preview change, Logs/campaign-preview-final-layout.xml passed all 10 layout checks (five viewports, standard/large text), including dialog bounds, Escape and combat-shortcut blocking. This is a targeted recheck after the full 636-test suite, not another full-suite run.
  • Logs/campaign-delivery-build.log: delivered Windows development build succeeded with zero build errors. All 302 source/test/style files compared against the isolated validation project matched; git diff --check passed. The user's open Unity project and production package manifest were left intact.
  • The final executable passed three isolated-profile player scenarios: standard flow at 1366x768 (Logs/Smoke-Campaign-Delivery-Standard-99e338ddef5f4b8babed17cb4641fd81/), campaign victory at 1366x768 (Logs/Smoke-Campaign-Delivery-Victory-841a83b3086c444fa830cfb461fee647/), and endless continuation at 390x844 (Logs/Smoke-Campaign-Delivery-Endless-Narrow-4d57d7c8d2eb4ad18332e981f0ba3ccf/). Each records PASS; victory/endless checks include exactly-once reward/history settlement. Inspected live-panel captures include the boss, route/milestone choices, victory report, and wide/narrow execution previews. These are automated runtime-panel checks, not a manual desktop/input playthrough.

First-time training and quieter combat (2026-10-23, superseded by the two-wave flow below)

  • Normal runs no longer display the encounter-advice banner or automatically open the first-battle guide. The optional ? guide, execution-preview foldout, rules on cards, status inspection and journal remain. Combat hover help no longer duplicates card rules and the full numeric derivation; conditional estimates use one short caveat. Redundant Utility / see rules preview labels are omitted.
  • Confirming a starter on a new profile enrolls it in required training in the same saved transaction. Training launches without run setup; returning to the menu or reopening the game routes an unfinished profile back to its current lesson. Existing saves without the new enrollment flag are not forced through training or reset. Save-envelope schema 4 protects the new progress fields from older builds.
  • TutorialCampaign defines nine real practice encounters and short, scrollable instruction pages: Native dispatch/resources, Python FIFO/Memory Leak, Haskell LIFO/Fork Bomb, firewalld/Cron Job/repository, Race Conditions/Segfault, Daemon/Rootkit, Kernel Panic/Telemetry Collector, DRM Guardian/recovery, then Kernel Overseer/campaign rules. All 14 enemy archetypes appear. Explanations describe the actual combat implementation, including Rootkit's ally-dependent damage resistance and Segfault's death payload.
  • TutorialFlow owns the focused lesson dialog, practice gating, free retries and progress commits. Instruction pages block combat input. Each encounter requires a real clear and practice of its required track; the repository lesson also requires a real offer purchase. Completion is saved before advancing or returning to the menu; a failed write leaves a retryable action. Quitting repeats only the current lesson, not the entire sequence; in-flight tutorial battles are not normal run checkpoints.
  • Training uses the chosen distro's version-1 passive, no packages, and disclosed loan decks with at least 60 Uptime, 6 RAM and 4 Cycles. Each lesson resets health/deck and grants sandbox Bits. Training does not change card ownership, normal run loadouts/checkpoints, history, best waves, Bandwidth or Entropy. Buying a training offer is practice only and does not carry into the next loan deck.
  • The development player smoke now completes training before its normal regression workflow. --kernel-panic-tutorial-smoke stops after training and a clean normal-run launch; use it with --kernel-panic-smoke and an unused isolated --kernel-panic-save-path. It verifies required onboarding, all nine encounters, real track plays, a purchase, lesson-two resume through the actual menu, completion and no normal-run settlement. Automated playthrough coverage currently uses Ubuntu; all new tutorial/unit/layout checks run in the full suite.
  • Logs/tutorial-verified-tests.xml: 645 passed, 0 failed, 0 skipped. The first pass's single failure was an old layout assertion requiring verbose calculation tooltips; the updated test requires concise hover help while existing preview-math tests remain intact. Logs/tutorial-build.log built with zero errors. Initial tutorial smoke passed at 1366x768 and 390x844, and Logs/Smoke-Tutorial-Regular-ad8eb52c9c41462d84cf59f660f6a102/ passed the full post-training flow (purchase, save/resume, archive/build inspection, both retries, natural defeat and settlement), all with exit 0. Captures are automated live-panel verification, not a manual input or desktop-compositing playthrough.
  • Visual QA tightened the tutorial into a centered, width-limited dialog with separation between scrollable copy and fixed controls. Logs/tutorial-delivery-tests.xml reran the complete suite: 645 passed, 0 failed, 0 skipped. An intermediate targeted run had one pile-browser PageDown failure; the complete rerun passed that check without changing its implementation or tolerance. After a final text-only correction distinguishing the Race pair bonus from survivor enrage, all 8 tutorial tests passed again (Logs/tutorial-final-content.xml).
  • Logs/tutorial-final-build.log: final Windows build succeeded with zero errors. The delivered executable's fresh-profile tutorial smoke passed with exit 0 at both 1366x768 (Logs/Smoke-Tutorial-Final-Wide-66fe3fc5aeae47679e5d9d2eb8d1cf15/) and 390x844 (Logs/Smoke-Tutorial-Final-Narrow-e053b614bac248d6af3ea098673bd57b/). Both include all nine encounters, resume, purchase, completion and a normal run with no automatic instructional banner/guide. The open working editor and production package manifest were not changed by validation.

Run variety, build rewards, resource flow and sound (2026-10-24)

  • New campaigns select one of three authored encounters per stage with a stable seed/wave mixer. Route previews do not consume either RNG stream. Elite escorts have veiled, armored (+6 starting Shield) or hardened (+4 Uptime) variants, disclosed before departure. Race pairs and the wave-five boss remain intact. Older checkpoints keep their original encounter rules.
  • Waves two and four offer one run-only reward: +2 effect magnitude on a selected card, a first +1 draw rider on a selected card, or 8 Bits. Card selection uses visible Previous/Next controls. Departing requires a choice; repository saves preserve pending/claimed state. Claiming twice, claiming during combat/suspension and targeting a removed card are rejected. New checkpoint version: 3; save envelope: 6.
  • The hand-header draw control performs prefetch: spend 2 Cycles to draw 1, once per turn, with 2 free RAM required so any possible top card fits. It uses the ordinary deck/discard order, preserves locks/corruption, and is unavailable during training, transitions or repository visits. Package values are unchanged.
  • Combat audio observes dispatch, deferred resolution, hits, shield breaks, revival, wave clears and run outcomes. Short synthesized clips need no external audio assets. Settings includes a persisted volume/mute control. Cues are rate-limited and never consume RNG or delay gameplay.
  • Previously untracked tests, editor tools and asset metadata are staged with the implementation. Validate-Checkout.ps1 checks tracked metadata and exports the Git index to an isolated project before testing/building. It supports reuse of the complete installed package cache without changing the manifest or lock file. Recovery scenes stay local. The GUID audit found 353 tracked metadata GUIDs and no duplicates.

Validation artifacts live under Logs/NextImprovements/ (ignored by Git). editmode.xml records 656 passed, 0 failed, 0 skipped. Screenshot review then prompted presentation fixes; delivery-layout.xml rechecks all combat layouts and the Gentoo scheduler across viewport/text-size combinations: 13 passed, 0 failed, 0 skipped. final-build.log records a successful Windows player build with zero build errors. The initial full run exposed two dispatch layout regressions; both were fixed. A subsequent text-height assertion caught a too-short prefetch button and was also fixed.

The final executable passed Final-Campaign-Wide/ at 1366x768, Final-Endless-Narrow/ at 390x844, and Final-Regular/ at 1366x768, all with exit 0. These cover training, both build rewards through real buttons, campaign victory, endless continuation, purchase, checkpoint resume, archive/retry flows and exactly-once settlement. Inspected live-panel screenshots confirm the reward target and navigation are readable and the end-turn button retains its full dispatch width. These are automated player/UI checks, not a manual input or audio-listening session. The delivered development player is Builds/NextImprovements/KernelPanic.exe; keep its adjacent data and DLLs together.

The staged export's source, tests, styles and package manifests match the working project after normalizing Git line endings. Unity regenerated render-pipeline serialization in the disposable copy during build; those generated changes were not copied into the working project. The open editor and existing progression were left intact.

The balance reports in Balance-false/ and Balance-true/ each contain 54 measured runs and 18 exact replay checks: 18 loadouts, seeds 17/101/2027, level-5 packages where equipped, no shopping, repair routes, a five-wave or 100-round cap. Both passes use the same new encounters and take Bits at build rewards. The only policy difference is whether the bot attempts prefetch when it cannot play another card. All 36 replay checks matched and all measured runs reached five waves.

Metric Prefetch disabled Prefetch enabled
All builds: plays per round 2.67 3.13
All builds: unused Cycles per ended turn 2.01 0.65
Gentoo V5 Haskell/C + L5 zram: plays per round 2.60 3.96
Same zram build: unused Cycles per ended turn 7.00 3.25

These aggregate ratios use total plays/rounds and total unused Cycles/ended turns. This is a small bot sample showing improved card flow, not human win rates or proof of overall difficulty balance. Challenge routes, longer runs, more seeds and human playtests remain useful before package tuning. Use -balancePrefetch false/true to reproduce the comparison.

Two-wave, action-driven tutorial (2026-10-24)

  • This replaces the nine standalone lessons above. Training now follows one real run: clear wave one completely, purchase a real card upgrade in the repository, carry the build and remaining Uptime into wave two, then clear every remaining enemy to finish.
  • TutorialGuide advances from observed combat state. Wave one highlights Uptime, Shield, Cycles, RAM, card rules and enemy intent, then requires card selection before enemy targeting. The first Zombie Process has deterministic 6 Uptime, allowing the real Rust attack to demonstrate restart pending, next-round revival, Shield, and permanent defeat. Wave two introduces Memory Leak, firewalld, Python FIFO and Haskell LIFO with actual queued actions. Each wave ends with unguided combat practice.
  • TutorialSpotlight exposes only the relevant control while dimming the rest of the UI. Reading steps have Next; action steps cannot be skipped. Card, target, end-turn and surrender guards also exist in combat logic. On narrow screens, guided card steps temporarily give the hand the full lower area so the named card is readable. Normal runs keep their quiet workspace.
  • The shop guarantees one affordable real unwrap() magnitude upgrade; normal shops remain random. A separate tutorialCheckpoint atomically saves the purchased run before wave two. Quitting or losing wave two resumes that shop snapshot, preserving run identity, card upgrades, Bits and Uptime. It does not consume or overwrite activeRun, and tutorial encounters do not create normal run history or ordinary wave payouts.
  • Completing wave two grants 1,000 Bandwidth and 1,000 Entropy (the standard ten-pull cost). Balances, tutorialRewardClaimed, completion and checkpoint removal are saved in one transaction. Save failures remain retryable; repeated completion/re-enrollment cannot pay twice. Save schema is now 5. Legacy profiles are not automatically reset or re-enrolled.
  • Training uses a disclosed five-card loan deck, at least 60 Uptime / 6 RAM / 4 Cycles, and no distro passive procs to keep the demonstrations reliable. Card ownership and configured normal-run loadouts are untouched.
  • Verification: Logs/TutorialSteps-tests2.xml passed all 647 tests, including new targeting/revival, once-only rewards, failed-save retry and purchased-checkpoint checks. The development-player tutorial smoke passed at 1366×768 and 390×844, including real button actions, both full clears, purchase, menu-driven resume, exact rewards and a clean normal-run launch. Live-panel captures are automated UI checks, not a manual desktop playthrough. Additional narrow-card layout validation follows below.
  • Final validation: 648/648 tests passed (Logs/TutorialSteps-final-tests.xml); the focused tutorial/layout suite also passed 22/22 (Logs/TutorialSteps-targeted.xml). Logs/TutorialSteps-final-build.log reports a successful Windows build with zero build errors. The rebuilt player's 390×844 tutorial smoke passed (Logs/TutorialSteps-final-narrow-e527af6b32f843409112a60eba56ce43/), with the full attack-card face visually verified. Its 1366×768 full regression also passed (Logs/TutorialSteps-final-full-aed3f139bf1c4219802000aa475e1c32/): training followed by normal combat, purchase, save/resume, archive, retries, natural defeat and exactly-once settlement. Verification used isolated saves and an isolated Unity project; the user's current progression was not reset.