fix(coverage): support new TypeScript fixture layout - #26226
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 761b2b410b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Updates Oxc’s coverage and conformance harnesses to match TypeScript’s merged tsc/testdata repository layout, keeping TypeScript- and ESTree-based snapshot outputs in sync with the newly pinned submodule SHAs.
Changes:
- Switch TypeScript case/baseline roots to
typescript/tsc/testdata/...and centralize them viaCASES_PATH,BASELINES_PATH, andbaseline_root. - Update TypeScript transpile and baseline collectors (including diagnostics-code collection) to resolve baselines from the new layout.
- Refresh coverage snapshots and bump the pinned TypeScript + estree-conformance SHAs used by CI cloning scripts and test utilities.
Reviewed changes
Copilot reviewed 3 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/transform_conformance/tests/legacy-decorators/test/fixtures/update-fixtures.js | Updates the legacy-decorators fixture updater to point at the new TypeScript testdata location. |
| tasks/coverage/src/typescript/mod.rs | Introduces centralized TypeScript CASES_PATH/BASELINES_PATH and baseline_root() helper. |
| tasks/coverage/src/load.rs | Loads TypeScript fixtures from the new CASES_PATH. |
| tasks/coverage/src/lib.rs | Switches the TypeScript root constant to use typescript::CASES_PATH. |
| tasks/coverage/src/typescript/meta.rs | Resolves .errors.txt baselines via baseline_root() under the new layout. |
| tasks/coverage/src/typescript/type_symbol_baseline.rs | Updates baseline/header path handling and baseline resolution for the new TypeScript layout. |
| tasks/coverage/src/typescript/transpile_runner.rs | Moves transpile case/baseline roots to the new layout constants. |
| tasks/coverage/src/typescript/diagnostics_code_collector.rs | Collects diagnostics codes from tsc/testdata baselines and snapshots the TypeScript repo root. |
| tasks/coverage/src/tools.rs | Updates TypeScript ESTree skip paths to the new TypeScript layout. |
| tasks/coverage/src/main.rs | Updates an example path comment to the new TypeScript layout. |
| tasks/coverage/snapshots/tsc_diagnostics_codes.snap | Updates diagnostics-code snapshot for the newly pinned TypeScript revision. |
| tasks/coverage/snapshots/transformer_typescript.snap | Refreshes transformer TypeScript coverage snapshot paths/results. |
| tasks/coverage/snapshots/formatter_typescript.snap | Refreshes formatter TypeScript coverage snapshot paths/results. |
| tasks/coverage/snapshots/estree_typescript.snap | Refreshes ESTree TypeScript snapshot paths/results (including newly recorded failures/panics). |
| tasks/coverage/snapshots/estree_typescript_tokens.snap | Refreshes ESTree TypeScript tokens snapshot paths/results. |
| tasks/coverage/snapshots/estree_acorn_jsx.snap | Updates estree-conformance commit reference. |
| tasks/coverage/snapshots/estree_acorn_jsx_tokens.snap | Updates estree-conformance commit reference (tokens). |
| tasks/coverage/snapshots/codegen_typescript.snap | Refreshes codegen TypeScript snapshot paths/results. |
| packages/codegen/test/utils/common.ts | Updates the TypeScript cases directory used by codegen tests. |
| .github/scripts/clone-parallel.mjs | Bumps pinned submodule SHAs for TypeScript and estree-conformance used by CI cloning. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| Positive Passed: 9783/9783 (100.00%) | ||
| AST Parsed : 10077/10077 (100.00%) | ||
| Positive Passed: 10076/10077 (99.99%) | ||
| Normal: tasks/coverage/typescript/tsc/testdata/tests/cases/compiler/braceEscapedSurrogatePairLiteralType.ts |
There was a problem hiding this comment.
lone surrogates bug - probably related to #16886
6fb67c7 to
71652fc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71652fce22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| let file_name = path.file_stem().unwrap().to_string_lossy(); | ||
| let root = workspace_root().join("typescript/tests/baselines/reference"); | ||
| let root = baseline_root(path); |
There was a problem hiding this comment.
Preserve nested TypeScript baseline paths
When an error baseline is nested below reference/compiler or reference/conformance, this reduces its location to the suite directory, and the later direct root.join(filename) lookup never searches the descendants that the updated diagnostics collector now traverses with WalkDir. The refreshed parser snapshot consequently reclassifies former negative fixtures such as alwaysStrictModule2.ts and declFileWithErrorsInInputDeclarationFileWithOut.ts as positive “Expect to Parse” failures, corrupting the reported conformance rates even though their error baselines still exist; preserve the baseline’s relative subdirectory or search beneath the suite root.
AGENTS.md reference: AGENTS.md:L243-L245
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3276311ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub const CASES_PATH: &str = "typescript/tsc/testdata/tests/cases"; | ||
| pub const BASELINES_PATH: &str = "typescript/tsc/testdata/baselines/reference"; |
There was a problem hiding this comment.
Refresh snapshots for the relocated TypeScript suites
Refresh transpile.snap, symbols_typescript.snap, errors_typescript.snap, and types_typescript.snap along with these root changes. The opt-in cargo coverage -- transpiler and cargo coverage -- types runners now read from the new locations, but their checked-in snapshots still contain obsolete typescript/tests/cases/... paths and older fixture commits, so their recorded failures no longer describe the suite these runners execute and the next snapshot update will produce a large unrelated diff.
AGENTS.md reference: AGENTS.md:L276-L282
Useful? React with 👍 / 👎.
camc314
left a comment
There was a problem hiding this comment.
Blocked by microsoft/TypeScript#64122
b327631 to
83808a6
Compare
Summary