diff --git a/.project-docs/30-worklog/tasks/20260827-makelore-plugin-client-7d3a91c4.md b/.project-docs/30-worklog/tasks/20260827-makelore-plugin-client-7d3a91c4.md index 0766c1c..74034c9 100644 --- a/.project-docs/30-worklog/tasks/20260827-makelore-plugin-client-7d3a91c4.md +++ b/.project-docs/30-worklog/tasks/20260827-makelore-plugin-client-7d3a91c4.md @@ -8,7 +8,7 @@ - Worktree: D:\Datas\OthersProjects\makelore-plugin-client-7d3a91c4 - Base commit: eb5d15d68470b30ec181164f08f0d7b027ef0006 - Owner: codex-root -- Status: In Progress (ML-00 through ML-03 integrated; ML-04 frontier pending) +- Status: In Progress (ML-00 through ML-04 integrated; ML-05 frontier pending) ## Scope @@ -226,13 +226,47 @@ dynamic declarations, bridge allowlisting, CLI agreement, child-empty exposure, disabled/re-enabled assignment, and old-worker behavior are covered by the owned focused suite. `git diff --check` passed. +- ML-04 precondition and merge: coordinator was clean at exact frontier + `a92cd904d33d4fa0b7c2413188186852a39eb6d4`; source commit + `1e925bc10ade8aed1a580362dfa65223993e3a24` had that exact parent and + cherry-picked without conflict as + `a18727ecf8f40c1d85e2d40922bcf3bc8d1a0ed3`. The product change set contains + four Main API files (`coding-composition`, `coding-product-services`, + `route-handlers`, and `routes/coding-plugins`), three new focused tests, and + one existing Data Service server-registration test update. There are no + changes to `project-service`, preview, Renderer, P1, `electron/api/context.ts`, + `electron/api/server.ts`, or `electron/main/index.ts`; the source task record + remains in its worktree. +- ML-04 focused verification: + `corepack pnpm exec vitest run tests/unit/coding-plugin-routes.test.ts + tests/unit/coding-plugin-composition.test.ts tests/unit/coding-plugin-lifecycle.test.ts + tests/unit/coding-product-services.test.ts tests/unit/data-service-server-registration.test.ts + tests/unit/coding-core-routes.test.ts tests/unit/coding-project-identity.test.ts + tests/unit/main-quit-lifecycle.test.ts --maxWorkers=1` — 8 files / 47 tests + passed (Vitest 4.73s). The route tests confirm exact GET + `/api/coding/plugins?projectId=...` and PUT `/api/coding/plugins/{plugin_id}` + bodies with Main-only authority; composition/lifecycle tests cover bounded + projection and `list`/`setEnabled`/`deactivate` wiring. +- ML-04 adjacent policy/capability/Data Service/Pi/preview regressions: + `coding-capability-registry`, `plugin-policy-client`, + `data-service-plugin-adapter`, `coding-conversation-contracts`, + `pi-product-tools`, `data-service-routes`, `data-service-sdk-assets`, + `pi-extension-bundle`, `pi-extension-host`, `pi-resource-loader`, + `preview-data-session`, and `pi-worker-process-real` — 12 files / 86 passed / + 2 skipped (Vitest 8.37s, one worker; skips are staged-runtime gated). +- `corepack pnpm run typecheck` — passed. `corepack pnpm run lint:check` — + passed with 0 errors and the same 5 pre-existing warnings in + `src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`. +- `corepack pnpm run build:vite` — passed for Renderer, Main, Preload, and + utility bundles; only existing dynamic-import/chunk-size warnings were + emitted. `git diff --check` passed. ## Follow-ups -- ML-04 may consume the effective plugin worker-resource snapshot, dynamic Pi - declarations/bridge/CLI materialization, and child-empty behavior from exact - product frontier `fd891ff3bb87a29381a0a7006fb4618ec4fe144f`; ML-04 owns its - Host/Renderer composition changes. +- ML-05 may consume the bounded project-plugin projection and exact Main Host + routes from exact product frontier + `a18727ecf8f40c1d85e2d40922bcf3bc8d1a0ed3`; it owns the Renderer Plugin + Center surface and must keep Data Service configuration on its typed routes. - The legacy `resources/coding-skills/data-service` path is intentionally removed by ML-01; any unowned downstream reference must be migrated by its owning ticket. This merger made no such downstream edit. diff --git a/.project-docs/30-worklog/tasks/20260827-plugin-ml04-host-lifecycle-4e7a2c91.md b/.project-docs/30-worklog/tasks/20260827-plugin-ml04-host-lifecycle-4e7a2c91.md deleted file mode 100644 index 4947b41..0000000 --- a/.project-docs/30-worklog/tasks/20260827-plugin-ml04-host-lifecycle-4e7a2c91.md +++ /dev/null @@ -1,133 +0,0 @@ -# Task: Implement ML-04 Host routes and lifecycle - -## Identity - -- Task ID: 20260827-plugin-ml04-host-lifecycle-4e7a2c91 -- Mode: Feature -- Branch: codex/20260827-plugin-ml04-host-lifecycle-4e7a2c91-plugin-ml04-host-lifecycle -- Worktree: D:\Datas\OthersProjects\makelore-plugin-ml04-host-lifecycle-4e7a2c91 -- Base commit: a92cd904d33d4fa0b7c2413188186852a39eb6d4 -- Owner: codex-ml04 -- Status: Ready for integration - -## Scope - -- Implement ML-04 from exact coordinator frontier - `a92cd904d33d4fa0b7c2413188186852a39eb6d4`. -- Own only Main composition, Host project-plugin routes, lifecycle wiring, the - explicitly listed focused tests, and this task record: - `electron/api/routes/coding-plugins.ts`, `electron/api/context.ts`, - `electron/api/route-handlers.ts`, `electron/api/coding-product-services.ts`, - `electron/api/coding-composition.ts`, `electron/api/server.ts` only when - exact registration requires it, and `electron/main/index.ts` shutdown wiring - only. -- Do not modify ML-01 project-service source/tests, preview session code, - Renderer/ML-05, or P1 paths without an explicit coordinator transfer. - -## Intent And Constraints - -- Follow implementation spec §7.5 and §10.2–10.3, ML-04 in the ticket graph, - and detailed design §§8.1–8.4, 8.8–8.9, 12, and 13. -- Compose the package registry, project plugin service, policy client, capability - registry, and Data Service adapter in Main; expose only bounded project - projections, never adapter internals, tokens, owner, prices, or raw policy. -- Expose exact GET/PUT `/api/coding/plugins` routes using a local project handle - resolved by `CodingProjectService` to real path and durable identity. Keep Data - Service configuration on existing typed routes and preserve IPC/loopback order. -- Wire enable/disable managed-input revision and adapter deactivation, plus - logout, project transition, identity-change-before-write, shutdown, and - backend-degraded behavior without deleting data. -- Test-first with one final implementation commit whose sole parent is the - exact base. Keep the worktree isolated and do not publish or claim a PR. - -## Project Context Loaded - -- Concurrent Task Gate passed: `check_project_docs.py` succeeded and - `task_context.py start`/`status --json` match this task ID, owner, - worktree, branch, feature mode, and base commit. -- Read the required entry files, active task record, project positioning/current - state/decision/system/architecture/domain/evidence/reflection/commitment/stale - indexes, MakeLore `AGENTS.md`, implementation spec §7.5 and §10.2–10.3, ML-04 - ticket, and detailed-design host/lifecycle/authority/error sections. -- Same-topic peer scopes are the client coordinator and completed ML-01–ML-03 - records. ML-03's exact product frontier is `fd891ff3bb87a29381a0a7006fb4618ec4fe144f`, - integrated by the coordinator as `a92cd904d33d4fa0b7c2413188186852a39eb6d4`. - ML-01 owns project-service files; no unresolved semantic conflict exists. -- Integrated project memory is older than this plugin implementation and remains - a last-integrated snapshot; frozen spec, coordinator task record, and exact - frontier control this task. Root `main` remains outside this worktree and is - not modified. - -## Plan - -1. Inspect the exact ML-03 product seams and existing route/composition/lifecycle - tests without changing files; map the required Host DTO and lifecycle callbacks. -2. Add failing focused tests for exact routes, Main-only authority, composition, - projection/degraded inspect behavior, and lifecycle invalidation/deactivation. -3. Implement the smallest cohesive Host/composition/lifecycle changes within the - exclusive ownership boundary, preserving typed Data Service routes and route - dispatcher ordering. -4. Run owned focused and relevant regressions, typecheck, lint, build as required, - and diff/doc gates; fix only failures within owned scope. -5. Record exact outcome/evidence, run `check_doc_drift.py`, complete task_context, - and return a clean single commit to the coordinator. - -## Gate Result - -- Planning Gate: Passed on 2026-08-27. No unresolved ownership or semantic - conflict affects ML-04. - -## Verification - -- Test-first red evidence: the three new focused test files initially failed - because `handleCodingPluginRoutes` and `createCodingProjectPluginService` did - not exist. The first lifecycle composition assertion then exposed an invalid - test premise (durable project identity is immutable); it was corrected to the - supported legacy-identity resolution path before the final green run. -- ML-04 focused plus required Host/lifecycle regressions: - `coding-plugin-routes`, `coding-plugin-composition`, - `coding-plugin-lifecycle`, `coding-product-services`, - `data-service-server-registration`, `coding-core-routes`, - `coding-project-identity`, and `main-quit-lifecycle` — 8 files / 47 tests - passed with one worker. -- Policy/capability/Data Service/Pi/preview regressions — 12 files / 86 passed / - 2 staged-runtime-gated skips. -- `corepack pnpm run typecheck` — passed. -- `corepack pnpm run lint:check` — 0 errors and the same 5 pre-existing warnings - in `src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`. -- `corepack pnpm run build:vite` — Renderer, Main, Preload, and release utility - builds passed; only existing dynamic-import and chunk-size warnings appeared. -- `git diff --check` — passed before documentation completion. - -## Outcome - -- Added the exact project-scoped GET/PUT Host routes and registered them in the - shared IPC/loopback dispatcher between coding project and conversation routes. - Requests accept only the local project handle plus the exact enable boolean; - path, durable identity, owner, token, policy, and price cannot be supplied. -- Added a bounded Main project-plugin projection service that resolves the local - handle through `CodingProjectService`, reads durable identity in Main, refreshes - and exactly joins verified policy with fixed package definitions, reports Skill - assignments, sanitizes backend projection, and isolates per-adapter inspect - failures. Existing typed Data Service routes remain the only configuration API. -- Composition now creates the project selection service, policy client, Data - Service adapter, capability registry, and Renderer projection. One - `configureCapabilityRegistry(...)` late-binding seam replaces production - `configureDataService(...)`; parent and child worker materialization receive the - same refresh-before-resolution capability registry. -- Selection changes mark managed resources stale and forget project worker - bindings. Disable invalidates preview and deactivates only the affected adapter; - project transition and identity change deactivate all session adapters, with - identity invalidation/deactivation completing before the atomic write. - Authentication cleanup deactivates the active project adapter. Shutdown - deactivates adapters before subagent/runtime shutdown. Cleanup failures are - isolated and never rewrite selection or delete cloud/local data. - -## Follow-ups - -- ML-05 may consume `CodingPluginProjectProjection` through the exact Host routes; - it must keep Data Service configuration on `/api/works/data-service/...`. - -## Promotion Candidates - -- None recorded.