24 KiB
24 KiB
Task: Implement MakeLore Development Data Service P0 client
Identity
- Task ID: 20260826-makelore-data-service-client-b72e4c19
- Mode: Feature
- Branch: codex/20260826-makelore-data-service-client-b72e4c19-makelore-data-service-client
- Worktree: D:\Datas\OthersProjects\makelore-data-service-client-b72e4c19
- Base commit:
f245603923 - Owner: codex-root
- Status: In Progress (ML-01 through ML-08 integrated; ML-09/X-01 pending)
Scope
- Coordinate the repository-local
implement-specrun for client tickets ML-00 through ML-09 from post-Pi-integration basef2456039230f68e3ecb2c8653fc3379c23bbe5ce. - Deliver durable MakeLore project identity, Main-owned Data Service cloud/Host operations, purpose-specific Pi tools, preview data sessions and CDP injection, the thin generated SDK, bundled Data Service Skill, focused/full verification, repository-local review, and one remediation pass when findings require it.
- Own the client implementation branch and merge only commits returned by isolated ticket worktrees in dependency order.
Intent And Constraints
- Follow the server repository's implementation specification, ticket graph, canonical integration contract, and accepted ADR without reopening the frozen P0 product scope.
- Preserve the integrated Pi
0.84.2hard cutover, product-neutral Snapshot/Patch contracts, Main/Renderer trust boundary, current Host route ordering, and the existing Agent Browser abstraction. .niancode/project.jsonowns the durable optionalprojectId; local project IDs, Pi session/resource IDs, and theopencode-projectscompatibility store name remain local identities.- Electron Main remains the only Works credential owner. Generated code receives only an ephemeral exact-Origin data capability; no credential, owner, path, arbitrary endpoint, or cloud project ID becomes a model-controlled input.
- Do not restore OpenCode, add Firebase compatibility, published-runtime support, retries for ambiguous writes, a filesystem-copy engine, or a generic operation multiplexer.
- The root
mainworktree remains clean and unowned. All writes stay in this isolated coordinator worktree or ticket-specific linked worktrees.
Planning Gate
- Result: Passed on 2026-08-26.
- Loaded MakeLore
AGENTS.md, required project-memory entry documents, current state, accepted auth and Pi decisions, relevant architecture/domain/evidence/commitment material, the cross-repository Data Service spec/graph/contract, and the exact Pi, Host API, project-storage, session, and Agent Browser seams at the recorded base. - Registry review found 147 historical owners. Most are ready-for-integration and represented in the selected base. Ten remain marked planning; nine have placeholder scopes and therefore unknown coordination state, while one owns an unrelated AI Design E2E file. No declared Data Service or owned-path semantic conflict exists.
- Real PostgreSQL, signed-in accounts, deployment inputs, and platform-specific E2E prerequisites remain external acceptance inputs and will not be inferred as passed.
Ticket Ownership
- ML-00: coordinator in this worktree.
- ML-01 through ML-07: isolated implementer worktrees from the exact merged frontier commit, with the file ownership defined by the ticket graph.
- ML-08: repository-local merger in this implementation worktree.
- ML-09: read-only review followed by one isolated remediation implementer if needed.
- X-01: coordinated only after reviewed server and client branches are ready.
Outcome
- Integrated ML-01 project identity from the exact integration frontier
7e54b8fbda1899b73334d7c3e732ce8e73460ed8with no cherry-pick conflict. Implementer commit274172ac9d7ea2468242448d4b0b19fd2205f8fbwas cherry-picked as feature commit43f58fc(feat(coding): add durable project identity core). The delivered scope is limited to identity core, coding-project Host routes/composition and callback wiring, release-proof fixtures, and focused tests. The implementer task record was removed from this coordinator's net diff; the source worktree retains its own record. - Integrated ML-02 identity UX from the exact ML-01 frontier
5ac08d509f8962a3c2c0ec1b1afef84a435f116dwith no cherry-pick conflict. Implementer commit363660a81b3f79ffab4594763170932790f41299was cherry-picked as feature commitce8e210(feat(coding): add project identity UX). The delivered scope is limited to the Sidebar and Project Configuration identity controls, Renderer facade/store projections, focused tests, and identity E2E; no Main, cloud, session, or provisioning logic was added. The foreign ML-02 task record was deleted from this coordinator's net diff after cherry-pick; the source worktree retains its own record. - Integrated ML-03 Main Data Service from the exact ML-02 frontier
003fe210f49de37c7ddf49cf10acde38705bf8c3with no cherry-pick conflict. Implementer commit10d8132cc34f1a69fafdd9e9f7ff3693888fc3fcwas cherry-picked as feature commitc19227a(feat(coding): add Main Data Service Host adapter). The delivered scope is limited to the Main-owned cloud client, shared safe DTOs,DataServiceOperationscoding composition, fixed/api/works/data-serviceHost routes, route precedence before the Works catch-all, and focused tests; no preview/Pi/Renderer credential or unrelated transport logic was added. The foreign ML-03 task record was deleted from this coordinator after cherry-pick; the source worktree retains its own record. The ML-04 frontier is this integrated commit plus the coordinator's cleanup/record commit. - Applied the ML-03 post-merge correctness correction from source commit
0ecceef15d2e43190f835fd71a7a1478222f1ba8onto coordinator frontiere15d8b7f51bea6b56558c981964082a4e76e523c. The expected modify/delete conflict was limited to the already-removed foreign ML-03 task record; it was kept deleted, and the correction cherry-picked as feature commit6b36753(fix(coding): reject mismatched Data Service errors). The Main client now rejects known error codes paired with undocumented HTTP statuses asupstream_invalid_response, with one focused regression test. The ML-04 frontier is6b36753plus this coordinator record commit. - Integrated ML-04 from source commits
e4fdeaea02cab216f4e7ff4543d57ca9e2aab33band93609d5890b6be4c51c083125d3d8ab7ebd3d02din the requested order as coordinator commits1d63233cd03425e9158b9c4868b3cfc0e508bc6fandf61990f3a7f5ea417ca3eecc6702e71398f77d7f. Git auto-merged the knowndata-service-client.tsoverlap without a conflict; the ML-03ERROR_STATUS_BY_CODE↔ HTTP-status validation remains alongside the ML-04 trustedprojectPathauthority seam. The ten parent-only underscore tools, closed inputs, shared in-processDataServiceOperations, safe details and literal confirmation behavior are retained. The foreign ML-04 task record was removed from this coordinator after both cherry-picks; the source record remains inD:\Datas\OthersProjects\makelore-ml04-pi-data-tools-8d3c91a7. The ML-04 frontier isf61990f3a7f5ea417ca3eecc6702e71398f77d7fplus this coordinator cleanup/record commit. - Integrated ML-05 from source commit
080b8801d29274b506700f94391339d98fb7aa0dat the exact ML-04 frontierbec67082b3dade05e900911c13ad804e781309f6as coordinator commite842dd4(feat(coding): add preview data runtime session), with no cherry-pick conflict. The delivered scope is limited to the Main-owned ephemeral preview session manager, exact/api/runtime/data/v1data-only routes, early route precedence, trusted Data Service forwarding, lifecycle invalidation wiring, and focused loopback coverage; ML-06 pre-document injection was not included. The foreign ML-05 task record was removed from this coordinator after cherry-pick; the source record remains inD:\Datas\OthersProjects\makelore-ml05-preview-data-session-5c8e2a71. The ML-06 frontier ise842dd4plus this coordinator cleanup/record commit. - Integrated ML-06 from source commit
992a0a68d743f766f19bc34c245adca4431ba321at the exact ML-05 frontier14fec701086f60d78466b8e1cc3fb57ca8d7e200as coordinator commit38d63a9(feat(agent-browser): add opt-in preview data injection), with no cherry-pick conflict. The delivered scope is limited to the explicit Agent Browser preview-data opt-in, exact-Origin CDP pre-document script lifecycle, child-session tracking/cleanup, and Main/session invalidation wiring; the ordinary arbitrary-URL path remains data-free and no second BrowserWindow or preload was added. The foreign ML-06 task record was removed from this coordinator after cherry-pick; the source record remains inD:\Datas\OthersProjects\makelore-ml06-agent-browser-injection-2c7e91a4. The ML-07 frontier is38d63a9plus this coordinator cleanup/record commit. - Integrated ML-07 from source commit
d22ceef104b4f95e7a35888875dcb1c18245c190at the exact ML-06 frontier552c6162a57894b713ea1f47d356fa48c0fc0cf1as coordinator commit549069d(feat(coding): add generated Data Service SDK skill), with no cherry-pick conflict. The delivered scope is limited to the bundled Data Service Skill, canonical TypeScript/JavaScript SDK assets, existing skill registry/display registration, and focused SDK/install/workflow tests. The source commit and coordinator range contain no roottask_plan.md,findings.md, orprogress.mdscratch files. The foreign ML-07 task record was removed from this coordinator after cherry-pick; the source record remains inD:\Datas\OthersProjects\makelore-ml07-data-service-sdk-skill-6b4e91c2. The ML-08 frontier is549069dplus this coordinator cleanup/record commit. - Completed ML-08 merge-and-verify on the exact clean product frontier
a981b07faaa64b20bf9aef6353218fef26695ca2, with fixed client basef2456039230f68e3ecb2c8653fc3379c23bbe5ce. ML-01 through ML-07 are present in dependency order through that product HEAD; this step made no product changes. The five required verification commands and their one known E2E failure are recorded below. The product HEAD immediately before this documentation update wasa981b07faaa64b20bf9aef6353218fef26695ca2.
Verification
pnpm exec vitest run tests/unit/coding-project-identity.test.ts tests/unit/coding-projects-migration.test.ts tests/unit/coding-core-routes.test.ts tests/unit/coding-projects-schema-v2.test.ts: 4 files / 48 tests passed.pnpm typecheck: passed.pnpm lint:check: passed with 0 errors and 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx; none are in the ML-01 paths.git diff --check: passed.- Cherry-pick parent, coordinator branch, and required integration frontier
were verified against
7e54b8fbda1899b73334d7c3e732ce8e73460ed8before integration; the cherry-pick completed without conflicts. - ML-02 focused Renderer tests:
pnpm exec vitest run tests/unit/coding-projects-facade.test.ts tests/unit/project-config-store.test.ts tests/unit/coding-workspace-store.test.ts --maxWorkers=1: 3 files / 10 tests passed. pnpm build:vite: passed; generated the Main/Preload bundles required by the Electron fixture.pnpm test:electron:windows: 2 files / 4 tests passed.pnpm exec playwright test tests/e2e/coding-project-identity.spec.ts --config=playwright.config.ts: 2 tests passed after the Vite build.pnpm exec playwright test tests/e2e/project-configuration-skills.spec.ts --config=playwright.config.ts: 1 test passed.pnpm typecheck: passed.pnpm lint:check: passed with 0 errors and 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx; none are in the ML-02 paths.git diff --check: passed; the net ML-02 path audit contains only Renderer UI/facade/store and tests, with noelectron/,resources/, orscripts/files.- Implementer-provided broader results (not rerun by this merger):
pnpm testpassed with 183 files / 1554 tests and 2 skipped; the full E2E run passed 25 tests and reproduced one pre-existing PI model-combobox failure attests/e2e/pi-coding-first-chat.spec.ts:575on its direct rerun. This unrelated failure remains visible and is not masked by the focused passes. - ML-03 focused tests:
pnpm exec vitest run tests/unit/data-service-client.test.ts tests/unit/data-service-routes.test.ts tests/unit/data-service-server-registration.test.ts --maxWorkers=1— 3 files / 17 tests passed. - ML-03 regression tests:
pnpm exec vitest run tests/unit/coding-core-routes.test.ts tests/unit/coding-project-identity.test.ts tests/unit/host-api-proxy.test.ts tests/unit/works-routes.test.ts --maxWorkers=1— 4 files / 82 tests passed. pnpm typecheck: passed.pnpm lint:check: passed with 0 errors and the same 5 existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx.git diff --check: passed.- Coordinator branch, clean state, exact ML-02 HEAD, and ML-03 commit parent were verified before integration; cherry-pick completed without conflicts.
- ML-03 correction focused tests: the same 3-file command passed 18 tests after
integrating
6b36753. - ML-03 correction
pnpm typecheck: passed. - ML-03 correction
pnpm lint:check: passed with 0 errors and the same 5 existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx. - ML-03 correction
git diff --check: passed. - Correction cherry-pick was applied from the exact
e15d8b7coordinator frontier; only the expected foreign task-record modify/delete conflict occurred, and the source record remains in the source worktree. - The coordinator already had this task's Git-common ownership in feature mode
under
codex-root; the required integration-mode resume was rejected by the task gate, so the same task was resumed in its existing feature mode without changing ownership, branch, or worktree. - ML-04 Pi focused suite:
pnpm exec vitest run tests/unit/pi-product-tools.test.ts tests/unit/pi-extension-bundle.test.ts tests/unit/pi-extension-host.test.ts --maxWorkers=1— 3 files / 23 tests passed. - ML-04 Data Service/projector + Pi focused suite:
pnpm exec vitest run tests/unit/data-service-client.test.ts tests/unit/data-service-routes.test.ts tests/unit/data-service-server-registration.test.ts tests/unit/coding-conversation-contracts.test.ts tests/unit/coding-conversation-timeline.test.tsx tests/unit/coding-product-tools-facade.test.ts tests/unit/pi-extension-ui-projector.test.ts tests/unit/pi-product-tools.test.ts tests/unit/pi-extension-bundle.test.ts tests/unit/pi-extension-host.test.ts --maxWorkers=1— 10 files / 62 tests passed. - ML-04
pnpm typecheck: passed. - ML-04
pnpm lint:check: passed with 0 errors and the same 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx. - ML-04
git diff --check: passed after the foreign task-record cleanup. - ML-05 source focused/loopback suite:
pnpm exec vitest run tests/unit/preview-data-session.test.ts tests/unit/data-service-routes.test.ts tests/unit/coding-core-routes.test.ts tests/unit/agent-browser-core.test.ts tests/unit/coding-attachments-routes.test.ts --maxWorkers=1— 5 files / 107 tests passed. - ML-05 adjacent Data Service/client regressions:
pnpm exec vitest run tests/unit/data-service-client.test.ts tests/unit/data-service-routes.test.ts tests/unit/data-service-server-registration.test.ts tests/unit/coding-conversation-contracts.test.ts tests/unit/coding-conversation-timeline.test.tsx tests/unit/coding-product-tools-facade.test.ts tests/unit/pi-extension-ui-projector.test.ts tests/unit/pi-product-tools.test.ts tests/unit/pi-extension-bundle.test.ts tests/unit/pi-extension-host.test.ts --maxWorkers=1— 10 files / 62 tests passed. - ML-05
pnpm typecheck: passed. - ML-05
pnpm lint:check: passed with 0 errors and the same 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx. - ML-05
pnpm build: passed Vite, Electron, Pi runtime, and Windows NSIS packaging; the existing dynamic-import/chunk, optional dependency, and absent optional packaged-resource warnings remained visible. - ML-05
pnpm test:electron:windows: 2 files / 4 tests passed. - ML-05
git diff --check: passed; the only coordinator deletion is the foreign ML-05 task record, and the source worktree retains it. - ML-05 exclusion scan over the merged diff found no
injectProjectData,__MAKELORE_DATA__,Page.addScriptToEvaluateOnNewDocument, script-ID tracking, or navigation injection markers. - ML-06 was integrated from source commit
992a0a68d743f766f19bc34c245adca4431ba321at the exact ML-05 frontier14fec701086f60d78466b8e1cc3fb57ca8d7e200as coordinator commit38d63a9(feat(agent-browser): add opt-in preview data injection), with no cherry-pick conflict. The change adds only the explicit Agent Browser preview-data opt-in, exact-Origin CDP pre-document script lifecycle, child-session tracking/cleanup, and Main/session invalidation wiring. The foreign ML-06 task record was removed from this coordinator after cherry-pick; the source record remains inD:\Datas\OthersProjects\makelore-ml06-agent-browser-injection-2c7e91a4. The ML-07 frontier is38d63a9plus this coordinator cleanup/record commit. - ML-06 focused Vitest:
pnpm exec vitest run tests/unit/agent-browser-core.test.ts tests/unit/agent-browser-routes.test.ts tests/unit/pi-product-tools.test.ts tests/unit/coding-core-routes.test.ts --maxWorkers=1— 4 files / 122 tests passed. - ML-05 preview regressions after ML-06:
pnpm exec vitest run tests/unit/preview-data-session.test.ts tests/unit/data-service-routes.test.ts tests/unit/coding-core-routes.test.ts tests/unit/agent-browser-core.test.ts tests/unit/coding-attachments-routes.test.ts --maxWorkers=1— 5 files / 120 tests passed. - ML-06
pnpm test:electron:windows: 2 files / 4 tests passed. - ML-06
pnpm typecheck: passed. - ML-06
pnpm lint:check: passed with 0 errors and the same 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx. - ML-06
pnpm build:vite: passed for renderer, Main, preload, and utility worker; existing dynamic-import and large-chunk warnings remained visible. - ML-06 full E2E
pnpm test:e2e: 25 tests passed and 1 existing test failed attests/e2e/pi-coding-first-chat.spec.ts:575because the当前对话模型combobox remained disabled until timeout. A direct rerun of that test reproduced the same timeout; this is not an ML-06 injection path and is not counted as an E2E pass. - ML-06 boundary checks passed: no new
BrowserWindowor preload was added, the ordinary arbitrary-URL path remains data-free, and the expected changed path list contains only Agent Browser/session wiring, route/Pi propagation, focused tests, and the task record. - ML-06
git diff --check: passed after foreign task-record cleanup. - ML-07 focused SDK/Skill assets:
pnpm exec vitest run tests/unit/data-service-sdk-assets.test.ts --maxWorkers=1— after normalizing coordinator checkout line endings to the source's canonical LF bytes, 1 file / 14 tests passed. The initial checkout run had 13 passed and 1 frontmatter assertion failure caused solely by CRLF; the normalized working files hash exactly to their committed blobs. - ML-07 adjacent registry/display/resource/Pi suite:
pnpm exec vitest run tests/unit/data-service-sdk-assets.test.ts tests/unit/skill-display.test.ts tests/unit/pi-resource-loader.test.ts tests/unit/pi-product-tools.test.ts --maxWorkers=1— 4 files / 34 tests passed. Packaged resource listing includesSKILL.md,assets/,assets/makelore-data.ts, andassets/makelore-data.js. - ML-07 full unit verification: the normal parallel runner had 1 Vitest fork
worker exit unexpectedly after 187/188 files and 1606 passed tests (2
skipped), with no assertion failure. The serial rerun
pnpm exec vitest run --exclude tests/unit/coding-chat-pressure.test.tsx --maxWorkers=1passed 188 files / 1610 tests with 2 skipped, followed bypnpm exec vitest run tests/unit/coding-chat-pressure.test.tsx --maxWorkers=1— 1 test passed. - ML-07
pnpm typecheck: passed. - ML-07
pnpm lint:check: passed with 0 errors and the same 5 pre-existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx. - ML-07
pnpm build: passed Vite, Electron, Pi runtime, and Windows NSIS packaging; existing dynamic-import/chunk, optional dependency, and absent optional packaged-resource warnings remained visible. - ML-07
pnpm test:electron:windows: 2 files / 4 tests passed. - ML-07 affected E2E:
pnpm exec playwright test tests/e2e/project-configuration-skills.spec.ts --config=playwright.config.ts— 1 test passed. - ML-07 SDK static boundary checks found no cloud credential, external URL,
retry call, cache/offline storage, Firebase, or Works Square behavior; the
only Authorization/Bearer use is the injected local preview token required
by the contract. Skill checks confirmed inspect → explicit
data_service_configure→agent_browser→ read-back → report ordering and the exact-copy/no-op/conflict policy. - ML-07 root-scratch and boundary scans passed; changed paths are limited to
the Data Service skill assets, registry/display registration, focused tests,
and the task record.
git diff --checkpassed after foreign task-record cleanup. - ML-08 precondition: coordinator branch was clean at product HEAD
a981b07faaa64b20bf9aef6353218fef26695ca2, based onf2456039230f68e3ecb2c8653fc3379c23bbe5ce; no product file was changed by this verification step. - ML-08 command ledger (run in this coordinator worktree):
pnpm typecheck— exit 0, passed, approximately 5.32s. pnpm lint:check— exit 0, passed with 0 errors and the same 5 existing warnings insrc/pages/Home/index.tsxandsrc/pages/Makelore/index.tsx, approximately 10.01s.pnpm test— exit 0, passed; main suite 188 files / 1610 tests passed / 2 skipped (Vitest-reported 42.86s), followed by the pressure suite 1 file / 1 test passed (1.77s). No assertion failure or worker exit occurred.pnpm test:electron:windows— exit 0, passed; 2 files / 4 tests passed (Vitest-reported 1.02s; command approximately 2.34s).pnpm test:e2e— exit 1; its requiredbuild:vitephases completed successfully, then Playwright ran 26 tests with 25 passed and 1 failed. The failure is the knowntests/e2e/pi-coding-first-chat.spec.ts:575locator.selectOption30s timeout because combobox当前对话模型remained disabled; this is not an E2E pass and remains a release/acceptance deviation. Playwright reported approximately 1.0m for the run. The build emitted only existing dynamic-import and chunk-size warnings.- ML-08 post-command hygiene:
git diff --checkpassed; the first drift invocation was unavailable becausepythonis not on the PowerShell PATH, then the samecheck_doc_drift.py --task-id 20260826-makelore-data-service-client-b72e4c19check passed using the configured bundled Python runtime. Test/build output remained ignored and the worktree was clean before this task-record update.
Follow-ups
- ML-02 identity choice and legacy/independent-copy UX, ML-03 Main Data
Service, ML-04 Pi Data Service tools, ML-05 preview data sessions, ML-06
Agent Browser pre-document injection, and ML-07 generated SDK/Skill assets
are integrated. ML-04 consumed the
DataServiceOperationsseam from the recorded ML-03 frontier and preserves its active-project identity and trusted project-path constraints. ML-05 and ML-06 preserve the Main-owned credential boundary; ML-06 supplies the narrow exact-Origin injection seam and ML-07 consumes only that local capability while keeping ordinary arbitrary URL opens data-free. - The broader ML-00 through ML-09 coordinator task remains in progress; this
record now has ML-08 command verification but does not claim ML-09 review,
release proof, or live acceptance. The client/server draft PR promotion is
externally blocked in this environment because GitLab HTTPS credentials are
unavailable non-interactively and
gh/glabare not installed; no draft PR is claimed from this worktree. - ML-09 remains pending for repository-local review and one remediation implementer if findings require it. X-01 remains a TODO after both reviews: exercise real PostgreSQL with a signed-in MakeLore preview and record live acceptance separately; repository E2E results cannot substitute for it.
Promotion Candidates
- None recorded.