Repository navigation
Conversation
Eight tests in javascriptSemanticAnalysis.reference_lifetimes.test.ts bounded elapsed time at 2000 ms. They fail on slow hosts without a regression, and they rarely caught the regressions they guard. Removing the repeated-prefix check, path normalization or the covering antichain makes the collector loop without end. Vitest cannot time out a synchronous loop, so those runs hung or ran out of memory before the bound was read. Seven bounds now count the member-mutation collector's own work. A test-local spy on SemanticPropertyPathCoverage.prototype.retain charges one step per path check and one per path key, and throws at the limit. That also ends a cycle that never closes. Limits are about twice the measured steps. A test is held at 0 where no path below the loop is observable (null tail, numeric child). The shallow-copy bound uses the existing alias_selections budget instead: at 1024 the unioned chain records no alias-selections limit (it needs 742). Validation: each regression was put back in an uncommitted copy of javascriptSemanticMemberMutations.ts, and every bounded test was run alone against it with the base file and with the new one. - No repeated-prefix check: base hung (60 s cutoff) or ran out of memory; new failed in 2-4 s on 4 tests. - No path normalization: base hung or ran out of memory; new failed on 5 tests. - Opaque class origins: base passed; new failed (linked list). - No exclusion union: base passed; new failed (alias-selections limit). - No covering antichain: base hit stack overflows and one hang; new failed on 6 tests. - Depth-first worklist: base failed at 4,964 ms; new failed at 54,000 steps. test:local on the file: 113 passed, also in 3 shuffled orders. check:fast: passed. Refs morluto#10513
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] This test-only change appears safe to merge. SummaryReplaces eight wall-clock checks with deterministic work limits in the JavaScript reference-lifetime tests. Production code is unchanged.
Reviews (2) · Last reviewed commit: "test(javascript): replace lifetime wall-..." · Reviewed by Greptile |
Davmunrey
left a comment
There was a problem hiding this comment.
Status:
- Greptile found no issues; production code is unchanged.
- Format and static checks pass with the branch merged into current main.
Summary
Refs #10513. This slice covers JavaScript semantic reference lifetimes and complements #10619, #10627 and the native-parser and remaining-
src/slices. It replaces all 8 of the 2000 ms elapsed-time bounds insrc/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.tswith deterministic work measures. Production code is unchanged.Problem and expected behavior
The bounds depended on host speed, and they almost never caught the regressions they guard. With each of the six guarded mechanisms removed in turn, the old bound fired in 1 of 78 runs. Most broken variants never return. Vitest cannot time out a synchronous loop, so those runs hung or ran out of memory before the bound was ever checked.
Change and scope
SemanticPropertyPathCoverage.prototype.retaincounts one step per path check and one per path key. It throws at a limit of about twice the measured steps. Two of these tests have a limit of 0.alias_selectionsbudget at 1024 and asserts that no resource limit is recorded. The test needs 742.Evidence and regression coverage
many members: use(node). Work done beforeretainis not counted.Validation performed
npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.ts: 113 passed, including in 3 shuffled orders.npm run check:fastpassed.Author readiness
Human owner: @Davmunrey
Before merge
type(scope): outcome.