Skip to content

fix(lint/no-base-to-string): don't cache certainty that depends on the recursion path - #1192

Merged
camc314 merged 1 commit into
fix/lint-consistent-return-1445from
fix/lint-no-base-to-string-1447
Dec 1, 2026
Merged

camc314 merged 1 commit into
fix/lint-consistent-return-1445from
fix/lint-no-base-to-string-1447

Conversation

@camc314

@camc314 camc314 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Ports oxc-project/tsgolint#1447 (b7a15ffc), including its baseline update.

Certainty results were cached per type, even when a result depended on which types were still being resolved. Like typescript-eslint's visited set, a recursive type that comes back while it is still being resolved is treated as useful, but that result was cached and reused at later call sites, so a report depended on statement order. The memo now only caches results that don't depend on a type still being resolved, and recomputes the others, as the reference does by starting a new visited set for each check.

type A = [B, { id: number }];
type B = [A];
declare const a: A;
declare const b: B;
String(a); // reported
String(b); // now also reported

Copilot AI balanced review requested due to automatic review settings November 30, 2026 14:31

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: βœ… Completed

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

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-12-01T09:22:21.290348Z 98879b6 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.

@camc314
camc314 added this pull request to stack #1163 November 30, 2026 14:32
@camc314
camc314 force-pushed the fix/lint-no-base-to-string-1447 branch from 81b5d97 to 1562a4f Compare November 30, 2026 14:55
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Performance change vs main

Workflow run Β· main 6bf86c6fc827 β†’ PR merge f24bdcb81065 (head 98879b69c124)

Clef gate: Running benchmarks because the decision was unavailable (crates/tsrs_lint/src/rules/no_base_to_string.rs: patch exceeds the Clef context limit (9564 bytes)).

Release builds in fast mode (TSRS_FAST=1) with Hyperfine 2 hardware counters. After warming each binary, alternating main/PR pairs measure wall time at both the fast preset's default checker count and with --singleThreaded, with ten pairs per configuration by default. Instructions come from the single-threaded runs; peak RSS comes from the default-count runs.
Incremental runs start with fresh build info before every invocation; check runs disable incremental compilation.

Project Mode Single-thread wall time Ξ” Single-thread instructions Ξ” Default wall time Ξ” Default peak RSS Ξ”
vscode check -3.7% 0.000% -3.0% +0.1%
vscode incremental -0.1% -0.001% -0.9% -0.2%
xstate-main check +0.7% 0.000% +0.7% +0.2%
xstate-main incremental -1.1% -0.003% +0.2% -0.2%
webpack check -0.2% +0.003% +3.1% -0.3%
webpack incremental +1.0% -0.001% +1.5% -0.1%
mui-docs check -1.5% +0.005% -2.3% +0.3%
mui-docs incremental -1.5% 0.000% +1.2% +0.2%
Compiler check -1.9% 0.000% +1.4% +0.2%
Compiler incremental +0.7% 0.000% -2.1% +0.2%
Compiler-Unions check -0.7% 0.000% +3.5% -0.6%
Compiler-Unions incremental -0.8% 0.000% +0.9% +0.1%
cal-diy check 0.0% -0.001% +0.1% +0.5%
cal-diy incremental -1.2% -0.001% -1.3% -0.1%
formbricks-web check +1.3% -0.001% +1.8% 0.0%
formbricks-web incremental -0.1% -0.001% -0.1% -0.1%
supabase-studio check -1.0% -0.003% +0.2% +0.1%
supabase-studio incremental +1.0% -0.001% -0.5% 0.0%
t3code-server check +0.3% -0.002% +0.2% +0.2%
t3code-server incremental -0.7% +0.002% -1.5% -0.3%
mikro-orm check +0.1% 0.000% +0.3% -0.1%
mikro-orm incremental -1.0% +0.002% +0.2% +0.1%
next-packages-next check +0.4% +0.001% +0.3% 0.0%
next-packages-next incremental +0.3% +0.002% -0.4% 0.0%
next-root check 0.0% 0.000% -1.4% +0.6%
next-root incremental +0.1% -0.001% +0.3% +0.4%
storybook check -1.8% +0.001% +0.8% -0.2%
storybook incremental -2.5% -0.002% -0.6% +0.1%
nuxt check -0.5% 0.000% -1.8% -0.4%
nuxt incremental -0.4% -0.003% +1.5% +0.1%
playwright check +0.5% 0.000% +1.3% +0.7%
playwright incremental -0.8% 0.000% -3.6% -0.2%
drizzle-orm check -1.1% -0.004% +0.6% -0.1%
drizzle-orm incremental -1.4% 0.000% -4.3% 0.0%
typeorm check -0.3% -0.001% +1.3% -0.1%
typeorm incremental +1.2% +0.002% -3.4% -0.7%
date-fns check -1.4% -0.003% +4.6% -0.4%
date-fns incremental -0.1% +0.007% 0.0% +0.2%
opencode-core check +2.5% +0.003% +0.2% -0.5%
opencode-core incremental -0.6% -0.001% +9.1% 0.0%
lobehub check -2.1% -0.009% -5.0% -0.2%
lobehub incremental -1.3% -0.005% -0.7% 0.0%
sentry check -0.7% -0.001% -0.2% 0.0%
sentry incremental +1.0% -0.003% -1.0% +0.1%

