Repository navigation
fix(typescript): probe the numbers an edit changed so an in-range assertion stops crediting a moved clamp bound - #10120
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpAVUDsopEyQGsGqf371E8
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 20 minutes. View limit details
Comment |
… probe (#9436) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpAVUDsopEyQGsGqf371E8
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Review of record, head 9e7d1de (gemini and coderabbit were quota-limited, so neither reviewed). Angles: (1) correctness / false demotion, (2) tests, spec and contract. A separate reviewer read the diff; I verified its claims against source. Findings and resolutions:
Local proof on the prior head: precommit exit 0 (only the offline Generated by Claude Code |
|
Required check failed on head febdc87 in one test: Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- The new probe grid preserves the original asserted-value neighborhood and adds changed numeric literals with their neighbors, while retaining the 4096-combination cap.
Verification questions
- Confirm the implementation extracts decimal literals from expression text rather than using the TypeScript AST, so syntactic variants beyond the tested decimal forms are not covered by the supplied evidence.
- Confirm the numeric literal scanner is deliberately limited to decimal literals and caps extracted constants at three, matching the documented probe boundary.
- Confirm the modified sibling route is confined to TypeScript literal evaluation and its probe grid; no crypto/compression/runtime helper is changed or directly invoked by this diff.
- Confirm the changed probe route is documented and linked to the four unit tests, but the broader sibling-call surface is not shown in the diff.
Refuted
- The changed-number probe grid could depend on a stale active view or mutable backing store and therefore misclassify buffer state.; refuted because: The relevant values are parsed numeric literals and expression-evaluation results in literal_eval.rs. The diff contains no active-view construction, backing-store mutation, resize, detach, transfer, or cached length, so this active-view failure mode is not applicable.
Evidence gaps
- The seeded thread reports local precommit, TypeScript unit, and corpus checks, but also records an unrelated Rust corpus ceiling failure; current late cargo-test receipt remains pending.
- The PR's claimed corpus transition from credited/exposed to gap/weakly_exposed depends on the failed ripr sensor and late cargo-test receipt, which are not available as completed evidence in this packet.
- Repository-wide and corpus proof status is not yet demonstrated by the available sensor receipts.
- The final test and corpus-gate result is not independently established by this lane because the ripr sensor failed and cargo-test evidence was pending.
- Model proof intent was rejected by deterministic validation.
- Package and corpus execution proof is pending rather than established by the available lane artifacts.
|
Dependency handoff for the existing owner: accepted main Upstream qualification is retained: #10133's accepted tree Please resume the already-planned owner integration from accepted main, inspect/review the actual successor head and affected behavior, and admit one supported required-qualification campaign only if none is already admitted. Retain the original literal-eval positive/negative controls, 10/10 focused-test receipt, prior TypeScript suite/corpus evidence and review dispositions in 6390382085 with their original head identities; reuse them where the relevant subject is unchanged, and refresh affected proof after integration. The reported equality failure was on older |
There was a problem hiding this comment.
Verification questions
- Confirm the numeric-literal scanner has bounded, documented behavior but does not establish broad coverage of sibling literal evaluators or AST-based extraction routes.
- Confirm the scanner does not recognize JavaScript negative numeric literals because the minus sign is not part of the token.
Refuted
- The added clones/closure capture could dangle, alias mutable backing state, or create an invalid pointer lifetime.; refuted because: The captured values are owned Strings, while parsed AST values and numeric vectors are consumed within the synchronous callback. No borrowed field escapes its scope, and the unsafe-review receipt reports no new gaps.
- The corpus fixture update could merely bless a false gap without an oracle that distinguishes credit from non-discrimination.; refuted because: The row changes observed_verdict credited to gap and classification exposed to weakly_exposed, while the production route adds probe inputs derived from changed numeric literals. The known-false declaration is deleted because the fixture now exercises the intended gap.
- Expanded probe grids could enable denial of service through excessive evaluation.; refuted because: The implementation explicitly caps extracted constants at three per side and total combinations at 4096; no unbounded loop or allocation path is present in the changed surface.
- Moving old_text and new_text into parse_on_worker could leave the callback with invalid references or leak ownership across the worker boundary.; refuted because: The two values are independent owned Strings moved into the callback closure; the callback uses them before the closure returns, and no borrowed reference to either String escapes. Parsed expression lifetimes remain within the existing callback scope.
- The new numeric probes can alter operator-only edits into an unexercised finding.; refuted because: The added constants are derived from numbers present on only one side of the edit; an operator-only edit introduces no changed literal, so it continues through the existing boundary-witness path.
- The probe grid could misclassify because it observes a stale active view or mutable backing store.; refuted because: The modified path works on owned expression strings and parsed expression values; no ArrayBuffer, TypedArray, resize, detach, transfer, slice-length snapshot, or mutable backing-store state is introduced.
Evidence gaps
- Corpus acceptance is not independently confirmed in the available packet because ripr failed and cargo-test is still scheduled.
- The focused and corpus proof is asserted in the PR body but remains pending or unavailable in this packet.
- Full compile/test behavior is not yet witnessed in the supplied receipts: ripr failed with exit code 2 and cargo-test is scheduled late.
- Model proof intent was rejected by deterministic validation.
|
Review of record, currency note for head b5ec834. The review above covered 9e7d1de; since then the branch only gained merges of main (no code changes by me). Affected proof refreshed on this head: ceiling test passes on accepted main, TS corpus 8/351 false with 0 contradictions, Generated by Claude Code |
Summary
#9436.
clampPercent(40) == 40passes for bothMath.min(100, …)andMath.min(200, …), so the rule 18 probe grid (inputs shifted by 0/±1) never reached the changed bound and the row stayed falselyexposed.separated_on_probe_gridnow also tries the numeric literals the edit added or removed (c, c-1, c+1) on each numeric axis, capped at 3 constants. Constants present on both sides are not used, so operator-edit fixtures (ts_return_comparison_boundary,ts_return_ternary_boundary) are unchanged. Unevaluable expressions stay conservative.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0243 rule 18
Governing issue or accepted claim: #9436
Acceptance delta (one sentence): The
pw-fixme-clamp-upper-boundrow no longer reads falselyexposed, and its known-false file is removed.Scope Classification
Production delta:
literal_eval.rs.Evidence/support delta: four
literal_evalunit tests (traceability entries), spec paragraph, re-blessed row, deletedknown-false/pw-fixme-clamp-upper-bound.toml, changelog fragment.Single acceptance criterion: the row is credited to the gap and the corpus gate passes with its known-false file gone.
Non-goals: enum work, a general JS evaluator, Playwright registration.
Proof
Only the target row moved. A paired live above-bound exact assertion still earns credit (unit test).
Claim Boundary
May claim: an in-range assertion no longer credits a changed numeric bound. Not claimed: runtime adequacy.
Rollback
Revert the commit.
Generated by Claude Code