docs: verify Learning project server contract

This commit is contained in:
2026-08-20 12:54:14 +08:00
parent 31a628e2d1
commit fbcfe7d437

View File

@@ -0,0 +1,50 @@
# Task: Integrate Makelore Learning project catalog client
## Identity
- Task ID: 20260820-learning-project-client-4f91c2a8
- Mode: Feature
- Branch: codex/20260820-learning-project-client-4f91c2a8-learning-project-client
- Worktree: D:\Datas\OthersProjects\makelore-learning-project-client-4f91c2a8
- Base commit: 31a628e2d18377ddbff6148b85e4523e52c1a2e6
- Owner: codex
- Status: Ready for integration
## Scope
- Verify the integrated Makelore Learning project catalog against the implemented Works Square contract.
- Adjust only client contract or integration code that proves incompatible with the server implementation.
- Run focused Learning tests, typecheck, lint, and the production compile in proportion to any client changes.
## Intent And Constraints
- Preserve the accepted Renderer -> Host API -> Electron Main -> Works Square trust boundary.
- Preserve login and module_access.learning entry gating while relying on independent server authorization.
- Do not restore course generation, progress, local course library, OpenMAIC playback, Agent, ASR, runtime, or compatibility reads.
- Renderer must not receive Works credentials, object-storage identifiers, arbitrary download URLs, or local filesystem paths.
- Treat the current integrated client as authoritative unless server contract tests expose a concrete mismatch.
## Outcome
- Verified that Makelore `main` already contains the accepted Learning project catalog implementation through merge commit `d967b0f` and the later documentation integration through `31a628e`.
- Confirmed the Renderer -> Host API -> Electron Main -> Works Square chain uses only the four new project endpoints and the `{ success, data }` camel-case response contract.
- Confirmed the detail page renders server-provided Markdown with controlled authenticated media URLs, raw HTML disabled, and no direct remote image or credential access from Renderer.
- Confirmed downloads remain Main-owned and validate content length, SHA-256, ZIP signature, and safe destination handling before reporting success.
- No client source adjustment was required because the implemented Works Square API matches the already integrated client contract exactly.
## Verification
- `corepack pnpm install --frozen-lockfile` — passed with the pinned `pnpm@10.33.4`.
- `corepack pnpm run typecheck` — passed.
- `corepack pnpm run lint:check` — passed with 0 errors and 6 pre-existing warnings outside the Learning implementation.
- `corepack pnpm test -- tests/unit/learning-route.test.ts tests/unit/learning-project-download.test.ts tests/unit/learning-page.test.tsx tests/unit/learning-client.test.ts tests/unit/learning-sidebar.test.tsx` — the repository test script ran the complete suite; 175 files and 2057 tests passed.
- `corepack pnpm run build:vite` — passed for Renderer, Electron Main, Preload, and utility worker bundles; only existing chunk-size/dynamic-import warnings were reported.
- `git diff --check` — passed.
## Follow-ups
- None. The server deployment must run its new Alembic migration before this already integrated client is pointed at the updated backend.
## Promotion Candidates
- None. The client catalog architecture and current-state documentation were already promoted by the completed integration ending at `31a628e`.