Negative means the PR used less; positive means it used more. Deltas are medians of paired PR/main ratios for wall time and instructions. Single-threaded runs reduce scheduling noise; shared CI machines can still add noise to wall time.

Measured medians (main β†’ PR)
Project Mode Single-thread wall time (s) Single-thread instructions Default wall time (s) Default peak RSS (MiB)
vscode check 10.023 β†’ 9.506 81,815,342,237.5 β†’ 81,815,475,355 1.923 β†’ 1.870 1804.1 β†’ 1805.5
vscode incremental 10.892 β†’ 10.799 84,217,674,063 β†’ 84,217,112,262.5 1.875 β†’ 1.839 2128.7 β†’ 2123.5
xstate-main check 0.600 β†’ 0.586 5,520,602,329.5 β†’ 5,520,601,985 0.137 β†’ 0.138 241.0 β†’ 241.4
xstate-main incremental 0.563 β†’ 0.555 5,679,480,804 β†’ 5,679,384,137 0.162 β†’ 0.162 242.2 β†’ 241.8
webpack check 1.008 β†’ 1.006 10,759,847,375 β†’ 10,759,961,270.5 0.221 β†’ 0.228 400.7 β†’ 399.7
webpack incremental 1.006 β†’ 1.015 10,980,331,107.5 β†’ 10,980,134,364 0.246 β†’ 0.253 399.2 β†’ 398.6
mui-docs check 2.498 β†’ 2.494 32,889,409,379 β†’ 32,890,149,637.5 1.025 β†’ 1.026 1184.8 β†’ 1188.5
mui-docs incremental 2.685 β†’ 2.672 34,220,255,253 β†’ 34,220,079,938 1.144 β†’ 1.173 1139.2 β†’ 1141.3
Compiler check 0.141 β†’ 0.139 1,745,219,171 β†’ 1,745,225,448 0.066 β†’ 0.066 76.9 β†’ 77.1
Compiler incremental 0.155 β†’ 0.156 1,759,522,705.5 β†’ 1,759,524,518.5 0.077 β†’ 0.074 78.3 β†’ 78.4
Compiler-Unions check 0.234 β†’ 0.242 3,014,341,403.5 β†’ 3,014,346,270 0.110 β†’ 0.113 80.5 β†’ 80.0
Compiler-Unions incremental 0.208 β†’ 0.200 3,026,949,180.5 β†’ 3,026,964,940.5 0.092 β†’ 0.093 83.6 β†’ 83.7
cal-diy check 2.752 β†’ 2.765 28,707,318,379 β†’ 28,707,090,023.5 0.809 β†’ 0.811 1333.8 β†’ 1340.4
cal-diy incremental 3.497 β†’ 3.428 30,307,536,344.5 β†’ 30,307,889,041.5 1.294 β†’ 1.270 1247.3 β†’ 1246.0
formbricks-web check 3.762 β†’ 3.699 36,892,595,084 β†’ 36,892,522,184.5 0.864 β†’ 0.896 1558.4 β†’ 1559.1
formbricks-web incremental 4.240 β†’ 4.205 39,474,712,919 β†’ 39,473,944,960 1.236 β†’ 1.238 1600.9 β†’ 1599.4
supabase-studio check 4.485 β†’ 4.295 40,540,460,459 β†’ 40,539,431,295 0.978 β†’ 0.984 1286.1 β†’ 1286.9
supabase-studio incremental 4.530 β†’ 4.525 43,470,639,446 β†’ 43,469,831,293 1.108 β†’ 1.102 1342.6 β†’ 1343.0
t3code-server check 4.236 β†’ 4.229 40,781,658,997.5 β†’ 40,781,459,179.5 1.164 β†’ 1.177 1296.2 β†’ 1299.3
t3code-server incremental 3.952 β†’ 3.931 41,291,145,652 β†’ 41,292,430,959.5 1.439 β†’ 1.426 1296.1 β†’ 1292.8
mikro-orm check 4.020 β†’ 4.031 44,047,483,347 β†’ 44,047,572,175 0.812 β†’ 0.818 1257.5 β†’ 1256.3
mikro-orm incremental 4.402 β†’ 4.358 44,356,385,750 β†’ 44,356,833,942 0.950 β†’ 0.950 1236.0 β†’ 1236.8
next-packages-next check 1.452 β†’ 1.460 17,278,042,088 β†’ 17,278,306,956.5 0.362 β†’ 0.362 551.8 β†’ 551.6
next-packages-next incremental 1.704 β†’ 1.707 17,588,758,702 β†’ 17,589,217,509 0.551 β†’ 0.553 555.5 β†’ 555.3
next-root check 1.173 β†’ 1.191 13,893,361,598.5 β†’ 13,893,467,363.5 0.301 β†’ 0.301 426.8 β†’ 429.5
next-root incremental 1.230 β†’ 1.234 14,350,323,475 β†’ 14,349,901,616.5 0.312 β†’ 0.314 466.8 β†’ 468.5
storybook check 0.831 β†’ 0.796 8,813,008,760.5 β†’ 8,813,061,644 0.201 β†’ 0.205 389.5 β†’ 388.8
storybook incremental 1.245 β†’ 1.226 9,132,456,125.5 β†’ 9,132,790,928 0.432 β†’ 0.455 367.8 β†’ 368.3
nuxt check 0.921 β†’ 0.935 8,428,937,714 β†’ 8,428,870,381.5 0.251 β†’ 0.249 384.4 β†’ 382.6
nuxt incremental 0.872 β†’ 0.870 8,825,508,054.5 β†’ 8,825,075,307.5 0.234 β†’ 0.239 384.4 β†’ 384.7
playwright check 0.876 β†’ 0.890 7,363,059,816 β†’ 7,363,052,387 0.197 β†’ 0.202 356.2 β†’ 358.6
playwright incremental 0.767 β†’ 0.775 7,539,465,571.5 β†’ 7,539,491,222 0.212 β†’ 0.201 337.3 β†’ 336.7
drizzle-orm check 0.512 β†’ 0.512 5,907,239,054.5 β†’ 5,906,934,434 0.173 β†’ 0.174 374.5 β†’ 374.1
drizzle-orm incremental 0.670 β†’ 0.664 6,075,992,847 β†’ 6,075,900,154 0.217 β†’ 0.206 339.1 β†’ 339.2
typeorm check 0.579 β†’ 0.581 6,344,349,933 β†’ 6,344,324,193.5 0.131 β†’ 0.132 224.3 β†’ 224.2
typeorm incremental 0.736 β†’ 0.729 6,728,550,073 β†’ 6,728,658,591.5 0.191 β†’ 0.184 231.4 β†’ 229.7
date-fns check 0.310 β†’ 0.307 3,297,391,033.5 β†’ 3,297,254,202 0.113 β†’ 0.121 150.9 β†’ 150.3
date-fns incremental 0.310 β†’ 0.309 3,531,149,507.5 β†’ 3,531,113,650.5 0.106 β†’ 0.107 161.8 β†’ 162.1
opencode-core check 2.295 β†’ 2.484 25,107,342,314 β†’ 25,107,911,525.5 1.148 β†’ 1.191 1190.2 β†’ 1184.9
opencode-core incremental 2.760 β†’ 2.738 25,468,493,125 β†’ 25,468,018,451.5 1.335 β†’ 1.481 1091.7 β†’ 1091.6
lobehub check 24.261 β†’ 24.753 185,342,474,139 β†’ 185,328,047,367 6.974 β†’ 6.949 4395.4 β†’ 4388.5
lobehub incremental 20.057 β†’ 19.991 188,888,145,022.5 β†’ 188,883,675,996.5 7.369 β†’ 7.303 4431.5 β†’ 4432.0
sentry check 9.363 β†’ 9.109 91,309,109,547.5 β†’ 91,308,337,294.5 1.845 β†’ 1.847 1756.1 β†’ 1755.3
sentry incremental 9.781 β†’ 10.072 93,270,137,288 β†’ 93,266,928,651 2.199 β†’ 2.150 1895.8 β†’ 1897.7

