Repository navigation
test: support promoted theme-surface codemod - #7408
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
This looks correct and ready for maintainer approval: the theming-targets suite now loads its removed-alias list from transforms/v0.7.0/ after promotion and from transforms/next/ before it, and it passes in both layouts, while the previous static import fails once the release renames the transform. It also addresses the test-node failure on the v0.7.0 merge-back PR (#7404), so landing this first should let that check pass once the merge-back is refreshed. The failing lint check comes from main's post-release version gate rather than from this change, so nothing further is needed from you.
[Automated review]
## Exact decision needed Release generation intentionally moves staged codemods from `transforms/next/` into an immutable version folder. Repository tests and validators that read transform source can become path-coupled to either side of that move. The decision is whether evidence must follow one transform identity through both lifecycle locations instead of treating promotion as deletion. ## Existing authority searched - `spec:AST-017` FR47 and FR50 own release-branch version generation, promoted codemods as exact release output, and merge-back of those bytes. - `spec:AST-040` owns what codemods may modify in consumer files; it does not own repository source location or release promotion. - `scripts/promote-codemod-next.mjs` moves staged modules, tests, and the manifest into `v<declared-version>/`, reseeds `next/`, and updates the registry. - #7408 made one source-level guard tolerate the `next/` and `v0.7.0/` locations. No current rule generalizes that requirement. AST-017 is the canonical owner because this is release-output identity, not a consumer-file modification rule. ## Decision A staged codemod and its promoted release copy are one transform at two lifecycle locations. Any checked-in test, validator, documentation generator, or other repository evidence that reads transform source identifies the transform independently of its folder and resolves the lifecycle-appropriate staged or promoted location. Evidence fails when the transform is missing, when multiple candidates make its identity ambiguous, or when promotion no longer exposes the same transform identity and declared entry set. Promotion does not retain a duplicate under `next/` merely to keep a source path stable. This rule changes no consumer migration contract and does not prescribe one resolver implementation. It requires the same source-owned proof to remain active before and after expected promotion. ## Rejected alternatives - **Keep a duplicate under `next/`:** creates two writable owners and lets the copies drift. - **Hardcode only the staged path:** turns expected release generation into a test failure or silently dropped evidence. - **Hardcode one immutable version forever:** cannot validate the staged state before that release and does not generalize to another transform. - **Copy transform declarations into the test:** replaces source evidence with a parallel hand-maintained list. ## Claim scope and non-goals This is a specification-only proposal. It does not change codemod promotion, edit #7408, add a source resolver, alter consumer migration semantics, or modify release artifacts. ## Implementation relationship A later implementation can use explicit lifecycle candidates, manifests, a shared resolver, or another equivalent mechanism. It must fail missing/ambiguous identity, prove the evidence runs on both sides of promotion, and preserve one source transform. That implementation remains a separate atomic change. ## Writing rubric results R1 narration: none in the record; the new requirement and decision describe the present lifecycle contract. R2 research: none in the record; the `0.7.0` incident and implementation inspection stay in this pull-request description. R3 evidence: FR52 verification names staged/promoted/missing/ambiguous states rather than a pull request or workflow. R4 rejected alternatives: DEC-19 keeps one bounded `Rejected:` paragraph inside the decision. R5 change references: none added to the record. R6 open questions: none; the proposal states one exact decision for owner approval. ## Scope - [x] The canonical owner and affected current claims are named. - [x] One release-evidence identity decision changes. - [x] Implementation and consumer behavior remain outside scope. - [x] Public text contains no private or internal operational context. ## Validation - `pnpm check:knowledge` - `pnpm check:repo` - Prettier - `git diff --check` - Merged main: `main` took FR53 and DEC-20; this record keeps FR52 and DEC-19 (#7445 renumbered its decision to DEC-21). The requirement and decision text are unchanged. - Owner decision: the spec owner approved this record change on 2026-10-14 ("Merge the specs", 19:31 PT; "Can you resolve the not merging specs", 19:33 PT), so its decision records `cixzhang`, 2026-10-14, as decider.
Summary
Keeps the theming-target enumerability test valid on both sides of codemod promotion:
next/before a release merges backv0.7.0/transform after promotionThis changes test wiring only; package source and published output are unchanged.
Test plan
pnpm vitest run --project node packages/cli/foundation/discovery/theming-targets.test.mjs