v0.141.0: F6 initialize-to-usable (detached crash-safe init job + status poll) + F7 Vissza back-routes
- F6: POST /api/storage/init runs format→mount→register as a DETACHED single-flight job (context.Background, netAddState shape) the wizard polls via GET /api/storage/init/status; 3-step progress; register-last marker-last crash-safety. Fixes the client-disconnect-aborts-mount bug. No agent change (chain reaches FileBrowser sync = controller-only). Red-proof TestStorageInit_DetachedSurvivesClientDisconnect. - F7: storage_init/attach Vissza → /storage (was /settings). Test TestStorageWizardBackAnchors_PointToStorage.
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
## Changelog
|
||||
|
||||
### v0.141.0 — N100 polish: initialize-to-usable (F6) + Vissza back-routes (F7) (2026-07-17)
|
||||
|
||||
Closes two `VALIDATION-n100-baremetal-2026-07-16.md` findings. Green:
|
||||
`go build ./... && go vet ./... && go test ./...` all pass; template/emoji/native-confirm gates pass.
|
||||
|
||||
- **F6 (MEDIUM) — drive "initialize" now ends in a USABLE (mounted+registered) drive, disconnect-safe.**
|
||||
Root cause (fork verdict, source-grounded): the format→mount→register orchestration
|
||||
(`internal/web/storage_handlers.go` `runStorageInit`) ran on the REQUEST context; a closed tab /
|
||||
lost connection cancelled it after `FormatDisk` (the agent's mkfs continues detached, returns
|
||||
`errFormatClientGone`), so the mount+register leg was aborted — device formatted but
|
||||
unmounted/unregistered (the N100-observed state). The chain must reach `SyncFileBrowserMounts`
|
||||
(controller-only), so it stays controller-side — **no agent change**. Fix: `POST /api/storage/init`
|
||||
starts a DETACHED single-flight job (`internal/web/storage_init_job.go`, the `netAddState` shape) on
|
||||
`context.Background()`; `runStorageInit` gains a nil-safe phase callback (formatting → mounting →
|
||||
registering). The wizard polls the new `GET /api/storage/init/status` and renders the 3-step
|
||||
progress (`storage_init.html`); the confirm/refuse verdicts surface through the same poll. Register
|
||||
is the LAST step (marker-last, Scenario B) and every prior step is idempotent (`AddStoragePath`
|
||||
dedups) → a crash leaves at most an unregistered orphan, never a broken/duplicate registration.
|
||||
Red-proof `TestStorageInit_DetachedSurvivesClientDisconnect` (pre-fix: cancelled-ctx chain fails at
|
||||
mount, NOT registered → FAIL; fixed: detached job registers exactly once).
|
||||
- **F7 (LOW) — the "Vissza" (Back) anchor on `/storage/init` and `/storage/attach` now routes to
|
||||
`/storage`** (was `/settings`). The init success link also points to `/storage` (where the new
|
||||
drive appears). Test `TestStorageWizardBackAnchors_PointToStorage`.
|
||||
|
||||
### v0.140.0 — Direction-2 immediate-sync: hub→box wait channel client (2026-07-16)
|
||||
|
||||
The other half of the immediacy arc (Direction 1 = v0.139.0 box→hub trigger). An operator action on
|
||||
|
||||
Reference in New Issue
Block a user