tsrs-lint

Release tsrs-lint linting each project's source files with all 61 rules. After a warmup run of each binary, alternating main/PR pairs (10 per mode) measure wall time, CPU time and peak RSS with TSRS_FAST unset and with TSRS_FAST=1.

Project Mode Wall time Ξ” CPU time Ξ” Peak RSS Ξ” Diagnostics (main β†’ PR)
webpack default -0.2% -1.1% +0.2% 35802, identical
webpack TSRS_FAST=1 +0.2% 0.0% 0.0% 35802, identical
drizzle-orm default -4.8% -0.6% 0.0% 7087, identical
drizzle-orm TSRS_FAST=1 +1.7% +0.8% +0.1% 7087, identical
xstate-main default -0.3% -0.1% -0.4% 6495, identical
xstate-main TSRS_FAST=1 -3.4% -1.5% +0.3% 6495, identical

Negative means the PR used less. Wall and CPU time deltas are medians of paired PR/main ratios; peak RSS compares medians.

Measured lint medians (main β†’ PR)
Project Mode Wall time (s) CPU time (s) Peak RSS (MiB)
webpack default 0.397 β†’ 0.392 2.003 β†’ 1.982 456.0 β†’ 456.9
webpack TSRS_FAST=1 0.397 β†’ 0.395 2.017 β†’ 2.013 455.5 β†’ 455.7
drizzle-orm default 0.286 β†’ 0.271 1.419 β†’ 1.428 392.5 β†’ 392.6
drizzle-orm TSRS_FAST=1 0.281 β†’ 0.282 1.409 β†’ 1.429 392.1 β†’ 392.5
xstate-main default 0.351 β†’ 0.348 1.536 β†’ 1.533 338.1 β†’ 336.6
xstate-main TSRS_FAST=1 0.353 β†’ 0.344 1.534 β†’ 1.529 337.6 β†’ 338.5

@camc314
camc314 force-pushed the fix/lint-no-base-to-string-1447 branch 2 times, most recently from e423de6 to d3ee1ec Compare November 30, 2026 18:12

@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: d3ee1ec2ae

ℹ️ 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".

@codspeed

codspeed Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

Warning

oxc-project has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed.

1 warning

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

βœ… 6 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing fix/lint-no-base-to-string-1447 (98879b6) with fix/lint-consistent-return-1445 (6bf86c6)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@camc314
camc314 force-pushed the fix/lint-no-base-to-string-1447 branch 2 times, most recently from 349e6a5 to 1ee2973 Compare November 30, 2026 23:18
@camc314
camc314 force-pushed the fix/lint-no-base-to-string-1447 branch from 1ee2973 to 98879b6 Compare December 1, 2026 09:20
@camc314
camc314 enabled stacked auto-merge December 1, 2026 09:35
@camc314
camc314 added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 499b66b Dec 1, 2026
73 of 75 checks passed
@camc314
camc314 deleted the fix/lint-no-base-to-string-1447 branch December 1, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants