docs(marketplace): record MLM-03 integration

This commit is contained in:
2026-08-28 18:09:15 +08:00
parent 05917a789a
commit 8b6824a8ba
2 changed files with 34 additions and 154 deletions

View File

@@ -88,6 +88,15 @@
- Current client frontier contains the frozen MLM-02 Marketplace client/account
cache/Package Store contract. MLM-03 may now start from the documentation
checkpoint recorded after this integration.
- MLM-03 task `20260828-plugin-marketplace-mlm03-4c8e1a7d` was dispatched from
exact frontier `1d64b89499f68de721e0f1c845dad2c57f1a78ed`. Its original agent was
interrupted after becoming unresponsive; a serial finisher resumed the same
registered owner and preserved the dirty worktree with no concurrent writer.
The completed source commit `7ad6b8c66d9ca64b5778690667c91c424aae456a`
was integrated without conflict as coordinator product commit
`05917a789a9b9f30ed9500f4cd1210ec72119646`. Coordinator-transferred
Package Store ownership was limited to removing unconditional latest-Release
protection while preserving account-snapshot and active-worker protection.
## Outcome
@@ -110,6 +119,14 @@
verified before an atomic index switch, and install failure preserves the previous
release. Account A/B snapshots remain isolated and logout/account switch invalidates
them. The official public key activation hold remains unchanged.
- MLM-03 delivered one effective installed-plugin resolver, Main-owned Marketplace
routes, and a frozen parent-worker snapshot shared across resource loading,
Extension Host, tool declarations, CLI/context, and runtime authorization. Child
workers remain empty; active Releases are registered for Package Store cleanup;
old workers reject new plugin actions after invalidation. Unknown or uninstalled
Skill assignments remain in project/Agent configuration but do not enter runtime
projections, and automatically become effective again when the trusted package
source returns.
## Verification
@@ -137,6 +154,13 @@
build, diff/doc gates, and task-context completion. Its exact sole parent, five
owned paths, clean status, and `READY_FOR_INTEGRATION` state were independently
verified before cherry-pick.
- MLM-03 verification passed 142 focused/adjacent tests with two staged-runtime
skips, full Vitest `1738 passed, 2 skipped`, the pressure case, typecheck, lint
with zero errors and five unchanged warnings, Vite build, Windows package,
Windows and Pi artifact verification, publish-runtime verification, diff/doc
gates, and task-context completion. The Windows installer embedded exact source
HEAD `7ad6b8c...`; production signing, real Provider, macOS, and native Linux
activation evidence remain explicit external/platform holds rather than passes.
## Follow-ups
@@ -144,4 +168,13 @@
## Promotion Candidates
- None recorded.
- After MLM-06 review and XMA-01, promote the Marketplace Main/Package Store/effective
resolver chain into `.project-docs/20-architecture/module-map.md` and
`data-flow.md`, including account cache, immutable installation, frozen worker
snapshot, and lifecycle invalidation.
- Refresh `.project-docs/30-worklog/current-state.md` and
`.project-docs/40-domain/business-rules.md` with the separation between Account
Library, Device Installation, project enablement, Agent assignment, runtime
authorization, and billing; retain the official public-key activation hold.
- Add the final MLM-05/MLM-06/XMA-01 evidence to the evidence index only after live
acceptance; repository package/tests must not be promoted as signed-in live proof.

View File

@@ -1,153 +0,0 @@
# Task: Implement MLM-03 effective resolver, Main routes, Pi, and lifecycle
## Identity
- Task ID: 20260828-plugin-marketplace-mlm03-4c8e1a7d
- Mode: Feature
- Branch: codex/20260828-plugin-marketplace-mlm03-4c8e1a7d-marketplace-mlm03
- Worktree: D:\Datas\OthersProjects\makelore-plugin-marketplace-mlm03-4c8e1a7d
- Base commit: 1d64b89499f68de721e0f1c845dad2c57f1a78ed
- Owner: marketplace-mlm03-implementer
- Status: Ready for Integration
## Scope
- Implement MLM-03 from the exact integrated MLM-02 frontier. Own only the
Main-owned effective resolver, project-plugin registry/service/composition
seams, Marketplace local Host routes, required Pi resource/extension/runtime/
worker lifecycle integration, focused resolver/route/lifecycle/Pi tests, and
this task record.
- Do not modify Renderer, Package Store/MarketplaceClient/account cache, server,
Operations, project root, or unrelated Pi behavior unless a real semantic seam
blocker is found and reported first.
## Intent And Constraints
- Implement Marketplace Release A only: one frozen `EffectivePluginSnapshot`
supplies Skills, declarations, Extension Host, Pi CLI `--tools`, worker
context, and safe Renderer projection. Preserve the separation of acquisition,
installation, project enablement, Agent assignment, backend configuration, and
runtime authorization.
- Exact eligibility is runtime-enabled AND (system-included OR current account
Library) AND compatible installed/bundled Release AND project enabled AND
assigned Skill allowed AND (skill_only OR admitted current server policy).
Retired blocks discovery/new acquire but does not erase an existing Library
user's local eligibility; suspended blocks new resolve/download/runtime
admission. Skill-only does not wait for Runtime Policy.
- Preserve retained disabled/removed/unknown project and Agent assignments,
child-empty/current-worker-frozen semantics, Main-derived account/path/release/
admission authority, and lifecycle invalidation on disable/remove/account or
project switch/suspend refresh/Main stop. No hosted adapter, Provider,
Plugin Charges, arbitrary code, generic invoke/config route, or billing path.
- Concurrent Task Gate: passed. `check_project_docs.py` succeeded; task_context
owns this isolated worktree and task ID; `status --json` matches owner,
feature mode, branch, worktree, and exact base commit.
- Planning Gate: passed. Required project memory, architecture/domain indexes,
accepted decisions, Marketplace implementation spec/ticket graph, MLM-01 and
MLM-02 outcomes, and coordinator scope were read. Other active local task
records were assessed; no unresolved semantic conflict or ownership overlap
blocks this plan. Coordinator/user-root worktrees remain untouched.
- The original coordinator interrupted an unresponsive prior implementer. This
serial finisher resumed the same registered logical owner and preserved the
complete dirty diff; the prior agent was confirmed interrupted and no
concurrent writer remained.
- The coordinator explicitly transferred one predecessor-owned seam for this
task only: `PluginPackageStore.removeUnused` and its focused regression.
No other MLM-02 Package Store ownership was adopted.
## Outcome
- Implemented one Main-owned effective resolver for bundled and immutable
installed Plugin definitions. It joins runtime status, current Account
Library, compatible installed/bundled Release, project selection, Agent Skill
assignment, and current Runtime Policy; `skill_only` does not wait for Policy,
retired Library entries remain eligible, suspended entries do not, and child
snapshots contain no Plugin resources.
- Composed the frozen `EffectivePluginSnapshot` through registry resources,
installed Skill roots, managed resource manifests, Extension Host context and
bridge declarations, Pi CLI tool allowlist, runtime context, and safe Host
projections. Known disabled and removed/unknown assignments remain in project
and Agent files but are not passed to workers; reinstall/re-enable restores
them without rewriting configuration.
- Added bounded Main Marketplace catalog/detail/Library/acquire/remove/install/
update/uninstall routes. Renderer supplies only a Plugin ID and explicit
action; Main derives account, release, admission, client version, and package
root, while route failures exclude tokens, paths, signed URLs, and raw bodies.
- Lifecycle invalidation now covers project selection, Library/session/account
changes, successful next-worker resolution, and Main shutdown. Parent workers
ref-count their frozen Release IDs in Package Store until stop/invalidation;
old workers re-resolve authority before a Plugin action and refuse stale or
disabled resources. Child workers register no Plugin Release or tool.
- Corrected the transferred Package Store seam: `removeUnused` no longer
self-protects the latest Release. A single unreferenced Release can be removed,
while every account snapshot and active worker still protects it and a missing
install remains idempotently removed.
- No Renderer page, hosted adapter, Provider, Plugin Charges, generic invoke/
config route, arbitrary code/MCP/hook path, server, Operations, project-root
schema, Release B, or Token Point behavior was added.
## Implementation Plan
1. Inspect the exact MLM-02 Main contracts, current project/Agent Skill
assignment and Pi opener/lifecycle seams, plus existing route/test conventions;
record any genuine seam mismatch before editing.
2. Add red focused tests for the exact resolver predicate and state separation,
skill-only/policy-backed behavior, retired/suspended handling, snapshot
equality across Pi/resource/declarations/CLI/context, child-empty and worker
freeze/invalidation, lifecycle cleanup, and Main local route authority.
3. Implement the smallest cohesive resolver/registry/service/composition/routes
and Pi lifecycle changes within the owned paths, preserving Data Service's
exact ten tools and preview lifecycle.
4. Run focused tests, relevant Pi/Data Service regressions, typecheck, scoped
lint/full lint as proportionate, Vite build for Main/preload/package imports,
and task-aware diff/doc gates. Fix only failures attributable to this scope.
5. Update this record with actual outcome/evidence/follow-ups, complete the task
context, and create one clean source commit whose sole parent is the exact
dispatch base.
## Verification
- Initial focused diagnosis:
`coding-plugin-effective-resolver`, `plugin-marketplace-routes`, and
`coding-product-services` — 3 files / 13 passed; initial typecheck passed.
- Red/green corrections:
Package Store cleanup failed because the unreferenced latest Release returned
`kept`; worker lifecycle failed because active-Release registration was called
zero times; removed/unknown assignments failed in both resolver and Product
Tools with `Unknown bundled coding skill`. Each passed after its minimal fix.
- Final focused plus adjacent resolver/routes/registry/Pi/Package Store/Data
Service matrix — 17 files / 142 passed / 2 staged-runtime skips.
- `pnpm test` — 205 files / 1,738 passed / 2 staged-runtime skips, followed by
the serialized coding-chat pressure file 1/1 passed.
- `pnpm run typecheck` — passed.
- `pnpm run lint:check` — 0 errors; the same five pre-existing Renderer warnings
in `src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx` remain.
- `pnpm run build:vite` — Renderer, Main, Preload, and release utility passed;
only existing dynamic-import and chunk-size warnings were reported.
- `pnpm run package:win` — passed; staged bundled Python and uv, built Pi
win32-x64 closure (130 packages / 6 assets), `win-unpacked`, and NSIS installer.
- `pnpm run verify:artifact:pi` — passed against final `Makelore.exe`/`app.asar`;
Pi is exactly 0.84.2, packaged closure is complete, the extension contract is
present, and bundled Data Service exposes exactly ten tools. The inherited
real-Provider and macOS/native-Linux waivers remain explicit.
- `pnpm run verify:publish-runtime` — passed with npm 11.6.2.
- Windows packaged-runtime verification with the verifier's explicit
`--allow-dirty` mode passed against the exact pre-commit product bytes:
installer 208,233,099 bytes, SHA-256
`CE9049C26939DE3281F0100936D87E39C968047BCD559ED764C5231521DC5B4B`;
bundled Python, uv 0.10.0, npm 11.6.2, native addons, and Unicode copy passed.
A default clean-tree verifier rerun is the final post-commit gate.
- `git diff --check` — passed before documentation finalization.
## Follow-ups
- Production Marketplace activation still depends on the official Ed25519
signing public/private pair already recorded by MLM-02; this task adds no key
or trust override.
- Real Provider compatibility and macOS x64/arm64 plus native non-WSL Linux
product artifact execution remain explicitly unverified inherited release
gates; no broader platform Pass is claimed here.
## Promotion Candidates
- None recorded.