fix(coding): tighten Pi Data Service schemas

This commit is contained in:
2026-08-26 20:03:07 +08:00
parent 1d63233cd0
commit f61990f3a7
3 changed files with 28 additions and 5 deletions

View File

@@ -101,6 +101,9 @@
- Preserved the bundled parent-role registration gate and extension-host child
bridge `403`; added tests for all ten registrations, dispatch routing,
trusted path authority, forbidden input fields, and confirmation rejection.
- Follow-up correction tightened the bundled document and revision schemas to
match Main-side validation: `document_id` rejects `.`/`..`, and `if_revision`
is capped at `Number.MAX_SAFE_INTEGER`; focused assertions cover both rules.
- No canonical project memory was changed. The only non-Main contract touch is
the minimal conversation timeline summary required for the new discriminated
safe-detail type to remain type-safe and visible.
@@ -108,6 +111,8 @@
## Verification
- `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` — 23 passed.
- Schema-hardening rerun of the focused Pi suite — 23 passed, including the
`document_id` and `if_revision` bundled-schema assertions.
- Data Service/projector plus Pi focused suites — 62 passed.
- Full unit suite excluding the separately serialized pressure test — 186
files, 1,574 passed, 2 skipped.