Stabilization batch 04¶
Scope: GAME-15, stage scene/progression identity and its existing unlock behavior. No new stages, difficulty rules, character rewards, or other features.
Trace and reproduced defects¶
Bootloader's actual AppInitiator.levels contains Meadow, Crystal Mine, Snowdrift Vale, with the same three assets referenced by MainMenu's level buttons. Their difficulty IDs start with 1_, 2_, and 3_. The build scene list contains Bootloader/MainMenu before Arena Stage 1/2/3, so arena build indices are 2/3/4. The former asset stageIndex values were 2/3/3.
The same field controlled scene loading, reward flags, and progression indexing. Adding Bootloader shifted scene positions (history: 0e5f9dd9), but these three meanings could no longer share one number. The baseline checks reproduced Snowdrift Vale resolving to Arena Stage 2, a Medium-clear exception for Meadow, missing Medium unlocks for Crystal Mine/Snowdrift Vale, and wrong later-difficulty unlocks.
Only the three active stages are in the boot catalog. Unavailable Resources Stage 4/5 are not next-stage targets in this path. charToUnlock is unassigned for Meadow and Crystal Mine; a clear must not assume a character reward always exists. The original early return at the final catalog position also prevented that stage's own difficulty/character unlocks.
Correction¶
- Restore active progression indices to 1/2/3, consistent with catalog order, persistent difficulty IDs, and reward-array positions.
- Add explicit
LevelData.sceneNamevalues for the three arenas; both initial play and retry use the name. The existing Experimental asset also namesExperimentalso retry does not depend on its sentinel index 99. Its availability/catalog/build-inclusion policy is unchanged. - Resolve unlock targets from the current stage's actual catalog position. Grant its own existing rewards even without a next stage; skip an unassigned character reward safely. Medium/Hard/Insane rules are otherwise retained.
Scene lists, menu/boot scene files, stage GUIDs, names, difficulty IDs, spawn schedules, reward assets/weights, and saved-data keys are unchanged. No save migration or reset is introduced; potentially incorrect past progression is not reconstructed by these changes.
Verification¶
The existing Editor runner is split into two partial-class files to keep this focused fixture separate. RunBatch04 reads the real boot catalog through an Editor preview scene without entering Play Mode. It clones each stage/assigned character, clears only clone unlock flags, substitutes temporary catalog/session references, and invokes the production GameManager.UnlockStage. Original references are restored and temporary objects destroyed in finally.
GameDataLoader.IsLoaded is temporarily false so SaveResources returns before save access. Its warning is expected in these checks, not a failed assertion. Real assets/player saves are not written, and Steam/backend startup is not invoked.
| Check group | Before | After |
|---|---|---|
| Boot catalog progression order and persistent difficulty-ID correspondence | FAIL: Meadow index 2 instead of 1 | PASS |
| Every available stage resolves to its own enabled arena scene | FAIL: Snowdrift Vale selects Arena Stage 2 | PASS |
| Meadow Medium clear: own Hard, next Easy/Medium, optional character, no unrelated unlocks | FAIL: null-reference exception | PASS |
| Crystal Mine Medium clear with no character reward assigned | FAIL: own Hard not unlocked | PASS |
| Final-stage Medium clear, including its character reward | FAIL: own Hard not unlocked | PASS |
| Hard and Insane clears on all three stages | FAIL: Meadow Hard changes wrong stage | PASS: all six stage/difficulty combinations |
| No boss defeat | PASS | PASS: all three stages remain unchanged |
Baseline: Batch 04: 1/7 checks passed., Editor exit 1 / CLI exit 6. Correction: Batch 04: 7/7 checks passed., CLI/Editor exit 0. Both runs used Unity 6000.2.8f1 on Linux with -nographics -buildTarget Linux64 -executeMethod TinyChaos.EditorTools.StabilizationChecks.RunBatch04. Temporary logs: /tmp/tinychaos-batch04-before.log and /tmp/tinychaos-batch04-after.log; raw logs are not committed.
Both runs report known CS8785 generator warnings; no C# compilation errors were found. Scene-destination checks compare the legacy numeric destination before the patch and the configured named destination afterward against the real enabled scene list. They do not load arenas or execute the actual start/retry UI; both production callers were inspected for the destination change. Experimental's existing scene destination was inspected, not exercised in a run.
Unity-generated package changes were reviewed and restored to exact captured pre-batch bytes. Existing batch-02/03 changes, audio deletion, and .plastic deletion/backup/log state were preserved. Original source/asset line endings and existing metadata are retained.
Remaining acceptance and checkpoint¶
GAME-15 is fixed with content/method evidence. Actual scene transitions, stage visuals, complete clears/retries, the resulting reward pools, and save/reload on an existing player profile still require candidate player checks. Linux rendered-player and Windows IL2CPP validation remain pending; the menu freeze is unresolved. The architecture reference owns the maintained identity/workflow explanation.
This completes one focused batch. The overall stabilization goal remains unfinished; wait at the owner's next check-in before another batch.