fix(coding): remediate data service review findings
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
# Task: ML-09 data service remediation
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260827-ml09-data-service-remediation-5e7c2a91
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260827-ml09-data-service-remediation-5e7c2a91-ml09-data-service-remediation
|
||||
- Worktree: D:\Datas\OthersProjects\makelore-ml09-data-service-remediation-5e7c2a91
|
||||
- Base commit: 239e20d2cf2242d636f9d42684f76f5777d9d1ee
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- ML-09 repository-local remediation on the exact ML-08 client head
|
||||
`239e20d2cf2242d636f9d42684f76f5777d9d1ee`.
|
||||
- Resolve every accepted Standards/Spec review finding in one focused pass:
|
||||
normal Pi worker Data Service tool allowlist, Pi camelCase Skill input,
|
||||
loopback preview Origin acceptance, browser-generation lifecycle fencing,
|
||||
README/Skill documentation, narrow parser sharing, and removal of two
|
||||
unused compatibility seams.
|
||||
- Keep the remediation limited to existing Data Service, Pi, Skill, preview,
|
||||
routing, and tests; do not alter the unrelated Pi E2E selector failure.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Follow the MakeLore Data Service P0 specification sections 9.4, 10.1-10.3,
|
||||
11-13 and ticket ML-09 in the accepted ticket graph. Main remains the only
|
||||
Works credential owner; preview capability remains explicit, exact-Origin,
|
||||
data-only, loopback-bound, and generation-bound.
|
||||
- Preserve child explicit profiles, existing Agent Browser abstraction, route
|
||||
auth/error/response ownership, ten public Data Service operations, and the
|
||||
fixed SDK/Skill protocol. Do not add a generic route/repository/wrapper,
|
||||
Firebase compatibility, retries, broad CORS, or unrelated E2E changes.
|
||||
- Confirmed facts: the client coordinator has integrated ML-01 through ML-08
|
||||
and is clean at the stated base; the server contract/ADR are the canonical
|
||||
cross-repository inputs. The known full-E2E Pi model-combobox timeout is
|
||||
pre-existing and outside this remediation unless red evidence ties it to
|
||||
this diff. Review ledger accepted eight findings: allowlist, camelCase
|
||||
Skill field, loopback Origin, generation equality, README, narrow parser
|
||||
sharing, unused `onLifecycle`, and unused `handleDataServiceRoute`.
|
||||
- Unverified external inputs remain signed-in live acceptance, deployed server
|
||||
state, and production packaging; this task cannot claim them.
|
||||
|
||||
## Planning Gate
|
||||
|
||||
- Result: Passed on 2026-08-27.
|
||||
- Concurrent gate ran `check_project_docs.py`, then `task_context.py start`
|
||||
with an occupied coordinator as source, producing the isolated worktree and
|
||||
matching Git-common ownership. `status --json` verified the task ID, feature
|
||||
mode, absolute worktree, branch, and exact base.
|
||||
- Read the active task record, project positioning, integrated current state,
|
||||
decision index, system overview, architecture/domain/evidence/reflection/
|
||||
commitment/stale indexes, client coordinator scope, and the server's
|
||||
canonical Data Service spec, ticket graph, integration contract, and ADR.
|
||||
- Other active Data Service coordinator scope is read-only context; it owns
|
||||
the parent integration worktree, while this task owns only this remediation
|
||||
worktree. ML-01 through ML-08 source worktrees are released or integrated;
|
||||
no semantic file-ownership conflict is unresolved.
|
||||
|
||||
## Plan
|
||||
|
||||
1. Inspect current Pi tool registration, Skill assets, preview session/server,
|
||||
route modules, shared route helpers, and lifecycle wiring; add red tests for
|
||||
each accepted finding before the smallest corresponding implementation.
|
||||
2. Implement the eight fixes without widening P0 boundaries; run affected
|
||||
focused suites after each cohesive group.
|
||||
3. Run full unit (including pressure), typecheck, lint, build, Electron, and
|
||||
affected E2E checks available in this environment; retain any real
|
||||
prerequisite or pre-existing failure as an explicit deviation.
|
||||
4. Run diff/doc-drift checks, update this task record with outcome and evidence,
|
||||
commit once, and complete the Task Documentation Gate.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Completed the eight accepted ML-09 remediation findings on the exact ML-08
|
||||
client head:
|
||||
- Normal Pi parent workers now default to the exact ten Data Service tools
|
||||
from the shared contract; read-only and coding child profiles remain their
|
||||
original explicit arrays, and the packaged child proof rejects all parent
|
||||
product tools including Data Service tools.
|
||||
- The bundled Skill now uses Pi's camelCase `injectProjectData: true` open
|
||||
input. The raw Host HTTP snake_case adapter remains separate.
|
||||
- Preview sessions accept credential-free HTTP and HTTPS loopback Origins,
|
||||
including default ports, while retaining loopback, exact-origin, no-path,
|
||||
and no-credentials restrictions. Lifecycle invalidation is fenced to the
|
||||
session's current browser generation.
|
||||
- README now names the fifth opt-in `data-service` Skill and documents its
|
||||
short inspect/confirm/configure/SDK/preview read-back workflow without
|
||||
duplicating the protocol.
|
||||
- Identical Data Service record/body/path/query/revision/data parsers now
|
||||
live in the narrow `data-service-parsers.ts` module. Each route retains its
|
||||
own parser failure type/messages, authentication, response projection, and
|
||||
CORS behavior.
|
||||
- Removed the unused Agent Browser constructor `onLifecycle` option and the
|
||||
unused `handleDataServiceRoute` alias; production `subscribeLifecycle` and
|
||||
`handleDataServiceRoutes` remain.
|
||||
|
||||
## Verification
|
||||
|
||||
- RED: the new allowlist, Skill, Origin/generation, README, and alias
|
||||
assertions failed at the unfixed base as expected.
|
||||
- Focused remediation suites: 10 files, 142 passed, 2 skipped.
|
||||
- Full unit and pressure suites: 188 files, 1,612 passed, 2 skipped; pressure
|
||||
suite 1 passed.
|
||||
- `pnpm run typecheck`: passed.
|
||||
- `pnpm run lint:check`: passed with five existing warnings in
|
||||
`src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`; no errors.
|
||||
- `pnpm run build`: passed, including Vite, staged Pi runtime, and Windows
|
||||
Electron packaging. Existing chunk-size, optional-resource, and NSIS patch
|
||||
warnings remained non-fatal.
|
||||
- `pnpm run test:electron:windows`: 2 files, 4 passed.
|
||||
- Affected E2E: `project-configuration-skills.spec.ts` 1 passed. The Pi chat
|
||||
spec had 1 passed and 1 timeout on the known model-combobox selector; the
|
||||
failure is the same pre-existing baseline issue and has no diff evidence,
|
||||
so it was not changed.
|
||||
- `git diff --check` and the project-docs ownership/drift checks passed.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Parent integration must merge this single remediation commit into the client
|
||||
coordinator branch, then run the cross-repository X-01 against real
|
||||
PostgreSQL and a logged-in MakeLore preview. This task did not claim live
|
||||
acceptance or server deployment state.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- None recorded; the remediation changes are repository-local and the
|
||||
canonical cross-repository contract/ADR already describe the retained
|
||||
boundaries.
|
||||
Reference in New Issue
Block a user