fix: harden AI design voice lifecycle

This commit is contained in:
2026-08-18 02:51:39 +08:00
parent 7fe5103f43
commit b2c902fa1d
3 changed files with 130 additions and 1 deletions

View File

@@ -473,6 +473,8 @@ Gate result:
- The merge keeps AI Design's Enter/Shift+Enter/IME composer contract and E2E Enter coverage, enables Works Speech voice input with 16 kHz mono WAV conversion, authentication retry, context-lifecycle cleanup, and an always-available stop control while other composer operations are busy.
- No canonical architecture, domain-rule, or decision promotion is required; the source task records no promotion candidate. Real microphone/Works-account smoke remains an external release validation item.
- This resumption is local-only. It does not fetch or push the remote; the existing Git credential follow-up remains unchanged.
- The final staged-merge review initially returned `FAIL` on two lifecycle/test gaps: a MediaRecorder-constructor failure could leave an acquired track live, and the 401 refresh/retry path lacked Canvas-specific regression coverage. The stream is now registered before recorder construction, and focused tests cover both constructor failure cleanup and stale-token → refreshed-token retry.
- The corrected merge is `7fe5103f43830e26f29693c61c177faca0812b85`, with `31fb4ff9e146304afcb5123a2dc3c0fb1b9bf5e1` as first parent and `1ba5b9cc84347bf37cf8a18148a1dcc6b88b3ad2` as second parent. The source task record is absent from `main`.
### 2026-08-18 AI Design Video Download Extension Integration Resume
@@ -640,6 +642,11 @@ Gate result:
- Post-review Electron E2E selection — 3/3 passed.
- Final context-compaction integration re-review — `PASS`; no remaining P0-P3 findings. The reviewer confirmed polling-idle completion precedes queue release, cold hydration requires a matching current running identity, `main` is clean, and merge/fix/documentation topology is correct.
- 2026-08-18 AI Design merged-main focused Vitest — 46/46 passed, including 401 refresh/retry and MediaRecorder-constructor track cleanup regressions.
- 2026-08-18 AI Design merged-main full Vitest with `--maxWorkers=4` — 176 files / 2120 tests passed. An unconstrained concurrent run had one known `opencode-manager` port-release timeout; its isolated file rerun passed 41/41.
- 2026-08-18 AI Design merged-main `pnpm run typecheck`, scoped ESLint, and `pnpm run build:vite` — passed; only existing mixed-import and chunk-size warnings remain.
- 2026-08-18 AI Design merged-main `check_project_docs.py`, integration `check_doc_drift.py`, task registry doctor, staged/unstaged whitespace checks — passed.
- 2026-08-18 video-download merged-main route regression — 1 file / 14 tests passed; `.mp4`, `.mov`, and `.webm` preserve their extensions and non-media MIME responses remain rejected.
- 2026-08-18 video-download merged-main focused selection — 3 files / 72 tests passed; typecheck and scoped ESLint for the route/test files passed.
- Merge topology and `git diff --check` passed for `31fb4ff`; the source task record is absent from `main`. The integration worktree retains unrelated staged AI Design input changes, so no clean-worktree claim is made.