Repository navigation
test(javascript): check #1495 growth rate instead of wall time - #1529
kaoru0822-kitauji wants to merge 1 commit into
Conversation
The #1495 regression test required 2,000 receiver calls to finish within 2 s. CI shards run with v8 coverage on slower runners: the test took 1.9 s on #1517's run and 3.2-3.6 s on main afterwards, failing every PR. It now compares the fastest of two runs at 1,600 and 400 calls. That ratio is about 5-6x for the fix, with or without coverage, and about 13-14x for the quadratic code before #1517, so the bound of 10 holds on any runner while still catching the regression. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Independent maintenance review reproduced the #1483 CI failure at main #1517: 2,616.9 ms against the former 2,000 ms assertion. This existing growth follow-up retains a real regression detector. On the documented two-CPU Linux host, its V8-covered file runs all 155 tests successfully. Substituting the original pre-#1517 collector makes this same growth guard fail specifically at ratio 15.5986 > 10; the production source was then restored byte-for-byte. I have added a narrow test follow-up: assert the semantic result after every measured run at both 400 and 1,600 calls, outside the measured interval, rather than checking a separate smaller run. This keeps the larger measurement from passing by losing the expected returned-reference uncertainty. Main #1526 merged during review and conflicts with this file because it replaced the same hard wall-clock assertion. I resolved the maintenance integration by keeping this contributor growth guard and retaining #1526’s actual CLI/MCP regression file byte-for-byte. The current integrated source is being freshly compiled and its public returned-reference workflow verified before publishing the normal merge/follow-up here. Contributor history will be preserved; no competing PR or review request. |
|
Superseded by #1526 (f9ce32b), which removed the wall-time assertion from the #1495 test and added CLI/MCP regression coverage. This PR conflicts with it now. If a performance guard is wanted later, the growth-ratio check here (t(1600)/t(400) < 10: about 5–6× for the fix and about 13–14× for the quadratic code, with or without coverage) can be re-proposed on top. |
|
The author closed this PR as superseded by merged #1526 while maintenance verification was finishing. I missed the closed-state guard and pushed the prepared follow-up to the branch. I have now restored the contributor’s exact original tree through a normal non-force fast-forward restoration commit ( |
Summary
mainCI is red. My #1495 regression test from #1517 required 2,000 receiver calls to analyze in under 2 s. CI test shards runvitestwith v8 coverage on slower runners:mainat 46c9cba (shard 3/4)mainLocally 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.tokenis unknown) is kept.Ratios measured on an M-series Mac:
782e0147)Swapping the pre-#1517
javascriptSemanticMemberMutations.tsback 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.tspasses (155 tests).oxlintis clean on the file.🤖 Generated with Claude Code