Files
makelore/.project-docs/30-worklog/tasks/20260824-pi-release-proof-3e725ac7.md
T

178 lines
10 KiB
Markdown

# Task: Implement PI-150 packaging, E2E, and performance proof
## Identity
- Task ID: 20260824-pi-release-proof-3e725ac7
- Mode: Feature
- Branch: codex/20260824-pi-release-proof-3e725ac7-pi-release-proof
- Worktree: D:\Datas\OthersProjects\makelore-pi-release-proof-3e725ac7
- Base commit: 977445ba450f4ad32b6e6db2caf048517513ab39
- Owner: codex-root
- Status: Ready for Planner Re-review (platform release blockers remain)
## Scope
- Implement and verify `PI-150 — Packaging, E2E, and performance release proof`
from cumulative PI-140 delivery base `977445b`.
- Own final Pi production-closure staging, electron-builder wiring, artifact
verification, actual packaged Pi/provider-shaped smoke, Coding Electron E2E,
performance evidence, release note/runbook draft, and README current-state
updates.
- Produce Windows x64 and Linux x64 final-product artifact evidence available
from this host. Keep canonical `.project-docs` updates for PI-160 Integration
Gate; this feature record contains the task-scoped evidence and promotion
candidates.
## Intent And Constraints
- Preserve Main-owned runtime/provider/credential boundaries, the exact pinned
Pi package and pnpm versions, Makelore app identity, project-scoped state, and
the single light product system.
- Final artifact checks must prove Pi version/engine/entry/resources/production
closure/`get_state`, extension and skill presence, no OpenCode production
residue, and no development-machine absolute path.
- `smoke:pi:real` means the actual Pi process seam from the final artifact using
controlled loopback/provider-shaped endpoints. Real external Provider
Accounts and real-provider two-worker turns are explicitly waived accepted
risks, never Pass; every substitute report retains
`realTurnVerified=false`.
- The user explicitly skipped macOS validation. Do not manufacture or reuse
static/cross-platform evidence for macOS x64 or arm64. Their missing final
artifact, closure/native/resource, loopback, and performance evidence remains
an explicit release blocker, so this task cannot claim cross-platform
release-ready or PI-150 Done.
- The canonical project memory at this base is stale and still describes
OpenCode. Treat the planner-owned PI Spec/ticket and current source as the
task authority; do not edit canonical memory in this feature worktree.
- The main worktree is occupied by an older integration task. Remain rooted in
this isolated worktree and do not inspect or modify peer uncommitted files.
## Plan
1. Audit the cumulative PI-140 tree against every PI-150 packaging, smoke,
E2E, performance, release-note, and README requirement; reuse only verified
existing seams and identify concrete missing behavior.
2. Implement focused missing harnesses/wiring/tests with behavior-level
regression coverage, then run typecheck and relevant unit tests.
3. Run the full pinned validation set and build the Windows x64 final product
artifact; run its verifier, actual packaged Pi/provider-shaped smoke, and
required performance scenarios with structured statistics.
4. Use WSL2 only if available to perform a frozen Linux x64 install, final
product build, verifier/smoke, and performance run; label any environment or
artifact limitation precisely.
5. Record reproducible commands/results, accepted Provider risk, skipped macOS
release blocker, release note/runbook, README delta, and PI-160 promotion
candidates; complete the Task Documentation Gate without overstating
release readiness.
## Outcome
- Code candidate `df1151b5eb8588f126ccbee98cb7bf0b46285659` fixes every
implementation defect from the planner's first Spec review. The packaged
extension/subagent proof now executes Main and runtime code from final
`app.asar`/`resources/pi-runtime`; cold and warm prompt samples are distinct
and include resources-ready, worker-spawn, RPC-ready, session-open,
prompt-accepted, and agent-settled milestones; one packaged run holds four
parent workers plus four child workers while exercising the real UI and then
proves process/permit/dispatch/lease cleanup; the verifier enumerates ASAR
internals; and a Linux x64 RPM is generated and inspected.
- Windows x64 and WSL2 Linux x64 final products passed Pi `0.84.2`
production-closure, packaged composition, lifecycle, controlled
provider-shaped, extension/subagent, 4+4 pressure/isolation, cleanup, and
performance qualification. Windows NSIS and Linux AppImage/deb/RPM
distributables were produced.
- Full ASAR enumeration found zero product-owned OpenCode paths. Exact matches
under the pinned upstream `@earendil-works/pi-ai/dist/providers/opencode*`
closure remain classified separately because Pi imports them; they are not
Makelore-owned runtime residue.
- The five requested fixes are ready for planner re-review, but PI-150 remains
blocked from `Done`, PI-160 must not start, and the product is not
cross-platform release-ready: macOS x64/arm64 was explicitly skipped and no
independent native non-WSL Linux desktop/compositor acceptance run exists.
QG-004/QG-005 remain `Explicitly Waived / Accepted Risk`, with
`realTurnVerified=false`.
## Verification
- Exact pnpm `10.33.4` frozen install passed on Windows and WSL2 Ubuntu 24.04
x64; the candidate stayed clean at `df1151b` and the lockfile change is limited
to the direct `@electron/asar@3.4.1` verifier dependency.
- Candidate-final Windows checks passed: `pnpm run typecheck`; `pnpm run
lint:check` with 0 errors and five pre-existing warnings; `pnpm test` with 178
files, 1505 passed and two skipped; `pnpm run test:e2e` with 24/24; `pnpm run
build:vite`; and the focused final-proof suite with 6 files/32 tests.
- Final Windows NSIS `release/Makelore-2.0.0-win-x64.exe` is 208,297,927 bytes
with SHA-256
`3DDCF48D28ABA914F427DC828428E4248A9751F8A449324F48060BA981E7B3D8`.
The rebuilt `win-unpacked` artifact verifier enumerated 10,278 ASAR entries,
found zero product-owned OpenCode path or development path residue, and passed
packaged Electron/Node/runtime/resource qualification. Structured evidence is
in ignored release reports `pi-artifact-win-followup.json`,
`pi-product-proof-win-followup.json`, and `pi-smoke-win-followup.json`.
- The Windows packaged product proof loaded Main through final `app.asar`, ran
cold/warm managed workers and the materialized extension/subagent bridge, held
4 parent + 4 child workers as 8 live OS processes while the UI remained
interactive, and then reported zero active/waiting process-budget entries,
child permits, dispatches, parents, PIDs, and write leases.
- Windows formal five-sample performance evidence
`pi-performance-win-followup.json` passed every budget. Managed cold p95 was
resources `25 ms`, spawn `13 ms`, RPC `669 ms`, session `3 ms`, accepted `1
ms`, settled `309 ms`; warm p95 was `8/13/674/8/0/270 ms`. Pressure UI p95
was `176 ms`; Renderer first-commit p95 was `33.6402 ms` (max `48.8593 ms`).
- WSL2 Linux final product was rebuilt at the exact same clean commit. Final RPM
`release/Makelore-2.0.0-linux-x86_64.rpm` has SHA-256
`c7d7eac673abed61d83af2fbd2cc33d81ffa3b2c1e449ad89ee8f118f7400c64`.
RPM inspection reports Name `niancode`, Version `2.0.0`, Release `1`, Arch
`x86_64`, and contains `/opt/Makelore/niancode`,
`/opt/Makelore/resources/app.asar`, and
`/opt/Makelore/resources/pi-runtime/dist/cli.js`.
- Linux artifact verification enumerated 10,280 ASAR entries and found zero
product-owned OpenCode path. WSLg launched the final packaged product from
`app.asar`; extension/subagent, live 4+4/8-PID pressure, UI interaction, and
zero-resource cleanup all passed. Evidence is in
`pi-artifact-linux-rpm-followup.json`,
`pi-product-proof-linux-rpm-followup.json`, and
`pi-smoke-linux-rpm-followup.json` in the Linux checkout's ignored
`release/evidence` directory.
- Linux formal five-sample report `pi-performance-linux-rpm-followup.json`
passed every budget. Managed cold p95 was resources `14 ms`, spawn `6 ms`,
RPC `456 ms`, session `2 ms`, accepted `1 ms`, settled `284 ms`; warm p95 was
`4/4/465/1/1/256 ms`. Pressure UI p95 was `99 ms`; Renderer first-commit p95
was `27.897758 ms` (max `42.186106 ms`); exit p95 was `7 ms`.
- Linux results are WSL2/WSLg final-product evidence, not an independent native
non-WSL Linux desktop/compositor/distribution acceptance run. Controlled
provider-shaped smoke issued six requests per protocol (distinct cold, warm,
and abort-isolation paths); real Provider verification remains false by the
explicit waiver.
## Follow-ups
- Request planner re-review of `c7e7772..df1151b`. The five prior findings now
have direct final-product implementation and structured Windows/Linux
evidence; no source-only unit-test result is used as their release proof.
- Do not start PI-160 or integrate `df1151b` while PI-150 remains blocked by the
accepted platform evidence boundary. If the planner accepts the five fixes,
keep PI-150 as the active frontier until the missing platform decision or
evidence is resolved.
- Keep missing macOS x64/arm64 artifact/runtime/resource/performance evidence as
a release blocker; do not promote a cross-platform release-ready or PI-150
`Done` conclusion without independent macOS execution.
- Keep the lack of an independent native non-WSL Linux
desktop/compositor/distribution run explicit. The WSL2/WSLg run qualifies the
generated Linux artifacts and final process seam but does not erase that
environment boundary.
- Real Provider Account and real-provider concurrency/credential/protocol
compatibility remain accepted risk unless the user explicitly revokes the
waiver and supplies provider access.
## Promotion Candidates
- After PI-150 is actually unblocked, PI-160 may promote the current Pi
runtime/Conversation state from README and
`docs/pi-runtime-release-runbook.md` into canonical project memory during
integration review.
- PI-160 must record QG-004/QG-005 as `Explicitly Waived / Accepted Risk`, with
`realTurnVerified=false`; this is not a Pass.
- PI-160 must preserve any unresolved macOS x64/arm64 or native Linux
missing-evidence blocker; this candidate does not authorize overriding it.