Skip to content

fix(typescript): resolve skipped suites by binding identity (#10169) - #10224

Merged
EffortlessSteven merged 54 commits into
mainfrom
fix/10169-skipped-suite-bindings
Oct 31, 2026
Merged

EffortlessSteven merged 54 commits into
mainfrom
fix/10169-skipped-suite-bindings

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Skipped-suite disclosure follows lexical runner bindings through validated imports and immutable aliases. Local shadows cannot hide dropped registrations. Evaluated arguments and later live siblings retain partial-extraction notices.

Swarm / Source Boundary

  • repair or follow-up for a same-repo swarm PR

Source-of-truth Links

Proposal: none
Spec: RIPR-SPEC-0243, registration provenance and partial extraction
ADR: none
Plan item: bounded additive #10169 repair
Governing issue or accepted claim: #10169
Acceptance delta (one sentence): known skipped runner suites stay silent through aliases, while unrelated or shadowed bindings and evaluated registrations retain truthful partial-extraction notices.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): fix/10169-skipped-suite-bindings
Stack parent or prerequisite PR (if any): none outstanding; #10145 landed as cf8be83
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): one additive candidate; no replacement selection

Scope and acceptance

Production delta: one lexical declaration index reuses admission's validated runner imports and existing scope collectors. Immutable aliases establish runner identity; writes, escaped values and unresolved provenance conservatively withdraw dormancy. Evaluated inline calls, ordinary function constructors and tags inspect invoked bodies while preserving parameter and block shadows. Only known dormant callbacks are excluded.

Evidence delta: twelve grouped regression tests, spec and traceability mapping, and canonical Fixed fragment changelog.d/10169-skipped-suite-binding-identity.md.

Acceptance Discriminator
Imports and immutable aliases preserve skipped-suite silence named, namespace, CommonJS and alias-options controls
Unrelated/local shadows cannot hide dropped registration parameter, block, catch, loop and namespace controls
Runner mutation cannot masquerade as dormancy writes, throws, computed members, tags, iterables, await/yield escapes
Evaluated registrations remain visible inline calls, constructors and tags require the actual live snippet
Dormant values and shadows do not steal later notices negative invocation controls, nested rebinding/restoration and later siblings
Traversal refuses uncertain provenance cycles, depth exhaustion and memoized diamond controls

Non-goals: extraction or oracle credit, classification, loop bounds, verdict floors/ceilings, general interprocedural JavaScript effects, array/object disclosure subtrees, dependencies, release or deployment. Namespace .default aliases remain conservative. Rollback: revert this additive delta.

Current source

Head: 90fde38919b2950a8cb558d6b00282f4700bfe87
Tree: 018042ec1a56bb12bbe8bd8dcb423100a1f226dc
Integration basis: a533e7fb312e1b989c99f3f022f4373cadb230eb (main tip, merged cleanly as the head commit)
Scope of the claim relative to the original basis aeeeddacd1e24f3b04e713572717e7b172966431: eight files, +1420/-81.

The earlier a43c8bc94dea integration repaired actual conflicts in TypeScript mod.rs and tests_extract_tests.rs; both module declarations and both test groups were retained. Current-main parameter-shadow handling and large-file disclosure indexing remain present. After main moved to a533e7fb, GitHub reported the PR CONFLICTING while local git merge and git merge-tree --write-tree both applied main cleanly; the verified-clean merge commit 90fde38919 reconciles that stale server-side verdict with no resolution edits.

Independent review identified runner-escape and evaluated-constructor gaps, then a nested block-rebinding interaction. The final source pass on this exact head is nonblocking; qualification is still incomplete.

Retained earlier evidence

