fix(marketplace): close client contract gaps

This commit is contained in:
2026-08-29 23:21:26 +08:00
parent e4676977b9
commit c4120dd847
9 changed files with 236 additions and 29 deletions

View File

@@ -0,0 +1,91 @@
# Task: Marketplace MLM-06 R5 remediation
## Identity
- Task ID: 20260829-marketplace-mlm06-r5-remediation-c8f4a2d1
- Mode: Feature
- Branch: codex/20260829-marketplace-mlm06-r5-remediation-c8f4a2d1-marketplace-mlm06-r5-remediation
- Worktree: D:\Datas\OthersProjects\makelore-plugin-marketplace-mlm06-r5-remediation-c8f4a2d1
- Base commit: e4676977b91be62a87ba8c12d3415f1e8334e3c4
- Owner: marketplace-client-coordinator-r5-remediator
- Status: Ready for Integration
## Scope
- Remediate the fixed-range MLM-06 R5 Release A findings from exact coordinator
frontier `e4676977b91be62a87ba8c12d3415f1e8334e3c4` as the sole product writer.
- Own only the schema-v2 execution-mode vocabulary/parser, explicit Package Store
uninstall cleanup semantics, Marketplace device-failure projection, their focused
tests, and this task record.
- Accept any additional supported R5 Standards finding into this same task before
commit; do not create a second remediation owner.
## Intent And Constraints
- Make the client schema-v2 contract exactly match canonical/server
`synchronous | job`; reject the non-contract `accepted` value.
- Make explicit uninstall prevent a new worker from seeing the Plugin immediately,
while preserving already-running workers until disposal and allowing their
formerly protected Release records to be removed after the last reference ends.
- Preserve the installed Beta channel across failed install/update projection so the
Renderer cannot silently fall back to Stable labeling or routing.
- Keep Account Library, Device Installation, project selection, Agent assignment,
active-worker freezing, runtime authorization, and billing separate. Do not add a
compatibility layer, background daemon, hidden mutation, Release B path, hosted
adapter, Token Point path, or production key material.
- User root worktrees, server, Operations, publication, deployment, XMA-01, push/PR,
and production activation remain outside this task.
- Concurrent and Planning Gates passed: task-context identity matches exact base;
coordinator is clean; R5 Spec/Standards peers are read-only reviews of the same
range and have no ownership conflict. `AGENTS.md`, all required skills, startup
memory, coordinator/peer records, and the full canonical spec/plan/design were read.
## Outcome
- Red/green implementation is in progress. The exact focused red boundary was
`4 failed / 60 passed`: schema-v2 rejected canonical `job`, explicit uninstall
could not retire active/current records across worker release, and a failed Beta
update dropped its channel.
- The minimal product correction now uses `synchronous | job`, removes explicit
current selection before deferred active-worker cleanup, and preserves the prior
installation channel in bounded failure projection. No compatibility layer,
daemon, root-worktree change, server change, or Release B path was added.
- Explicit uninstall now separates logical availability from physical retention:
it clears the current selection immediately, keeps immutable bytes referenced by
a running worker, and allows a later explicit cleanup to remove those bytes after
the worker releases its frozen Release. Background cleanup still refuses to guess
when current selection is missing.
- R5 Standards finalized with the same three Medium findings as R5 Spec and no
independent finding. The complete remediation set is therefore closed in this
single writer task.
## Verification
- Focused green: manifest/Package Store/store `3 files / 64 passed`.
- Adjacent Marketplace/Main/effective/Pi green: `11 files / 126 passed`.
- Renderer Beta failure/action proof: `2 files / 20 passed`.
- TypeScript typecheck passed. Dependency install used the frozen lockfile, reused
all 997 packages from the local store, downloaded nothing, and changed no lockfile.
- Scoped ESLint passed. Full `lint:check` passed with zero errors and the exact five
unchanged out-of-scope warnings in Home/Makelore.
- Vite production build passed for Renderer, Main, Preload, and utility worker. The
first sandboxed invocation failed only because pnpm could not `lstat` the Windows
user directory; the identical escalated command passed, so this is recorded as an
environment gate rather than a product failure.
- Full unit suite passed: 208 files / 1,807 passed / 2 skipped, followed by the
repository's single-worker pressure file 1/1 passed.
- Packaged artifact verification was not repeated in this remediation: no trust
key, package layout, artifact verifier, or packaged resource changed; the Vite
build and exact manifest contract tests exercise this change. XMA-01 remains the
later real packaged acceptance gate.
## Follow-ups
- Fresh fixed-range Standards and Spec review must run from the integrated client
frontier before XMA-01 can open.
- Official Ed25519 production public key activation and Release B Provider work
remain external holds, not this Release A remediation's completion criteria.
## Promotion Candidates
- None recorded.