5.7 KiB
5.7 KiB
Task: Diagnose recurring Coding session stall
Identity
- Task ID: 20260903-diagnose-recurring-stall-a83f5c21
- Mode: Feature
- Branch: codex/20260903-diagnose-recurring-stall-a83f5c21-diagnose-recurring-stall
- Worktree: /Users/inmanx/Documents/makelore-diagnose-recurring-stall-a83f5c21
- Base commit:
301c1496b0 - Owner: codex
- Status: Completed
Scope
- Diagnose the recurring visible
处理中state in the installed macOS app for project肉鸽2.0, including the active Pi logical thread that began around 09:51 on 2026-09-03. - Verify whether the installed artifact actually contains the previously integrated terminal-settlement and Bash tool-bridge fixes.
- Correlate the screenshot with the installed Main log, persisted Conversation/Pi session, target process state, and any active tool child before deciding whether this is useful work, a tool wait, a Provider failure, or another settlement gap.
Intent And Constraints
- Keep diagnosis-time live inspection read-only: do not abort the target run, replay the accepted prompt, or mutate user project/session data. For the user's later explicit launch request, replace the old installed process only by a graceful quit after confirming the target had no remaining runtime/tool child; do not force-kill it.
- Preserve ADR-006 target-only failure and no-replay semantics.
- Do not touch the occupied
mainworktree or its uncommitted packaging changes; perform any source change only in this isolated worktree after evidence identifies a concrete defect.
Outcome
- Confirmed that this recurrence was not an active model or Bash wait. The target
Pi JSONL persisted an assistant terminal entry with
stopReason: "aborted"anderrorMessage: "Request was aborted"at 09:52:24 local time. Electron Main then completed the same Conversation with the intentionalproject_deactivatedreason at 09:52:33. The remaining Agent Server was idle at 0% CPU with no tool child or network socket while Renderer still showed处理中. - Confirmed the installed app already contains the earlier Bash write-lease and
bounded terminal-settlement corrections. This incident instead repeated the
foreground recovery gap documented by task
20260902-check-session-after-bash-fix-a6d12f39: Renderer retained a cachedliveSnapshot after Main had stopped the target, and selecting an already selected Conversation skipped authoritative Snapshot hydration. - Changed Conversation selection to always reconcile with Main. Existing live state refreshes silently, while cold and invalidated targets keep their prior loading/recovery behavior. Accepted or uncertain mutations are not replayed.
- Coding Chat now closes its old event stream on Main's
lifecycle:sleep, refreshes the selected Conversation when the window becomes visible or focused, and refreshes a still-selected Conversation once when the programming view is mounted or its project context changes. A project/Conversation selection key prevents duplicate hydration caused by the selection render itself. - Added store, Renderer, and Electron regressions that begin with a stale running Snapshot and verify that foreground recovery displays the persisted aborted terminal state without posting a prompt.
Verification
- Correlated screenshot time, installed Main log, project registry, Conversation metadata, target Pi JSONL, and live PID/process/socket state. The durable turn ended before the visible timer continued; no running tool process remained.
- Installed
app.asarcontainsstate_probe, the bounded terminal-settlement failure string, andPROMPT_FAILED_AFTER_ACCEPTANCE, confirming the prior fix was packaged in the inspected app. - Focused Vitest:
45 passedacrosscoding-conversations-store.test.tsxandcoding-chat-panel.test.tsx. - Full Vitest:
1736 passed,3 skippedacross 213 test files, including the single-worker pressure suite. - Focused Electron E2E:
foreground focus rehydrates a terminal Snapshot after lifecycle sleeppassed. - TypeScript
tsc --noEmit, scoped ESLint, productionbuild:vite, andgit diff --checkpassed. Fulllint:checkpassed with five pre-existing warnings and zero errors. check_project_docs.pyand task-awarecheck_doc_drift.pypassed.- The old installed app was gracefully quit after confirming no target Agent
Server or tool child remained.
pnpm run devthen started the repaired worktree successfully, with the Renderer on port 5173 and Electron using the existing Makelore user-data directory.
Follow-ups
- Integrate this feature branch after the occupied
mainpackaging worktree is available, then rebuild/reinstall the macOS artifact. The currently installed/Applications/Makelore.appremains the older build; the repaired behavior is available from this task worktree for development verification.
Promotion Candidates
- Target:
README.md,20-architecture/data-flow.md, and30-worklog/current-state.mdduring Integration Mode. Proposal: record the Renderer foreground rehydration contract: lifecycle sleep closes the old Coding event stream, and view mount, project reselection, visibility, or focus reconciles the selected Conversation from a Main-owned Snapshot without replaying accepted mutations. Evidence: focused store/Renderer tests, real IPC Electron E2E, and the two installed-app stale-running incidents documented by this task and20260902-check-session-after-bash-fix-a6d12f39. Future impact: any new Coding navigation or lifecycle surface must preserve the same terminal-state reconciliation and no-replay behavior. Human confirmation: not required; this promotes implemented behavior without changing ADR-006 ownership or product direction.