These receipts retain their original subjects and are not relabeled as current-head execution:

  • Test-only 8cc8399c2ec3a500796befe0aa393a59e1a3ab33: original production, three intended behavioral failures.
  • 28b11ce977b8c900ede9e04817d72289cea33c96: six focused tests and 1,636 TypeScript tests passed.
  • Integration dac6d03fc07e5bd884c313252593d22017c2a59b: 1,636 TypeScript tests passed.
  • 139b34d74321b4830664bd1de12d83f8cf87a9b8: recorded check-fast, precommit, goldens (620 fixtures, 1,583 comparisons, zero drift), dogfood and four CLI controls passed. Historical review records retain the detailed evidence and limitations.

Current repair red control: integration a43c8bc94deab2723015f78b0b561ebebbe2830a plus the test-only change later committed as c81a561a153ee12642b81f1f0e9bef9a0ce521dd. Command cargo test --locked -p ripr --lib skipped_suite_bindings_retain_ -- --test-threads=2 executed two tests: both failed behaviorally because the live registration notice was absent; native exit 101, zero ignored. The original executable, source patch and log remain retained. This was execution before the test-only commit, not an execution of that later Git identity.

The subsequent 6259df03ded77c20af47ec9bc53626a055e788c7 TypeScript run passed 1,794 tests and failed one new scope-restoration control. The failure exposed the broad declaration collector leaking nested lexical names. The repair uses the existing registration-scope collector and explicitly preserves loop/catch/switch entry scopes. A shared evaluation mode also keeps stored function values dormant inside control flow. Original failed executables and receipts remain retained; no test expectation was weakened.

Continuation

Owner / governing claim: existing #10169 candidate delivery.
Candidate: exact source and integration basis above; GitHub head remains authoritative.
Review: independent source review nonblocking; final published-head REVIEW_READY pending on the required hosted result.
Validation on merged head 90fde38919: cargo fmt --check exit 0; cargo clippy -p ripr --all-targets -- -D warnings exit 0; cargo test -p ripr --lib analysis::language::typescript:: -- --test-threads=2 passed 1,911 tests, zero failed/ignored, 13,409 filtered, all twelve binding groups included; policy cascade pass: check-no-panic-family, check-process-policy, check-allow-attributes, check-static-language, check-executable-files, check-network-policy, check-lint-policy. Required hosted qualification is not yet requested.
Dependency: #10586 retains its separate shared-test repair owner; no affected run is being retried.
Next: mark ready, complete the required hosted result on the exact published head, and publish final exact-head review before protected expected-head squash.

claude and others added 30 commits October 22, 2026 08:57
…raction

A registration inside describe.skip/todo or a describe with a skip option never
runs and is not a dropped one; stop disclosing it as language_scope_unsupported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
… pins

Rule 5 collects assertions of a callback that must call done() for a mocha test
to pass. Rule 6 keeps the boundary witness when the expectation pins the
unchanged value (fails against the changed code). Flips mocha-done-callback-value
and mocha-nested-describe-boundary.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
…entries

