Commit Graph

1 Commits

Author SHA1 Message Date
Cursor Agent
999c6cd68a test(plugins): full code-migration pipeline e2e smoke test (Phase 7-8)
Plan S2 / spec §1 / §10 / §20.3 / §21.3.2.

apps/daemon/tests/plugins-code-migration-e2e.test.ts exercises
every Phase 6/7/8 atom impl in sequence on a Next.js fixture repo,
proving the contract chain works end-to-end without any agent /
LLM in the loop:

  code-import     \u2192 code/index.json
  design-extract  \u2192 code/tokens.json (hex colour lifted)
  token-map       \u2192 token-map/colors.json (mapped to design system)
  rewrite-plan    \u2192 plan/{plan.md, ownership.json, steps.json,
                       meta.json}
  patch-edit      \u2192 components/Button.tsx mutated via unified diff;
                       plan/receipts/step-rewrite-button.json written
  build-test      \u2192 critique/build-test.json (no-op commands so we
                       don't shell out to a real toolchain in CI)
  diff-review     \u2192 review/{diff.patch, summary.md, decision.json,
                       meta.json}
  handoff         \u2192 ArtifactManifest.handoffKind='deployable-app'
                       (accept + both signals + cli exportTarget)

Also adds a second case covering the reject ladder rung
(reject + missing build-test \u2192 design-only).

This is the first integration test that walks every code-migration
atom in one go; it locks the inter-atom file contract so a future
PR can't break the chain by, say, renaming code/tokens.json or
adding a required field to plan/steps.json without updating every
downstream reader.

Daemon tests: 1639 \u2192 1641 (+2 cases on
plugins-code-migration-e2e: full chain ending on
deployable-app, reject \u2192 design-only).

Co-authored-by: Tom Huang <1043269994@qq.com>
2026-05-09 15:55:57 +00:00