diff --git a/.project-docs/30-worklog/tasks/20260826-makelore-data-service-client-b72e4c19.md b/.project-docs/30-worklog/tasks/20260826-makelore-data-service-client-b72e4c19.md index e1e15e9..ba75a31 100644 --- a/.project-docs/30-worklog/tasks/20260826-makelore-data-service-client-b72e4c19.md +++ b/.project-docs/30-worklog/tasks/20260826-makelore-data-service-client-b72e4c19.md @@ -8,7 +8,7 @@ - Worktree: D:\Datas\OthersProjects\makelore-data-service-client-b72e4c19 - Base commit: f2456039230f68e3ecb2c8653fc3379c23bbe5ce - Owner: codex-root -- Status: In Progress (ML-00 through ML-09 product/review complete; X-01 pending) +- Status: In Progress (implementation, review, and X-01 complete; draft PR publication externally blocked) ## Scope @@ -449,11 +449,55 @@ ML-00 through ML-09 product/review scope is complete. This documentation update changes no product files; the worktree remains held for X-01. +### X-01 cross-repository acceptance + +- The installed Windows client used for final acceptance was staged from product HEAD + `c52a559b46f72273a02e2dba18e65a5f6c4224c9`, against reviewed server product + `13d4bc1b87c9d66cdd26b9a3c40f69d9c039a2e9`, disposable real PostgreSQL at Alembic + revision `20260826_0058_data_service`, and a disposable local signed identity + provider. Test identities were isolated aliases for account A, account B, + expired-session refresh, capacity quota, and mutation-rate cases; no production + credential or secret was used or persisted. +- Live acceptance exposed four client defects on the actual CDP path. The single + ML-09 remediation owner fixed them in committed product changes: preserve/defer the + exact target origin across initial `about:blank` injection (`0a4f526`, `afb5c10`), + enable the Page domain before installing root/child scripts (`23c49aa`), and bound + crashed-target cleanup so close/reopen cannot hang (`c52a559`). Each source task + added focused regression tests, passed its project-documentation gates, and was + integrated in order without editing the user root worktree. +- All 15 specification section 14 groups then passed through the packaged client: + lazy provisioning; configure plus preview write/read; restart and move; bind/raw + copy sharing; independent-copy separation; two-way owner isolation; one session + refresh; no-op/conflict/delete-recreate revision behavior; item/byte pagination and + cursor expiry; atomic quota/rate failures; collection/reset/orphan removal; exact + Origin and all ten lifecycle invalidations; external `runtime_unavailable`; and the + credential-absence ledger. Every invalidated preview endpoint became unusable, and + the data capability could not call general Host routes. +- Final product-head verification passed `pnpm typecheck`, `pnpm lint:check` with zero + errors and the same five existing warnings, `pnpm test` with 188 files / 1615 tests + passed and 2 skipped plus the single pressure test, and + `pnpm test:electron:windows` with 2 files / 4 tests. The packaged current-head build + was used for the successful live run. The earlier full Playwright run remains + accurately recorded as 25 passed / 1 existing unrelated model-selector timeout; it + is not relabeled as passed. +- Final post-X-01 review fixed the full committed product range + `f2456039230f68e3ecb2c8653fc3379c23bbe5ce` → + `c52a559b46f72273a02e2dba18e65a5f6c4224c9`. The independent Standards reviewer + returned PASS with no actionable finding, including the four CDP/lifecycle fixes + and all prior ML-09 remediations. The independent Spec reviewer returned PASS with + no actionable finding across specification sections 8 through 14, exact-Origin + installation/exposure, bounded crash cleanup, identity and Main-only credential + boundaries, SDK/Skill behavior, and the frozen P0 scope. +- The disposable client profiles and preview projects were removed by the harness; + local server/identity-provider processes were stopped, the PostgreSQL container was + removed, and all untracked operational scripts were deleted. No acceptance harness + is a product artifact. +- Go decision for implemented P0 behavior: **GO**, subject to publishing both draft + PRs once repository credentials/tooling are available. Rollout remains server-first, + and published works/external browser data runtime remain outside P0. + ## Follow-ups -- X-01 live acceptance remains pending: exercise real PostgreSQL with a - signed-in MakeLore preview and record the live result separately; - repository tests and E2E cannot substitute for this acceptance. - GitLab HTTPS PR authentication remains unavailable non-interactively in this environment and `gh`/`glab` are not installed; draft PR promotion remains blocked and no draft PR is claimed from this worktree. diff --git a/.project-docs/30-worklog/tasks/20260827-x01-cdp-enable-4e8a2c71.md b/.project-docs/30-worklog/tasks/20260827-x01-cdp-enable-4e8a2c71.md deleted file mode 100644 index 655a83e..0000000 --- a/.project-docs/30-worklog/tasks/20260827-x01-cdp-enable-4e8a2c71.md +++ /dev/null @@ -1,73 +0,0 @@ -# Task: Remediate X-01 preview CDP enable - -## Identity - -- Task ID: 20260827-x01-cdp-enable-4e8a2c71 -- Mode: Feature -- Branch: codex/20260827-x01-cdp-enable-4e8a2c71-x01-cdp-enable-4e8a2c71 -- Worktree: D:\Datas\OthersProjects\makelore-x01-cdp-enable-4e8a2c71 -- Base commit: afb5c10fae090567869fcd7a10410a8be2c963ad -- Owner: codex -- Status: Ready for Integration - -## Scope - -- Update `electron/agent-browser/module.ts` so preview-data CDP setup enables the - same root or child session immediately before `Page.addScriptToEvaluateOnNewDocument`. -- Add focused root/child ordering and `sessionRef` regression coverage in - `tests/unit/agent-browser-core.test.ts`. -- Maintain this task record only; no coordinator worktree, PR, live run, or - broader CDP refactor. - -## Intent And Constraints - -- Exact remediation for X-01 packaged evidence: `Page.enable` must precede - every preview-data script installation while preserving the optional - `sessionRef`. -- Preserve the existing target URL origin fix and exact-origin getter from the - base commit; ownership is limited to the two source/test files and this record. -- The prior injection-origin task was released before this task started; the - coordinator remains at the recorded exact base and is not modified. - -## Planning Gate - -- Result: Passed. -- Evidence: prior task released; isolated task/worktree started from - `afb5c10fae090567869fcd7a10410a8be2c963ad`; repository project-docs startup - instructions and architecture/coordinator scope records were read; no - conflicting ownership was found. - -## Plan - -1. Add `Page.enable` with the same optional session reference immediately before - each preview script command. -2. Assert root ordering and child ordering/session propagation in focused tests. -3. Run focused tests, typecheck, scoped lint, documentation drift, then commit - once and leave the worktree clean. - -## Outcome - -- Added `Page.enable` immediately before every preview-data - `Page.addScriptToEvaluateOnNewDocument` call, passing the same optional - `sessionRef` for root and document-child sessions. Added root and child - ordering/session propagation assertions while preserving the existing - target URL and exact-origin injection behavior. - -## Verification - -- PASS: `corepack pnpm vitest run tests/unit/agent-browser-core.test.ts` (77/77). -- PASS: `corepack pnpm run typecheck`. -- PASS: `corepack pnpm exec eslint electron/agent-browser/module.ts tests/unit/agent-browser-core.test.ts`. -- PASS: `git diff --check`. -- PASS: project-docs drift/completion gates (recorded before commit). -- The isolated worktree required `corepack pnpm install --frozen-lockfile --offline` - before the focused command; no tracked dependency files changed. - -## Follow-ups - -- None. No live/E2E run was requested for this bounded remediation. - -## Promotion Candidates - -- Commit the single source/test/documentation change after the documentation - gate passes. diff --git a/.project-docs/30-worklog/tasks/20260827-x01-crash-cleanup-7d4b1e92.md b/.project-docs/30-worklog/tasks/20260827-x01-crash-cleanup-7d4b1e92.md deleted file mode 100644 index 14fc61e..0000000 --- a/.project-docs/30-worklog/tasks/20260827-x01-crash-cleanup-7d4b1e92.md +++ /dev/null @@ -1,77 +0,0 @@ -# Task: Remediate X-01 crashed CDP cleanup - -## Identity - -- Task ID: 20260827-x01-crash-cleanup-7d4b1e92 -- Mode: Feature -- Branch: codex/20260827-x01-crash-cleanup-7d4b1e92-x01-crash-cleanup-7d4b1e92 -- Worktree: D:\Datas\OthersProjects\makelore-x01-crash-cleanup-7d4b1e92 -- Base commit: 23c49aa3d28730be657387cf9c061fb3a3bb53a8 -- Owner: codex -- Status: Ready for Integration - -## Scope - -- Bound best-effort preview-data cleanup CDP commands in - `electron/agent-browser/module.ts`, preserving normal removal, child release, - and auto-attach ordering. -- Add the focused crashed-renderer/never-settling-removal regression in - `tests/unit/agent-browser-core.test.ts`. -- Own only this task record and the two files above; do not modify the - coordinator, open a PR, or perform live acceptance. - -## Intent And Constraints - -- X-01 packaged evidence showed a crashed renderer can leave - `Page.removeScriptToEvaluateOnNewDocument` pending forever, blocking the next - public data-enabled `open` during cleanup. -- Race each cleanup command against the existing bounded best-effort cleanup - convention (1,000 ms), swallow command failure/timeout, and clear timers. -- Preserve successful cleanup ordering and the existing preview token - invalidation semantics; avoid a broad CDP refactor. - -## Planning Gate - -- Result: Passed. -- Evidence: concurrent task gate started this isolated feature task from exact - base `23c49aa3d28730be657387cf9c061fb3a3bb53a8`; current task record, - project-memory entry documents, coordinator scope, lifecycle/X-01 pointers, - and relevant Agent Browser seams were read; no conflicting owned path was - found. - -## Plan - -1. Add a narrow bounded debugger-cleanup helper and apply it to preview script - removal, child waiting-target release, and cleanup auto-attach restoration. -2. Prove a never-settling removal response cannot block crash invalidation and - the next data-enabled open. -3. Run focused tests, typecheck, scoped lint, project-docs gates, and commit - once from the exact base. - -## Outcome - -- Added a 1,000 ms timer-bounded best-effort debugger command helper and used it - for preview script removal, document-child waiting-target release, and - cleanup `Target.setAutoAttach`. Normal successful cleanup retains its prior - ordering. A never-settling script-removal regression now proves renderer crash - invalidation does not block the next data-enabled open. - -## Verification - -- PASS: `corepack pnpm vitest run tests/unit/agent-browser-core.test.ts` (78/78). -- PASS: `corepack pnpm run typecheck`. -- PASS: `corepack pnpm exec eslint electron/agent-browser/module.ts tests/unit/agent-browser-core.test.ts`. -- PASS: `git diff --check`. -- PASS: `check_doc_drift.py --task-id 20260827-x01-crash-cleanup-7d4b1e92`. -- The isolated worktree required `corepack pnpm install --frozen-lockfile - --offline`; it changed no tracked dependency files. - -## Follow-ups - -- No live/E2E run was requested for this bounded X-01 remediation; coordinator - should rerun live acceptance after integrating the commit. - -## Promotion Candidates - -- None; this is a feature-task implementation with no canonical project-memory - change. diff --git a/.project-docs/30-worklog/tasks/20260827-x01-injection-origin-6d7a91c4.md b/.project-docs/30-worklog/tasks/20260827-x01-injection-origin-6d7a91c4.md deleted file mode 100644 index 55b6b83..0000000 --- a/.project-docs/30-worklog/tasks/20260827-x01-injection-origin-6d7a91c4.md +++ /dev/null @@ -1,95 +0,0 @@ -# Task: Remediate X-01 stable preview injection origin - -## Identity - -- Task ID: 20260827-x01-injection-origin-6d7a91c4 -- Mode: Feature -- Branch: codex/20260827-x01-injection-origin-6d7a91c4-x01-injection-origin-6d7a91c4 -- Worktree: D:\Datas\OthersProjects\makelore-x01-injection-origin-6d7a91c4 -- Base commit: 0a4f526c2c6b301a6b7fcaef982bea2f703b41c0 -- Owner: codex -- Status: Ready for Integration - -## Scope - -- X-01 live-acceptance remediation on exact client coordinator product base - `0a4f526c2c6b301a6b7fcaef982bea2f703b41c0`. -- Fix the Agent Browser pre-document preview-data injection in - `electron/agent-browser/module.ts` so a transient early `location.origin` - does not prevent the capability from becoming available once the target - Origin is stable. -- Add only the focused regression in `tests/unit/agent-browser-core.test.ts` - and this task-scoped record. - -## Intent And Constraints - -- Follow spec §10.1/§10.4 and §14 groups 2/13, ticket ML-09, and X-01 live - acceptance. Preserve explicit opt-in, exact-Origin checking, the existing - non-enumerable/non-configurable descriptor contract, child/sessionRef - handling, and foreign-origin absence of the credential value. -- Live evidence shows CDP script registration and preview-session opening now - succeed, but packaged Electron sees no `globalThis.__MAKELORE_DATA__` on the - target page. The one-shot Origin check can run while Chromium reports an - early `null`/unstable Origin. Use the smallest safe closure-based fix: a - non-configurable getter resolves the closed-over value only for the exact - current Origin; it must not expose the credential for another Origin. -- Do not touch root main, the coordinator worktree, server code, PRs, routes, - other tests, or unrelated E2E behavior. Do not revert concurrent changes. - -## Planning Gate - -- Result: Passed on 2026-08-27. -- Ran `check_project_docs.py`, released the prior completed task through - `task_context.py release`, and started this feature task against the exact - coordinator base. Status JSON matches this task ID, absolute worktree and - branch, feature mode, and base commit. -- Read the required project-memory startup set, coordinator task scope, - relevant Agent Browser architecture/data-flow, spec §10.1/§10.4/§13/§14, - ticket graph ML-06/ML-09/X-01, and canonical preview contract. The - coordinator owns the parent path; this isolated task owns only the stated - module/test/record. Other active scopes are unrelated or placeholders. - -## Outcome - -- Replaced the one-shot Origin check in `previewDataInjectionScript` with an - IIFE closure containing the serialized value and expected Origin. The - non-enumerable, non-configurable getter returns the closed-over value only - while the current frame has the exact expected Origin; otherwise it returns - `undefined`. Child/sessionRef installation and lifecycle cleanup are - unchanged. -- Added regression coverage for an early `null` Origin becoming the target - Origin, foreign-origin denial, descriptor shape, and the getter source not - containing the credential value. - -## Plan - -1. Add a red regression that evaluates the injection script with an early - `null` Origin, then changes to the target Origin, and verifies the exact - value, descriptor, and foreign-origin behavior. -2. Replace the one-shot root injection guard with the smallest closure getter; - keep injection serialization, child sessions, and lifecycle cleanup intact. -3. Run focused Agent Browser/preview tests, typecheck, scoped lint, diff/doc - gates, then make one clean commit. - -## Verification - -- Red-first regression before the implementation failed: after the simulated - `null` → target Origin transition, `__MAKELORE_DATA__` remained `undefined`. -- `corepack pnpm vitest run tests/unit/agent-browser-core.test.ts` — 1 file, - 77 tests passed. -- `corepack pnpm run typecheck` — passed. -- `corepack pnpm exec eslint electron/agent-browser/module.ts - tests/unit/agent-browser-core.test.ts` — passed. -- `git diff --check` — passed. -- No live/Electron E2E was run here; the coordinator must rerun X-01 live - acceptance after integration. - -## Follow-ups - -- Integrate the single commit into the client coordinator and rerun the - packaged Electron X-01 preview write/read with real PostgreSQL and a signed-in - preview. Focused repository tests do not establish live acceptance. - -## Promotion Candidates - -- None recorded. diff --git a/.project-docs/30-worklog/tasks/20260827-x01-preview-injection-9c4e2a71.md b/.project-docs/30-worklog/tasks/20260827-x01-preview-injection-9c4e2a71.md deleted file mode 100644 index 6f54e07..0000000 --- a/.project-docs/30-worklog/tasks/20260827-x01-preview-injection-9c4e2a71.md +++ /dev/null @@ -1,95 +0,0 @@ -# Task: Remediate X-01 preview data injection target - -## Identity - -- Task ID: 20260827-x01-preview-injection-9c4e2a71 -- Mode: Feature -- Branch: codex/20260827-x01-preview-injection-9c4e2a71-x01-preview-injection-9c4e2a71 -- Worktree: D:\Datas\OthersProjects\makelore-x01-preview-injection-9c4e2a71 -- Base commit: 2f346687b173137135dbd5259511d23505ff08dd -- Owner: codex -- Status: Ready for Integration - -## Scope - -- X-01 live-acceptance remediation on exact client coordinator HEAD - `2f346687b173137135dbd5259511d23505ff08dd`. -- Fix the confirmed root `injectProjectData` preview failure in - `electron/agent-browser/module.ts` by passing the intended preview target - Origin explicitly into root preview-data installation. -- Add the narrow Agent Browser regression test and this task-scoped record only. - -## Intent And Constraints - -- Follow Data Service P0 spec §10.4 and §14 groups 2 and 13, plus the X-01 - remediation finding. Preserve explicit opt-in, exact-Origin capability - binding, child/sessionRef behavior, lifecycle cleanup, and ordinary browser - navigation without data injection. -- The confirmed cause is that `open()` initializes `record.url` to the target, - prime navigation to `about:blank` mutates it, and root installation later - derives Origin from the mutated URL. The fix must carry the target URL - directly; it must not weaken Origin checks or add a second browser/preload. -- Only this task worktree may be modified. The occupied coordinator worktree, - its untracked X-01 probe scripts, all other source files, and the prior ML-09 - source worktree are read-only context. -- Do not alter child/sessionRef installation semantics, route behavior, server - code, unrelated E2E selectors, or canonical project memory. - -## Planning Gate - -- Result: Passed on 2026-08-27. -- Concurrent gate ran `check_project_docs.py`, then - `task_context.py start` against the occupied coordinator worktree with - `--base-ref 2f346687b173137135dbd5259511d23505ff08dd`; status JSON verified - this task ID, feature mode, absolute worktree/branch, and exact base. -- Read the required MakeLore project-memory startup set, the coordinator task - record, Agent Browser architecture/data-flow seams, and the X-01 scope. The - coordinator owns the parent worktree and its live probes; this task owns only - the isolated module/test/record paths, with no unresolved semantic conflict. - -## Outcome - -- Passed the intended `targetUrl` explicitly to the root preview-data - installation call. Root session Origin now derives from that stable target - URL even when the prime `about:blank` navigation updates `record.url`; - child/sessionRef installation remains on its existing call path. -- Added a narrow Agent Browser regression whose fake prime navigation emits - `did-navigate` for `about:blank`. Before the fix it observed `origin: "null"`; - after the fix it observes `http://127.0.0.1:4173`. - -## Plan - -1. Inspect the current root/child preview installation seam and add a failing - regression proving a prime `about:blank` navigation cannot change the Origin - used for root injection. -2. Pass the intended target URL through root installation with the smallest - signature/call-site change; keep child/sessionRef handling unchanged. -3. Run focused Agent Browser/preview tests, typecheck, scoped lint and diff/doc - gates, then commit once with a clean isolated worktree. - -## Verification - -- Red-first regression: - `pnpm exec vitest run tests/unit/agent-browser-core.test.ts -t "uses the - target Origin when the prime navigation reports about:blank" --maxWorkers=1` - failed as expected before the implementation (`received origin: "null"`). -- Focused tests: - `pnpm exec vitest run tests/unit/agent-browser-core.test.ts - tests/unit/preview-data-session.test.ts --maxWorkers=1` — 2 files, 84 tests - passed. -- `pnpm run typecheck` — passed. -- `pnpm exec eslint electron/agent-browser/module.ts - tests/unit/agent-browser-core.test.ts` — passed. -- `git diff --check` — passed. -- No Electron E2E or live X-01 acceptance was run in this narrow remediation; - the coordinator must rerun live acceptance after integration. - -## Follow-ups - -- Parent coordinator should integrate the single commit and rerun X-01 with - the real PostgreSQL and signed-in MakeLore preview. Do not treat this - repository-local focused verification as live acceptance. - -## Promotion Candidates - -- None recorded.