Skip to content

test(javascript): check #1495 growth rate instead of wall time - #1529

Closed
kaoru0822-kitauji wants to merge 1 commit into
mainfrom
test/javascript-1495-growth-ratio
Closed

kaoru0822-kitauji wants to merge 1 commit into
mainfrom
test/javascript-1495-growth-ratio

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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 46c9cba (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

🤖 Generated with Claude Code

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]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

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.

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator Author

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.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

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 (b9e4b5fa4a012ca913a6e0e6be208e35be395459); all original and maintenance history is retained, and main was never changed by that push. The review/covered negative-control results remain recorded, but this PR remains closed and is not being reopened. #1483 is instead being refreshed from the already fixed current main. Apologies for the extra branch update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants