Skip to content

fix(coverage): support new TypeScript fixture layout - #26226

Draft
camc314 wants to merge 7 commits into
mainfrom
codex/update-typescript-go-layout
Draft

fix(coverage): support new TypeScript fixture layout#26226
camc314 wants to merge 7 commits into
mainfrom
codex/update-typescript-go-layout

Conversation

@camc314

@camc314 camc314 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin microsoft/TypeScript to f52473a2ed51bfddc972bb509517f85342d859df
  • update coverage, codegen, transpiler, diagnostics, and legacy-decorator paths for the merged tsc/testdata layout
  • pin oxc-project/estree-conformance to 12bcc047d1d902fd8f4da5c26a8c5acc4b1303e2 and refresh ESTree snapshots
  • skip the invalid-UTF-8 TypeScript ESTree token fixture that triggers the parser failure already recorded by parser coverage

Copilot AI lite review requested due to automatic review settings September 1, 2026 15:02
@camc314
camc314 requested a review from Dunqing as a code owner September 1, 2026 15:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T16:06:02.274867Z b327631 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added A-transformer Area - Transformer / Transpiler A-codegen Area - Code Generation labels Sep 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread tasks/coverage/src/tools.rs

Copilot AI 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.

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 via CASES_PATH, BASELINES_PATH, and baseline_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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lone surrogates bug - probably related to #16886

@camc314
camc314 force-pushed the codex/update-typescript-go-layout branch from 6fb67c7 to 71652fc Compare September 1, 2026 15:23
@camc314 camc314 changed the title fix(coverage): support merged TypeScript fixture layout fix(coverage): support new TypeScript fixture layout Sep 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +15 to +16
pub const CASES_PATH: &str = "typescript/tsc/testdata/tests/cases";
pub const BASELINES_PATH: &str = "typescript/tsc/testdata/baselines/reference";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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
camc314 marked this pull request as draft September 1, 2026 16:14

@camc314 camc314 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@camc314
camc314 force-pushed the codex/update-typescript-go-layout branch from b327631 to 83808a6 Compare September 3, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation A-transformer Area - Transformer / Transpiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants