docs: record AI design session freeze integration

This commit is contained in:
2026-08-19 00:36:09 +08:00
parent 64785910aa
commit d2c9a225e8
3 changed files with 41 additions and 86 deletions

View File

@@ -4,6 +4,7 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
## Integrated Through
- `6478591` / `3a6d388`: AI Canvas task-stream reconciliation now reuses an in-flight `connecting` Conversation stream instead of opening a duplicate; rapid Conversation-switching regression coverage is present. Canonical `main` promotion is pending release of the occupied main worktree, and real slow-handshake Electron smoke remains pending.
- `ce897f1` / `6504073`: AI Programming now isolates prompt lifecycle, loading and errors by OpenCode Session. Main serializes only runtime/configuration acceptance, verifies project Agent content against an owned fresh runtime generation before execution, and returns typed terminal pending responses without automatically restarting, reloading or disposing the shared runtime. A run that receives no explicit busy/assistant/terminal acknowledgement within 10 seconds ends only that Session and is never replayed automatically. The application-side isolation is verified; real bundled OpenCode/provider two-Session execution concurrency is not claimed.
- Project-cover source commit `145a6ce571d646325092d1e722282babea503954` from feature task `20260817-project-cover-upload-a6a98e56`, integrated by task `20260813-sync-push-main-9c2f71`. First submission now requires a bounded PNG/JPEG/WebP cover, shows preview/file/reselect feedback, and sends metadata plus cover through Main-owned `POST /api/projects/with-cover`; conflicts stop before version upload and existing draft/published projects remain version-only. The matching Works Square server source is `407c883` (local merge `0cedfc4`). No client package, production deployment, or real-account smoke occurred.
- `3b37ac3` / `55e61b7`: macOS Robot hotspot discovery performs one bounded worker-thread rescan after an empty or SSID-redacted CoreWLAN result; persistent SSID redaction maps to the existing permission error instead of a misleading empty-device state, while firmware and the open `Xiaozhi-*` contract remain unchanged.

View File

@@ -0,0 +1,40 @@
# Task: Integrate AI design session freeze fix
## Identity
- Task ID: 20260819-integrate-session-freeze-7c4e
- Mode: Integration
- Branch: codex/20260819-integrate-session-freeze-7c4e-integrate-session-freeze
- Worktree: D:\mk-merge-session-freeze-4c2e
- Base commit: 31332f6d766bd3733e6fbb9c07688765368c2fa0
- Owner: codex
- Status: Ready for integration
## Scope
- Integrate the reviewed client fix from feature task `20260819-makelore-session-freeze-7c4e` (`3a6d388`) into the client `main` base `31332f6`.
- Preserve the peer task `20260818-video-duration-server-config-7b4e` and its occupied canonical worktree; do not rewrite `main` or any unrelated source.
## Intent And Constraints
- Merge only the reviewed feature commit with a non-fast-forward integration commit; no reset, force update, stash, or destructive cleanup.
- Keep the feature task record immutable and record integration evidence only in this integration task and the canonical `current-state.md`.
- Leave the integration branch ready for promotion once the canonical `main` worktree is released by its owner.
## Outcome
- Created merge commit `6478591` (`merge: integrate AI design session freeze fix`) with no conflicts. The merge contains the source task record, the `connecting`-stream reconciliation fix in `src/stores/image-workspace.ts`, and its regression test in `tests/unit/image-workspace-store.test.ts`.
## Verification
- Source worktree verification recorded by the feature task passed: focused store tests 31/31, adjacent Canvas/workspace tests 78/78, scoped ESLint, TypeScript `--noEmit`, `git diff --check`, documentation drift, and independent Sol review PASS.
- Integration merge is clean and `git diff --check` is required after this record update. The isolated integration worktree initially lacked dependencies, so an additional dependency-backed integration test run is recorded separately if available; this does not invalidate the already-passing source verification.
## Follow-ups
- Canonical client `main` remains owned by `20260818-video-duration-server-config-7b4e`; after that task releases the worktree, promote `6478591` to `main` and rerun the focused verification on the canonical checkout.
- Perform a real Electron smoke with a deliberately slow event-stream handshake to cover the production timing boundary; this remains a follow-up from the feature task.
## Promotion Candidates
- `6478591` / `3a6d388`: update `current-state.md` under `Integrated Through` when the merge commit is promoted to canonical `main`.

View File

@@ -1,86 +0,0 @@
# Task: Fix AI design rapid session switching freeze
## Identity
- Task ID: 20260819-makelore-session-freeze-7c4e
- Mode: Feature
- Branch: codex/20260818-prompt-museum-client-4f7a-prompt-museum-client
- Worktree: D:\mk-4f7a
- Base commit: f8d82e6c19536bbd9bd7d70a72efbf7ec163aeb4
- Owner: codex
- Status: Ready for integration
## Scope
- Diagnose and fix the Makelore AI Design client freeze reported when a user
rapidly switches Conversations after login.
- Keep the change limited to the Renderer task-stream lifecycle and its unit
regression coverage; do not change the Works API or persistent Agent Session
contract.
## Intent And Constraints
- Preserve the existing Workspace + Conversation identity and generation
guards, including stale-stream isolation and REST reconciliation after the
Canvas effect is cleaned up.
- Do not issue a second event-stream open for the same active Workspace +
Conversation solely because reconciliation was requested while its stream
is `connecting`. An explicit Conversation selection may invalidate the old
identity and start the newly selected Conversation's stream. Only a known
`degraded` stream may be forced closed and reopened by reconciliation.
- Use a regression test that models an unresolved `openImageWorkspaceTaskEvents`
Promise, because the underlying connection attempt is not cancellable once
started.
## Outcome
- Confirmed the freeze mechanism: Canvas effect cleanup marks task-stream
reconciliation while the stream is still `connecting`; the next connect
call treated every non-`connected` state as broken, closed the logical
stream, and started another request. The old Promise could not be cancelled
and only closed its EventSource after eventually resolving, so rapid
switching accumulated concurrent connection attempts.
- Changed `connectTaskStream` to force a close/reconnect only for `degraded`
streams. An in-flight `connecting` stream is reused while Conversation and
task REST reconciliation still runs.
- Added a store regression test proving reconciliation does not issue a second
stream-open request while the first one is unresolved.
- Audited the adjacent Main SSE relay close timing; the existing `finally`
path closes a subscription after a response is already closed, and no
reliable red test proved an additional leak in this task, so no Main/API
change was made.
## Verification
- New regression before the fix: failed as expected (`openImageWorkspaceTaskEvents`
was called twice instead of once).
- `node_modules\\.bin\\vitest.cmd run tests/unit/image-workspace-store.test.ts
--reporter=dot` — passed, 1 file / 31 tests.
- `node_modules\\.bin\\vitest.cmd run tests/unit/image-canvas-page.test.tsx
tests/unit/works-square-design-workspace.test.ts --reporter=dot` — passed,
2 files / 78 tests. Existing React `act(...)` warnings were emitted by an
unrelated auth test.
- `node_modules\\.bin\\eslint.cmd src/stores/image-workspace.ts
tests/unit/image-workspace-store.test.ts` — passed.
- `node_modules\\.bin\\tsc.cmd --noEmit` — passed.
- `git diff --check` — passed.
- `check_doc_drift.py --task-id 20260819-makelore-session-freeze-7c4e` — passed.
- Independent Sol read-only final review — PASS. The review noted the
untested extreme A→B→A case where a deliberately stalled old open request
may later be replaced; that is retained as a separate follow-up rather than
part of the same-identity reconciliation race.
## Follow-ups
- Run a real logged-in Electron smoke test that alternates two or more
Conversations while the event-stream handshake is deliberately slow; local
unit tests prove the duplicate-open race but do not validate a deployed Works
gateway or production network behavior.
- If production telemetry later shows a WebSocket handshake that never
resolves, track a separate cancellation/timeout task instead of coupling it
to this Renderer race fix.
## Promotion Candidates
- None. The fix restores the existing client stream-lifecycle invariant and
does not introduce a new architectural decision or canonical contract.