openpencil/apps/web
Fini 3a809bee05 test(ai): shim × server-builders parity drift guard (49 cases)
Bilateral drift guard across three registries + two executable paths:

Registries:
  - ELEMENT_SHIMS (client shim, apps/web)
  - SUPPORTED_EMBEDDED_ELEMENT_TOOLS (canonical exported list)
  - ELEMENT_TOOL_NAMES (pen-mcp source of truth for all 42 tools)

Executable paths:
  - A: client shim → pen-core buildX
  - B: server /api/mcp/exec-tool → pen-core buildX

Since both paths delegate to the SAME pen-core buildX, the structural
parity is transitive: if shim output matches direct buildX output,
server output matches too.

Tests:
- CASES (42 fixtures) covers every ELEMENT_SHIMS key — refactor adding
  a new shim without a test row fails here.
- CASES covers SUPPORTED_EMBEDDED_ELEMENT_TOOLS — same guarantee at
  the exported constant.
- SUPPORTED_EMBEDDED_ELEMENT_TOOLS ⊆ ELEMENT_TOOL_NAMES — shim must
  only expose tools that pen-mcp actually defines.
- No duplicate keys in ELEMENT_SHIMS.
- For each tool: stripIds(shim(args).node) === stripIds(buildX(args)).
  The shim is a pure delegation layer plus id stamping.
- Meta-param extraction: parent_id / pageId / filePath are split out
  BEFORE the builder sees them (no spurious field leak into the node).

If any of these diverge in future refactors, the failure points
directly at the broken registry or transformation.
2026-04-22 01:57:22 +08:00
..
public V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
server test(ai): Nitro /api/mcp/exec-tool endpoint unit tests (12 cases) 2026-04-22 00:41:15 +08:00
src test(ai): shim × server-builders parity drift guard (49 cases) 2026-04-22 01:57:22 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
components.json V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
dev.ts V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
package.json chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
tsconfig.json V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
vite.config.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00