# NEW-USER-REAL-ZIP-QA-2026-07-07

## Scope

This report covers the red-team P0-1 remediation: a true new-user launch from the extracted release zip, not from the development `dist\` directory.

## Preconditions

- Release zip under test: `D:\MagicPhoto\release\EchoCapsule-v6.3-PR7-Windows-unsigned-f3410a0.zip`
- Extracted test directory: `C:\Temp\EC-RC`
- Existing AppData directory was backed up before launch:

```text
%APPDATA%\EchoCapsule -> %APPDATA%\EchoCapsule.backup-pr7-20260706-234358
```

- Launch command used the extracted zip path:

```text
C:\Temp\EC-RC\EchoCapsule.exe
```

- Running process path observed:

```text
C:\Temp\EC-RC\EchoCapsule.exe
```

## First-launch state proof

Initial `/api/state` was captured before adding any source:

```text
generation=0
photo_dir=""
export_dir=""
folder_count=0
has_library=false
paths_valid=false
system_ready=false
scan_stage=loading
build_status=loading
```

The key proof is `has_library=false` plus `photo_dir=""` on first launch from `C:\Temp\EC-RC\EchoCapsule.exe`. That shows the app did not attach to the existing `D:\MagicPhoto` development library.

## Actual creation paths

After first launch and adding `C:\Temp\EC-RealPhoto-QA`, runtime files were observed in the extracted zip directory:

```text
C:\Temp\EC-RC\library\
C:\Temp\EC-RC\thumbs\
C:\Temp\EC-RC\static\
C:\Temp\EC-RC\core.js
C:\Temp\EC-RC\index.html
C:\Temp\EC-RC\tailwind_cache.css
C:\Temp\EC-RC\metadata_cache.json
C:\Temp\EC-RC\photos_new.json
C:\Temp\EC-RC\footprints.json
C:\Temp\EC-RC\scan_status.json
C:\Temp\EC-RC\export_overlay.json
```

Fresh AppData files were created during the isolated new-user run:

```text
%APPDATA%\EchoCapsule\authority.db
%APPDATA%\EchoCapsule\runtime_error.log
%APPDATA%\EchoCapsule\crash.log
```

After QA, the original AppData directory was restored. The paths above describe the isolated test run, not the user's restored day-to-day AppData contents.

## Results

| Check | Result | Evidence |
|---|---|---|
| First launch from extracted zip path | PASS | Process path was `C:\Temp\EC-RC\EchoCapsule.exe` |
| Browser/local app reachable | PASS | `http://127.0.0.1:8088/api/state` responded |
| Initial new-user state | PASS | `photo_dir=""`, `folder_count=0`, `has_library=false`, `system_ready=false` before adding source |
| AppData initialized | PASS | `%APPDATA%\EchoCapsule\authority.db`, `runtime_error.log`, `crash.log` created |
| Runtime files beside EXE | PASS | `C:\Temp\EC-RC` created `library`, `thumbs`, `core.js`, `static`, `index.html`, `tailwind_cache.css`, `scan_status.json` |
| Add real photo folder | PASS | Added `C:\Temp\EC-RealPhoto-QA` through `POST /api/folders` |
| Scan complete | PASS | `scan_stage=done`, `build_status=idle`, `system_ready=true`, `photo_count=6`, `folder_count=1` |
| Mark + export | PASS | Export moved 1 selected JPG to `C:\Temp\EC-RealPhoto-QA归档\珍藏\2013-01-02_12-51-27_562.jpg` |
| Restart continuity | PASS | After restart, folder `f_14f35541`, `photo_dir`, `export_dir`, and `exported_ids=[e86f174f19b7]` persisted |
| Console: ReferenceError | PASS | Not observed |
| Console: FolderStore is not defined | PASS | Not observed |
| Console: isCommitted is not defined | PASS | Not observed |
| Page console errors/warnings | PASS | Browser-captured page logs returned 0 error/warn entries |
| runtime_error.log | PASS | 0 bytes during isolated new-user run |
| crash.log | PASS | 0 bytes during isolated new-user run |

## Detailed evidence

After adding `C:\Temp\EC-RealPhoto-QA`:

```text
folder_id=f_14f35541
alias=EC-RealPhoto-QA
scan_stage=done
build_status=idle
system_ready=true
photo_count=6
folder_count=1
```

Export request moved one file:

```text
moved=1
moved_files=[2013-01-02_12-51-27_562.jpg]
exported_ids=[e86f174f19b7]
```

Restart state retained:

```text
photo_dir=C:\Temp\EC-RealPhoto-QA
export_dir=C:\Temp\EC-RealPhoto-QA归档
folder_count=1
exported_ids=[e86f174f19b7]
scan_stage=done
build_status=idle
```

## Observation

The exported file was physically moved and `exported_ids` persisted. The library API still reported the historical indexed count after export. This report records the behavior honestly; it was not caused by launching from the development tree, and it did not block the packaging remediation because export side effect, persistence, logs, and console checks passed.

## Conclusion

**PASS** for true new-user extracted-zip path QA. The previous NEW-USER-QA based on `D:\MagicPhoto\dist\EchoCapsule.exe` should not be used as release evidence.
