# Slice 22.1 – Setup-integrated FLUX recovery

## Confirmed incident

The 7-Zip process completed successfully with `Everything is Ok`, 54,878 files
and about 4,038 MB extracted. Windows PowerShell 5.1 nevertheless exposed an
empty `Process.ExitCode`, which the previous installer treated as a non-zero
failure.

## Recovery contract

The setup startup recovery activates only when all of these conditions match:

1. `install-state.json` is `failed` and `can_resume=true`.
2. The stored message contains the empty 7-Zip exit-code failure and
   `Everything is Ok`.
3. The 7-Zip stderr log is empty.
4. The stdout log contains the success marker.
5. The extracted portable tree contains both `ComfyUI\main.py` and
   `python_embeded\python.exe`.
6. No matching installer or 7-Zip process is still active.
7. The final ComfyUI target is not already installed.

The user starts only `setup.bat`. Setup then offers to continue automatically.
The complete extraction is reused; no repeat extraction or project reset occurs.

## Required Windows acceptance

- Run the provided one-click updater.
- Let the updater parser-check and back up the three affected files.
- Allow the newly launched `setup.bat` to continue the detected installation.
- Confirm the log contains `Vollständiger temporärer ComfyUI-Entpackstand wird wiederverwendet`.
- Confirm ComfyUI, Python, workflow, model and start/stop scripts are present.
- Confirm `http://127.0.0.1:8188/system_stats` is reachable after startup.
