Skip to content

fix(review): include TypeScript module extensions - #1962

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Afloat16:fix/typescript-module-review
Nov 21, 2026
Merged

lizhengfeng101 merged 1 commit into
alibaba:mainfrom
Afloat16:fix/typescript-module-review

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

TypeScript supports .mts and .cts source modules (and .d.mts / .d.cts declarations), but the default file allowlist currently rejects these extensions as unsupported_ext. Both ocr review and ocr scan therefore skip these files before review starts. The TypeScript rule mapping also omits them.

Add both extensions to the allowlist and route them to the existing TypeScript rules. Extend the existing test/spec exclusions to cover these extensions, preserving the same default selection policy as .ts files. Update the five localized rule tables together.

The extensions are documented in the TypeScript 4.7 release notes.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Documentation review follow-up — 2026-11-19

Current single-commit head: 6e54d2764928bbad4ef38601d3d124625c74e347.

Adjusted the TypeScript glob row in all five localized review-rules.md files (en, ja, ko, ru, zh) from 18 to 10 padding spaces. Each pattern cell is now 49 characters wide. This is a five-line whitespace-only correction folded into the existing single commit; the implementation, configuration and all other files remain byte-for-byte identical to the previously reviewed 3b821705c7120041402bf341b0ee4b09bd86fb17 tree.

Verified all five exact cell widths and padding lengths, unchanged non-whitespace content, LF line endings, and git diff --check. The implementation test results below belong to the earlier validated tree; the full Go suites were not rerun for this whitespace-only correction. The required ocr review --audience agent --background "..." command was invoked again and still reported no configured LLM endpoint.

Implementation verification

For the implementation validation below, rebased onto main at 445ad9dea3057346986197385858a1a281253cc9 and squashed the three commits into 3b821705c7120041402bf341b0ee4b09bd86fb17, as requested. The final eight-file patch is byte-for-byte identical to the previously reviewed patch. internal/agent/preview_run_test.go remains identical to upstream, and typescript_module_test.go remains absent.

Validation on the rebased tree, with Go 1.26.10 on Linux:

  • make check — passed with no additional formatting or dependency changes.
  • Full make coverage — passed with 91.8% overall coverage, above the 90% threshold.
  • make test PACKAGES="./internal/config/allowlist ./internal/config/rules ./internal/agent ./internal/scan" — passed with the race detector: 360 top-level tests passed, with two existing platform-dependent tests skipped on Linux.
  • make build — passed.
  • Independent diff review and git diff --check — passed; the published tree matches the locally validated tree.

The telemetry sampler was explicitly set to always_on for the test suites. The required ocr review --audience agent --background "..." command was invoked and reported no configured LLM endpoint.

Checklist

  • The change follows the project's coding style.
  • Existing test and coverage suites pass after removing the additional agent-level cases.
  • Existing unit tests pass locally.
  • I have signed the CLA.

Primary contributor: Afloat16.

AI/LLM disclosure: OpenAI ChatGPT (GPT-6 Astra Pro).

@CLAassistant

CLAassistant commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 3 selected item(s).

@wu21-web wu21-web 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.

Your previous edits does not address issues. If coverage tests are passing, you don't need an external test.

Comment thread internal/agent/preview_run_test.go Resolved
Comment thread internal/agent/preview_run_test.go Resolved

@wu21-web wu21-web 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.

Yes, that looks better. Can you rebase main and squash your commits?

@Afloat16
Afloat16 force-pushed the fix/typescript-module-review branch from 1e16c7e to 3b82170 Compare November 19, 2026 03:23
@Afloat16

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (445ad9d) and squashed the three commits into one: 3b82170. The eight-file patch is byte-for-byte unchanged, and the removed agent-level tests/imports remain absent.

Revalidated the rebased tree: make check and make build pass; full make coverage is 91.8%; the four related packages pass 360 top-level tests with race detection (two existing platform skips). Independent diff review and git diff --check pass. The branch update used a lease against the previous head.

@Afloat16
Afloat16 requested a review from wu21-web November 19, 2026 03:35
chaojixinren

This comment was marked as off-topic.

@chaojixinren chaojixinren 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.

LGTM

@Afloat16
Afloat16 force-pushed the fix/typescript-module-review branch from 3b82170 to 6e54d27 Compare November 19, 2026 06:54
@Afloat16

Copy link
Copy Markdown
Contributor Author

Addressed in the single-commit head 6e54d2764928bbad4ef38601d3d124625c74e347. The TypeScript glob row now has 10 padding spaces in all five locales (en, ja, ko, ru, zh), keeping each pattern cell 49 characters wide.

Verified all five cell widths, unchanged non-whitespace content, LF line endings, and git diff --check. The implementation/configuration files and every other file are unchanged from the previously reviewed head.

@lizhengfeng101 lizhengfeng101 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.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 5617876 into alibaba:main Nov 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants