Skip to content

test: support promoted theme-surface codemod - #7408

Merged
cixzhang merged 1 commit into
mainfrom
test/codemod-promotion-import
Oct 13, 2026
Merged

cixzhang merged 1 commit into
mainfrom
test/codemod-promotion-import

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

Keeps the theming-target enumerability test valid on both sides of codemod promotion:

  • reads the staged transform from next/ before a release merges back
  • reads the immutable v0.7.0/ transform after promotion

This 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

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 13, 2026 2:04am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 13, 2026
@astracat-bot

astracat-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 13, 2026, 2:17 AM UTC

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@cixzhang
cixzhang merged commit dfce175 into main Oct 13, 2026
41 of 42 checks passed
@cixzhang
cixzhang deleted the test/codemod-promotion-import branch October 13, 2026 04:12
cixzhang added a commit that referenced this pull request Oct 15, 2026
## 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.

This branch was successfully deployed

1 active deployment
Preview — e46932d6 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant