fix: close PI-140 cutover gaps

Back up unknown legacy Agents, reconnect settled Conversation observation, remove remaining active repository residue, and restore the bundled Python verifier import.
This commit is contained in:
2026-08-24 12:47:16 +08:00
parent 5a275b93a7
commit 7a15b1b49c
12 changed files with 286 additions and 247 deletions

View File

@@ -8,7 +8,7 @@
- Worktree: D:\Datas\OthersProjects\makelore-pi-remove-opencode-a41c9e72
- Base commit: 61fede2b4dfed3e29a6c4e37aee73896713979e1
- Owner: codex-root
- Status: Implementation Complete; Planner Review Pending
- Status: Needs Fix Addressed; Planner Re-review Pending
## Scope
@@ -77,9 +77,17 @@
bundle/smoke scripts, dependencies, and obsolete tests were removed.
- Retained only the migration-owned schema-v1 normalizer and expected generated
Agent comparison in `electron/coding-projects/legacy-v1.ts`. Migration keeps
exact-delete/backup/rollback/notice behavior, valid schema-v2 projects bypass
legacy reads, unrelated `.opencode` content remains inert, and no `.pi/agents`
directory is introduced.
exact-delete/backup/rollback/notice behavior: it enumerates the legacy Agent
directory, removes exact generated files, and moves modified plus unknown Agent
files into the timestamped backup. Valid schema-v2 projects bypass legacy reads,
unrelated `.opencode` content remains inert, and no `.pi/agents` directory is
introduced.
- Preserved the existing session-observation product behavior at the
vendor-neutral boundary. A live ordinary prompt that reaches the authoritative
completed settlement queues the final Coding Conversation Snapshot using the
project id and product Conversation id; hydrate/reconnect snapshots,
steer/follow-up, failed/aborted turns, and replies without assistant natural
language do not enqueue.
- Preserved compatibility identifiers `app.niancode.desktop`, `niancode`, and
the persisted electron-store name `opencode-projects`. The remaining source
references to OpenCode are categorized compatibility/history boundaries:
@@ -99,6 +107,10 @@
for its Provider protocol adapters. They are part of Pi's Provider package,
not the removed OpenCode runtime/package/plugin/fallback, and remain covered by
the explicitly accepted real-Provider qualification risk.
- Removed the unreferenced legacy session run machine and old `.gitignore`
exception, updated current repository guidance and the session-observation
integration guide to Coding/Pi, and restored the `node:path` import required by
the bundled-Python verifier.
## Verification
@@ -108,13 +120,19 @@
noise remains.
- `pnpm run typecheck`: passed, including after the pinned-pnpm dependency rebuild.
- `pnpm exec eslint . --quiet`: passed.
- Full unit suite: 174 files passed; 1491 tests passed, 2 skipped (1493 total).
- Full unit suite after planner fixes: 174 files passed; 1495 tests passed,
2 skipped (1497 total).
- Pressure suite: 1 file and 1 test passed.
- Focused migration/resource suite: 2 files and 9 tests passed, including the
valid-v2 no-legacy-read/no-generated-Agent-delete case.
- Focused post-review suite: 3 files and 33 tests passed for migration,
session-observation sync, and Conversation store settlement behavior. It covers
valid-v2 no-legacy-read, unknown/modified Agent backup, live ordinary-prompt
settlement, no hydrate/follow-up replay, and assistant-natural-language gating.
- Electron E2E: 3 tests passed for first Pi conversation latency/submit ordering,
Pi product UI, and bundled Skill project configuration.
- `pnpm run build:vite`: passed (Renderer, Electron Main, Preload, and utility).
- `node scripts/verify-bundled-python.mjs --root resources/python/win32-x64
--target win32-x64`: passed for Python 3.12.13 and stdlib after restoring the
required `node:path` import.
- Windows Pi bundle: passed with 130 production packages and 6 runtime assets.
- Staged Pi probe: local sessions, shell, abort, and concurrency passed; decision
intentionally remained `partial-pass` / `incomplete` because real Provider
@@ -128,10 +146,18 @@
- Product-package Pi probe: local surface passed; cold p95 638 ms and warm p95
626 ms. Decision intentionally remained `partial-pass` / `incomplete` because
the Provider matrix has `realTurnVerified: false`.
- Zero-residue scans passed for source/package metadata, `/api/opencode`, Windows
artifact paths, ASAR package names, and old runtime resource roots. The scan
separately categorized the upstream Pi Provider adapter filenames described
in Outcome rather than treating their text as a legacy runtime residue.
- Repository-wide zero-residue scan has no unclassified hit. Production hits are
limited to migration paths, persisted compatibility identifiers, packaging
exclusion, and the one-time notice; tests contain migration fixtures and
negative assertions; old task/evidence records remain history. Canonical
project-memory descriptions are explicitly listed below for PI-160 promotion,
as required by feature-worktree ownership. The Windows artifact/ASAR scan also
separately categorizes the upstream Pi Provider adapter filenames described in
Outcome rather than treating their text as a legacy runtime residue.
- Planner review of `61fede2..5a275b9` returned Standards/Spec Needs Fix for four
P1s: unknown Agent backup, silently disconnected session observation, repo-wide
residue, and the Python verifier import. The current post-review changes address
all four and await incremental planner re-review.
- `git diff --check`: passed; only the repository's existing LF-to-CRLF warnings
were emitted.
- macOS x64/arm64 validation was explicitly skipped and is not reported as Pass.