[PR #1529] [CLOSED] test(javascript): check #1495 growth rate instead of wall time #2945

Closed
opened 2026-10-17 21:12:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1529
Author: @kaoru0822-kitauji
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: test/javascript-1495-growth-ratio


📝 Commits (1)

  • afcf3af test(javascript): check #1495 growth rate instead of wall time

📊 Changes

1 file changed (+27 additions, -16 deletions)

View changed files

📝 src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts (+27 -16)

📄 Description

Summary

main CI is red. My #1495 regression test from #1517 required 2,000 receiver calls to analyze in under 2 s. CI test shards run vitest with v8 coverage on slower runners:

run test time
#1517's own CI (shard 3/4) 1,865 ms (passed, near the bound)
main at 46c9cba0 (shard 3/4) 3,193 ms (failed)
#1525, merged with main 3,618 ms (failed)

Locally the same test takes about 270 ms. This is a runner-speed and coverage effect, not a regression: under v8 coverage the fixed code takes about 860 ms here at N = 2,000.

Change

The test now measures growth instead of wall time. It warms up once, then takes the fastest of two runs at 400 and 1,600 calls, and requires t(1600) / t(400) < 10. The semantic assertion (shared.token is unknown) is kept.

Ratios measured on an M-series Mac:

code no coverage v8 coverage
fix (#1517) 5.0–5.2 6.0–6.4
before #1517 (quadratic, 782e0147) 13.2–13.4 13.7–13.8

Swapping the pre-#1517 javascriptSemanticMemberMutations.ts back in makes the test fail with a ratio of 14.2, so it still guards #1495.

Verification

  • npx vitest run src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts passes (155 tests).
  • The #1495 test passes three times without coverage and once with the CI shard's coverage flags.
  • oxlint is clean on the file.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1529 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `test/javascript-1495-growth-ratio` --- ### 📝 Commits (1) - [`afcf3af`](https://github.com/morluto/rea/commit/afcf3afea125d8858ccada9ed91e7fe641aafd4d) test(javascript): check #1495 growth rate instead of wall time ### 📊 Changes **1 file changed** (+27 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts` (+27 -16) </details> ### 📄 Description ## Summary `main` CI is red. My #1495 regression test from #1517 required 2,000 receiver calls to analyze in under 2 s. CI test shards run `vitest` with v8 coverage on slower runners: | run | test time | |---|---| | #1517's own CI (shard 3/4) | 1,865 ms (passed, near the bound) | | `main` at 46c9cba0 (shard 3/4) | 3,193 ms (failed) | | #1525, merged with `main` | 3,618 ms (failed) | Locally the same test takes about 270 ms. This is a runner-speed and coverage effect, not a regression: under v8 coverage the fixed code takes about 860 ms here at N = 2,000. ## Change The test now measures growth instead of wall time. It warms up once, then takes the fastest of two runs at 400 and 1,600 calls, and requires `t(1600) / t(400) < 10`. The semantic assertion (`shared.token` is unknown) is kept. Ratios measured on an M-series Mac: | code | no coverage | v8 coverage | |---|---|---| | fix (#1517) | 5.0–5.2 | 6.0–6.4 | | before #1517 (quadratic, `782e0147`) | 13.2–13.4 | 13.7–13.8 | Swapping the pre-#1517 `javascriptSemanticMemberMutations.ts` back in makes the test fail with a ratio of 14.2, so it still guards #1495. ## Verification - `npx vitest run src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts` passes (155 tests). - The #1495 test passes three times without coverage and once with the CI shard's coverage flags. - `oxlint` is clean on the file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2945
No description provided.