5.6 KiB
5.6 KiB
Task: Fix persisted Pi session reopen and build Windows installer
Identity
- Task ID: 20260825-pi-session-reopen-installer-8c3e7a91
- Mode: Feature
- Branch: codex/20260825-pi-session-reopen-installer-8c3e7a91-pi-session-reopen-installer
- Worktree: D:\Datas\OthersProjects\makelore-pi-session-reopen-installer-8c3e7a91
- Base commit:
e74b59a674 - Owner: codex-root
- Status: Implementation
Scope
- Fix the packaged Pi runtime path that opens generation 1 without the Conversation's already persisted Pi session binding after an application restart or later re-entry.
- Add focused regressions proving the managed opener reuses the Registry
binding when
PiWorkerPooldoes not provide an explicitexistingSession, while a genuinely new Conversation still creates one binding. - Build and verify a Windows x64 NSIS installer from the cumulative hotfix base
e74b59a67479a32619a9e3dbef476a65a6ad071fplus this repair.
Intent And Constraints
- Preserve the user's existing Pi JSONL and Conversation metadata. Do not delete, rewrite, migrate, or silently replace a persisted binding.
- Derive the effective reopen binding from the explicit worker-pool binding or
the Main-owned Registry record, in that order. Keep the existing
CODING_SESSION_UNREADABLEmismatch checks fail-closed. - Keep the repair inside the existing Pi managed opener/Registry boundary; do not add a fallback runtime, compatibility layer, or product migration.
- Preserve new-Conversation allocation and fork semantics, and report a Registry-backed reopen as warm telemetry.
- The previously diagnosed thinking-level submission stall is a separate task with no accepted implementation. Do not mix an unverified fix into this installer.
- Use pinned pnpm
10.33.4, focused tests, full repository checks,build:vite, Windows Electron E2E, formal Windows packaging, and final artifact/runtime verification. - Real Provider verification remains
Explicitly Waived / Accepted RiskwithrealTurnVerified=false; loopback/package evidence is not a real Provider Pass. macOS and native non-WSL Linux evidence status is unchanged.
Project Context Loaded
- Concurrent Task Gate: Passed in the isolated worktree owned by
codex-root; the task record, branch, worktree, and base commit match the registry. - Planning Gate: Passed after reading the project entry/memory indexes, current state, architecture/data-flow/evidence/commitment records, the installed session-unreadable diagnosis, the cumulative Windows proxy hotfix, the thinking-stall diagnosis, PI-150 packaging evidence, and all peer records still marked planning or blocked.
- Canonical current-state documents predate the cumulative Pi delivery. The current source, diagnostic evidence, hotfix task record, and cumulative release-proof record are authoritative for this repair.
- Other planning tasks are on older or unrelated AI Design/Robot/OpenCode baselines. The main-worktree OpenCode integration task is blocked and does not package; no unresolved semantic conflict or code-write overlap changes this plan.
- No subagents are used, per user direction and repository policy.
Plan
- Add a focused red regression for a Registry-persisted binding with no
explicit
existingSession, including session-id argv and warm telemetry. - Make the managed opener use one effective binding consistently for session selection, fork rejection, reopen mismatch validation, and telemetry.
- Run focused Pi tests, typecheck, lint, full unit tests,
build:vite, and Windows Electron E2E; fix only task-caused failures. - Commit the clean candidate, build the Windows NSIS, and run final Windows artifact/Pi/runtime/package smoke checks, including persisted-session reopen and fresh-Conversation binding behavior.
- Record the final installer path, size, SHA-256, exact evidence, and remaining accepted/deferred risks; complete the task documentation gate.
Outcome
- Implemented one effective reopen binding in
createPiManagedWorkerOpener: explicit worker-pool binding first, otherwise the persisted Registry binding. Session-key selection, reopen/fork validation, Pi session-id mismatch checks, and cold/warm telemetry now use that same binding. - Preserved the existing post-open Registry mismatch guard and session-file containment checks. No user session, Conversation schema, or migration path changed.
- Extended the managed opener regression to simulate a process restart with a
fresh
PiSessionRegistry: the persisted binding is reused without invoking the new-session key generator, while the original first-open path still creates exactly one binding. - Windows packaging and final artifact verification remain in progress.
Verification
- Frozen install with pinned pnpm
10.33.4: passed; lockfile unchanged. - Red regression before implementation: failed at the exact existing
Pi session binding does not match the Conversation registrybranch. - Focused managed opener/Registry/runtime/worker-pool suite: 4 files / 23 tests passed after the repair.
corepack pnpm run typecheck: passed.corepack pnpm run lint:check: passed with 0 errors and five pre-existing Renderer warnings.corepack pnpm test: passed; 178 primary files / 1512 passed / 2 skipped, plus the isolated REN-008 pressure test 1/1.corepack pnpm run build:vite: passed with only existing advisory warnings.corepack pnpm run test:electron:windows: 2 files / 4 tests passed.git diff --check, task ownership drift, and required project-doc checks: passed before packaging.
Follow-ups
- None recorded.
Promotion Candidates
- None recorded.