Removes mocha-done-callback-value and mocha-nested-describe-boundary (fixed here)
and the six rows #9591 also removes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
… suites

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
…key voids skip:true

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
…r dropped registrations

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYoh4Y4M2kQ1KXCn8TtBqE
Main landed the sibling #9496 rules (mocha hook = 7, counted loop = 8) in
RIPR-SPEC-0246 while this branch still numbered the done-callback and
boundary-pin rules 7 and 8. Union resolution: main's rules 7 and 8 keep
their numbers; the done-callback rule is renumbered to 9 and the boundary
rule to 10; acceptance examples renumber to 16 (hook), 17 (done) and
18 (boundary); corpus case citations and code comments follow. The
spec-coverage floor keeps the branch's 134 (union coverage is 137).
Local proof: cargo fmt --check; cargo clippy -p ripr --all-targets
--locked -- -D warnings (with -A unused-mut for the inherited
#[cfg(unix)]-only doctor.rs artifact identical to main); targeted tests
for rules 7, 8, 9, 10 all pass; xtask policy cascade passes;
verdict-corpus validate: 137/138 covered, above floor 134.
…d unterminated

#8990 landed the 0288 entry without its outputs closing bracket and
metrics list, so .ripr/traceability.toml fails to parse and
check-traceability fails on every open merge ref (main heads 5950c91,
ad1e3bb and 280e020 all ran red). Close the array and add the standard
unit_test_pass_rate metrics list. cargo xtask check-traceability passes
with this.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnfxntsP9VxYNTBs5FukBi
Perl case PRs landed after #9628 measured 21, so verdict-corpus check
--language perl fails on main. Python and Rust fell; ceilings must equal
the blessed count.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJr6YizPnC777wfxAd9ubU
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnfxntsP9VxYNTBs5FukBi
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnfxntsP9VxYNTBs5FukBi
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnfxntsP9VxYNTBs5FukBi

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verification questions

  • Confirm the strongest remaining review question is whether unscanned sibling runner adapters or mutation forms exist outside the bounded TypeScript route.
  • Confirm the diff exercises imported, aliased, namespace, shadowed, mutated, escaped, evaluated, dormant, and cyclic/deep variants, but sibling runner adapters beyond the represented import classes were not exhaustively enumerated in this lane.
  • Confirm direct alias assignment clears the alias before potential runner provenance is applied.

Refuted

  • The change requires invasive shared extraction infrastructure changes.; refuted because: The implementation is additive: a dedicated binding index is constructed in detect_partial_test_extraction_expanded and consulted by skipped-suite detection, while extraction and oracle-credit consumers remain unchanged.

Evidence gaps

  • Exact-head Rust behavior has not been independently confirmed by this review packet.
  • The exact-head Rust qualification remains unavailable because ripr failed with exit code 2 and cargo-test has not yet produced a receipt.
  • Exact-head executable proof remains pending because cargo-test is scheduled late and the ripr sensor failed; historical exact-head TypeScript passes do not replace the current gate.
  • The exact-head aggregate sensor failed, so source correctness remains unpaired with a successful repository-wide Rust witness.
  • Model proof intent was rejected by deterministic validation.
  • Current-head executable confirmation is incomplete because ripR failed and cargo-test is scheduled late, although the PR body reports an exact-head TypeScript suite pass.
  • Current-head executable qualification remains pending despite retained seeded passing results.
  • Fresh aggregate qualification remains a review-process gap because the ripr sensor failed and cargo-test is late.

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head f0d8c14e: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzSiDdMNjK7Lxr7u3ZT

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed findings

  • The helper models lexical scope restoration locally rather than duplicating or replacing shared extraction scope collection.

Verification questions

  • Confirm the route lacks broad independent coverage of runner adapters outside the represented TypeScript import and global spellings.
  • Confirm binding identity is kept at a disclosure-only boundary; extraction and oracle-credit consumers are unchanged.
  • Confirm the changed skipped-suite detector consistently uses the shared lexical binding index rather than retaining a parallel textual callee check.

Refuted

  • The changed traversal could expose a memory-safety or stale-view defect.; refuted because: The diff uses safe Rust collections and AST references during synchronous traversal, introduces no unsafe blocks, raw pointers, detachment, cross-thread transfer, or externally invalidated views, and unsafe-review reported no new gaps.
  • The change requires invasive shared extraction or oracle-credit changes.; refuted because: The public extraction and oracle-credit surfaces are unchanged; the new index is consulted only by partial-test-extraction disclosure, with spec and changelog explicitly bounding the claim to disclosure.

Evidence gaps

  • The seeded exact-head history reports 1,911 TypeScript tests passing, but this packet's deterministic RIPR sensor failed and cargo-test had not produced its receipt.
  • Exact-head executable qualification remains incomplete because ripr failed and cargo-test had not produced a receipt in the supplied packet; this is an evidence gap rather than a demonstrated memory-safety defect.
  • Exact-head executable proof is not closed in this packet, despite source-level red/green discrimination.
  • The exact-head Rust behavior remains unconfirmed in this lane because ripr failed and cargo-test is only scheduled for late evidence.
  • The scheduled exact-head test run is the remaining qualification boundary; the failed ripr sensor does not establish a source defect.
  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head review of 1f53f5a (static; no cargo run). No blocking findings.

  • The new declaration_bindings.rs resolves runner identity through scopes. Imports come from admission-validated provenance. TDZ, var hoisting, catch, loop and switch scopes, parameters, class and function names all shadow correctly.
  • Writes, member mutations, global-object writes, escapes (call arguments, returns, throws, yields, destructuring defaults) and opaque files all clear dormancy. Unknown bindings never make a suite dormant, so the change stays fail-closed toward keeping the partial-extraction notice.
  • tests_extract.rs keeps evaluated title and options arguments of a skipped suite visible. Stored function values stay dormant, and rebound names are handled per scope through with_rebound_names.
  • The 14 new tests assert both directions on the production detect_partial_test_extraction path: dormant means no gap, and live means the exact it('live' snippet. They cover shadowing, mutation, aliasing, x-spelled suites, deep and cyclic alias chains, constructors and tagged templates, and control-flow function values.
  • The traceability entries (14 tests plus the new code file), the changelog fragment and the spec bullet are present, and every referenced test exists.
  • All 5 review threads are resolved, each with a reply.
  • The Rust gates job failed in the user-text ceiling preflight (3278 against 3274). That is a stale-baseline artifact, and no golden output is touched. The compile and test jobs did not run, so the unit tests remain unproven in CI. Please confirm them after the baseline catches up.

CLEAN at this head on source and oracle review. Compile and test proof is still pending.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refuted

  • The new alias resolver could be exploited for unbounded recursion or use-after-free/stale-view behavior.; refuted because: Resolution is depth-limited, memoized cycles are handled conservatively, and the implementation uses safe owned collections with synchronous AST references; no unsafe or cross-thread operations were added.
  • The new binding index would require invasive changes to extraction or oracle-credit paths.; refuted because: The index is additive and consulted by partial-extraction disclosure; the diff leaves extraction and oracle-credit surfaces unchanged.
  • The evaluated-argument traversal can expose a use-after-free, stale-length, or cross-thread active-view hazard.; refuted because: The implementation only walks the current Oxc AST using safe Rust references and owned collections. It neither invokes JavaScript nor crosses an async, worker, GC, detach, or transfer boundary.

Evidence gaps

  • Exact-head Rust behavior was not confirmed by this lane because the ripr sensor failed and cargo-test had not yet produced a receipt.
  • Exact-head executable proof remains unavailable because ripr failed with exit code 2 and cargo-test has not produced its receipt.
  • Exact-head Rust qualification is unavailable: ripr failed and cargo-test has not produced a receipt.
  • Exact-head behavioral qualification is not present in this review packet.
  • Exact-head executable proof is not available in this lane; the packet reports ripr failure and cargo-test only as scheduled-late.
  • Exact-head executable qualification remains unavailable in this packet because the ripr sensor failed and cargo-test is late-scheduled.
  • Exact-head executable proof is not yet available in this lane, although prior exact-head and later-head TypeScript runs are retained in the seeded thread.
  • Exact-head executable qualification is not available in the packet because ripr failed with exit code 2 and cargo-test is scheduled late; no security finding is inferred from that failure.
  • Model proof intent was rejected by deterministic validation.

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready was requested, but this PR conflicts with main (head 35671287), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

… bindings

Type-only parameter lists (TSFunctionType, TSMethodSignature, declare
functions, overload signatures) share the FormalParameters AST node, so
visiting FormalParameters bound their identifiers into the enclosing
runtime scope. A top-level 'type Fn = (test: T) => void' shadowed the
runner for the whole file and dormant skipped suites produced spurious
partial-extraction notices. Bind parameters from the Function (bodied
only) and ArrowFunctionExpression arms instead.

Regression test: detect_partial_none_when_type_only_parameters_name_the_runner.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verification questions

  • Confirm the represented runner-adapter set is broad but not exhaustive, so absence claims for every third-party adapter remain unsupported.

Refuted

  • The binding resolver duplicates the full lexical scope model and risks changing extraction behavior.; refuted because: It does not replace extraction scope handling; it independently indexes disclosure identity and reuses collect_registration_scope_names. Some scope policy remains duplicated, but the diff contains no evidence of a confirmed extraction semantic regression.
  • Current behavior lacks sufficient executable proof.; refuted because: This remains an evidence gap, not a source or test-oracle defect: cargo-test is scheduled to land before the gate, while the failed ripr sensor is explicitly recorded and does not itself establish incorrect behavior.
  • The binding-resolution change may require invasive changes to sibling extraction or oracle routes.; refuted because: The changed resolver is additive and consumed by partial-extraction disclosure; extraction and oracle-credit consumers are unchanged, as also recorded in the seeded exact-head reviews.
  • The evaluated-argument traversal could expose a use-after-free or stale active-view hazard.; refuted because: The traversal operates synchronously on the current Oxc AST and uses safe borrowed references plus owned local state; it does not invoke JavaScript, detach buffers, transfer allocations, or cross threads.
  • The binding-aware resolver could introduce memory unsafety, stale AST views, or unbounded recursion.; refuted because: The implementation uses safe Rust collections and synchronous AST references, adds no unsafe code or cross-thread handoff, and caps alias resolution depth at 32 with cycle-aware memoization.
  • The new resolver could expose a use-after-free or stale active-view defect.; refuted because: It traverses the current Oxc AST synchronously through safe references and owned collections. It adds no unsafe code, raw handles, detached buffers, resize operations, thread transfer, or externally invalidated view.

Evidence gaps

  • Exact-head executable behavior for the new binding-index and disclosure paths is not independently confirmed in this lane because cargo-test is scheduled late and ripr failed.
  • Exact-head executable behavior is not yet confirmed by this review packet.
  • Exact-head executable confirmation remains unavailable to this lane because ripr failed and cargo-test is scheduled late.
  • Exact-head Rust behavior is not yet independently established because the ripr sensor failed and cargo-test is scheduled late.
  • Model proof intent was rejected by deterministic validation.

Copy link
Copy Markdown
Member Author

Review of record, exact head 0d5176c0839e66162921156315305fdcddce00e6 (burn-down lane).

Angles:

  • Correctness: read the final commit (runtime-only parameter binding: Function with a body and ArrowFunctionExpression arms replace the shared FormalParameters arm, so type F = (test: T) => void, interface signatures and declare function no longer shadow the runner). Scope order is consistent with the earlier global-write, expression-bodied-arrow-escape and qualified-read repairs already in the branch.
  • Tests: the final commit adds detect_partial_none_when_type_only_parameters_name_the_runner; the twelve binding groups plus x-spelled, ambient-global-write and qualified-read controls are present. Hosted Rust Small (merge-ready request run 41198209454) completed success on this head, including the Result job.
  • Spec/contract: RIPR-SPEC-0243 hunk names x-spelled dormant roots and the qualified-read rule; traceability and canonical Fixed changelog fragment present; no schema, output-contract or workflow change.
  • Perf/security: one lexical declaration index reusing admission's validated imports; traversal has cycle/depth guards per the PR body; no new dependency, process or network surface.

Threads: all 6 review threads (2 Graphite, 1 outdated) show resolved with source-backed replies, including the last type-only-parameter finding addressed by this head. Provider-quota comments (gemini, coderabbit) are missing review, not clean review.

Findings: none blocking. Resolution: merging with expected head SHA.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 4487c52 into main Oct 31, 2026
59 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/10169-skipped-suite-bindings branch October 31, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants