Skip to content

perf(index): reuse module-scope descendant traversal - #8263

Merged
EffortlessSteven merged 4 commits into
mainfrom
codex/module-scope-walk-reuse
Oct 17, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
codex/module-scope-walk-reuse

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Reuse descendant traversal when collecting module-scope facts, preserving the existing signature/body, nested-function/closure/async, cfg, binding and module-membership semantics.

This head composes the collector injection with merged #8258's probe-shape injection through one private summarizer path. Production uses both optimized collectors; test adapters can substitute either frozen reference independently. Both oracle bodies are retained. Refs #8201.

No classification, schema/cache-version, parser dependency, workflow, timeout, suppression, consumer/pin or release change. No measured end-to-end speedup or hosted-timeout repair is established.

Current candidate and integration

  • Head: ce7fcf458b622f0309fafbf62cf5910e6e7ca47d
  • Tree: f1519328dd84c0c42b66c6b3cd8825d7e739e649
  • Reviewed integration basis: a1ea790e923ae6036efdd9457ffc16ea2ad93348, including perf(index): reuse descendant traversal across probe-shape scans #8258 at f325422fa85a46327b5376f07c4bb6f7bfaa2dc7.
  • History-preserving merge checkpoint: f0b3bfb82ae6b1aa1b07145ee50587113026580e, parents original head 8ac12c0 and reviewed main a1ea790e9; followed by the combined-output negative controls. Normal branch push, no shared-history rewrite.
  • PR delta: three files. The optimized scope collector and frozen scope oracle are unchanged from the original head. The frozen probe suite differs only in reference-function visibility. Reversing only the bounded collector and injection seam yields byte-identical basis ra.rs.
  • Live main subsequently advanced to 60a22c66851e8f5f6d932361c8e6cd758b9efd48 (fix(explain): refuse ambiguous finding selectors (#8166 Slice B) #8278). Independent inspection found its seven-file explain/context selector delta does not change collectors, facts, helper crediting, probe generation or these inputs. Fetched actual GitHub merge subject 6a58963a24c1d090db8a559a56b6b54914594b3e has parents 60a22c66851e8f5f6d932361c8e6cd758b9efd48 then this exact head, tree cfc544cdcc01ef0bf1a00a6745da241868cfb532. perf(index): reuse descendant traversal across probe-shape scans #8258 ancestry and production probe implementation are verified; the three PR files match the tested head. The only head-to-merge delta is fix(explain): refuse ambiguous finding selectors (#8166 Slice B) #8278's seven files.

Current proof and review

Rust 1.95.0, Linux, locked default Rust/Python/TypeScript library test build. The selected compiler-artifact executable SHA256 is d94c721476949f48bc3c44266e4ba83a73678a225402ea0aee12c5fb607be406.

  • 62 parser tests passed, including nine module-scope and eight probe-shape controls.
  • 26 helper-consumer tests passed on that same executable. The first direct helper invocation lacked Cargo on PATH and failed five metadata-dependent controls. A separate metadata control demonstrated the missing executable; correcting the toolchain environment gave 26/26 without a source change. The initial failed receipt is retained as instrument history.
  • 88 distinct focused subjects, zero failed or ignored in the applicable passing runs; repeated helper execution is not additional distinct coverage.
  • Four-way complete FileFacts comparisons: production, original scopes only, original shapes only, and both originals. Raw scope maps are also compared before name pruning. Inputs cover nested scopes/cfg/imports, raw names, bodyless items, signature/body boundaries, macros, same-line keys, Unicode/CRLF, parser refusals and two real sources.
  • Compiled controls count both injection calls, require nonempty shape subjects, and separately remove scope or shape output. Each removal changes complete facts.
  • cargo xtask check-fast: pass, 10 gates including strict workspace/all-target Clippy. The three-file selector matches independent Git inventory; merge-base is the reviewed basis.
  • cargo xtask precommit: pass.
  • Actual CLI fixture controls rust_transitive_reach_test_helper_chain and owner_name_collision_helper_keeps_credit: pass, including JSON, human and full-human golden comparisons. Nonempty outputs retain two no_static_path findings and one exposed finding respectively. CLI SHA256: 4b2b936a94d5e17beba22b250673432c6367f2f9860d08bb010c76701764f084. These execute candidate head, not a new native execution of the remote merge tree. No goldens were blessed.
  • Exact-basis worktree doctor, narrow library compile and six-gate policy floor passed. Zero baseline changed paths was expected at the exact basis; it is not candidate Rust-gate proof.

Independent review 5551232865 remains applicable to the unchanged collector/oracle and consumers. A fresh independent read-only review of this composed head found no actionable source/oracle defect, inspected downstream consumers, challenged boundary cases and checked raw focused receipts. Its later #8278 applicability check found no new focused-proof requirement solely from that main delta. These reader passes are source/receipt inspection, not independent reruns or timing replication. Current composed-head review 5555373016 records the source/oracle judgment. Its local precommit/CLI obligations are now fulfilled. Overall disposition remains REVIEW_INCOMPLETE pending hosted qualification.

Historical measurements and evidence

The original candidate was 8ac12c026f976489630a767185be756b4fdcecb2, tree b3b410906719b57307dee00f38d42bde01db03af, base 3477bf95a9ead7f35ec099a4e6cf17af96708003. Its 53 parser and 26 helper tests, original compiled wrong-cfg control, check-fast/precommit and timing receipts remain historical evidence for those identities.

Immutable original author evidence, manifest SHA256 ec9ed13990796ef1ca0acad65205149d425be12b42b47b3ea87c3796a71696a9.

Original measurement Before After Observation
Complete CLI median wall 5.161610703s 5.194317286s No improvement; candidate median 0.634% higher
Extracted collector median call 0.476256275s 0.278332776s 41.558% lower on that helper workload only

The CLI used four balanced pairs on the fixed 227,350-byte/97-function input, initially absent caches and unchanged 30-second caps; all eight complete JSON outputs were byte-identical. Collector intervals used the same pre-parsed source, excluded parsing/full-facts/equality/destruction, and retained exact collector/helper bodies. These are bounded Linux/dev observations with overlapping CLI ranges and uncontrolled host load/page cache. No new timing measurement, release-profile, memory, full-repository speedup or timeout-repair claim is made for this composition.

Changelog and rollback

No fragment: internal refactor with no behavior/API/output/workflow/public-doc contract change, under docs/CHANGELOG_POLICY.md and CONTRIBUTING.md#pr-shape. Revert this bounded PR delta; no migration or cache invalidation.

Continuation

Owner / governing claim: checked stale-lane delivery takeover, module-scope traversal reuse and composition with #8258. Current delivery instruction supersedes the earlier task-local no-Ready/no-merge handoff; normal proof and protection requirements remain.

Candidate: exact head/tree and reviewed basis above; remote branch readback confirmed this head.
Review: retained original independent scope; current review 5555373016 completes composed-head semantic/oracle inspection; overall REVIEW_INCOMPLETE only for hosted qualification.
Validation: focused 62/26, check-fast, precommit and both CLI controls pass; actual remote merge subject verified above. Hosted qualification remains pending.
Dependency: merged #8258 included; #8278 main movement inspected for applicability; no source repair hold identified.
Next / status: PR_IN_FLIGHT — WAITING_REQUIRED_CHECKS. One normal Ready transition succeeded at 2026-10-17T01:38:50Z on this exact head. Routed Rust Small run 38991747383 was admitted. Routing and docs detection passed; GitHub-hosted Rust gates job 117275492120 is in progress. The detector's actual checkout log confirms merge 6a58963a24c1d090db8a559a56b6b54914594b3e (head ce7fcf458 into main 60a22c668); this is detector evidence only, not proof of the Rust test job's checkout. The actual Rust job checkout and Ripr Rust Small Result remain pending. Latest review refresh found zero inline threads and no new material review finding. GitHub owns the next transition; resume on the required result or a new material finding. Inspect actual Rust checkout/tree/prerequisites, exact current head, reviews/threads and holds before final REVIEW_READY and normal expected-head squash merge. Diagnose a failure before any retry; do not re-toggle this unchanged Ready head. No auto-merge is armed and no merge is claimed. Existing protection enforcement remains intact; classic administrative protection details remain unavailable to this connection. No release.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 5493b762-c8e5-42c2-a58f-e5d8f873b021
📥 Commits

Reviewing files that changed from the base of the PR and between 3477bf9 and 8ac12c0.

📒 Files selected for processing: 2
  • crates/ripr/src/analysis/syntax/ra.rs
  • crates/ripr/src/analysis/syntax/ra/module_scope_walk_tests.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Summary by CodeRabbit

  • Bug Fixes
    • Improved code analysis of function scopes, including nested scopes, local imports, deferred code, and direct calls.
    • Improved handling of syntax boundaries and malformed input, including macros, comments, strings, and external modules.

Walkthrough

The function scope collector now inspects syntax descendants in one pass and limits body-derived facts to function bodies. A private summarizer helper accepts a scope collector. New tests compare the parser-backed collector with an independent reference implementation.

Changes

Module Scope Collection

Layer / File(s) Summary
Scope collection and summarizer wiring
crates/ripr/src/analysis/syntax/ra.rs
The collector gathers bound names in one descendant pass and limits local uses, deferred-code detection, and direct calls to function bodies. A private helper accepts the scope collector while retaining the public summarizer entry point.
Reference collector and coverage
crates/ripr/src/analysis/syntax/ra.rs, crates/ripr/src/analysis/syntax/ra/module_scope_walk_tests.rs
A test-only reference collector supports comparisons of scopes and FileFacts. Tests cover scope nesting, bindings, calls, cfg attributes, bodyless functions, syntax boundaries, source files, and malformed input.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 8ac12

No specific regression is identified in the scope-collection change. It can proceed through normal validation while the PR remains Draft.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 69.23% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description provides detailed context, scope, implementation intent, validation results, limitations, review status, and rollback information. However, it does not follow the repository template a… Restructure the description using the repository template. Complete every required section, use explicit checkbox selections, and provide the missing source-boundary, candidate-relationship, classification, policy, traceability, static-lang…
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: reusing module-scope descendant traversal for performance.
Full details: Description check

Explanation

The description provides detailed context, scope, implementation intent, validation results, limitations, review status, and rollback information. However, it does not follow the repository template and omits or does not explicitly complete several required sections, including Swarm / Source Boundary, Candidate Relationships, Scope Classification, Support-tier Impact, Policy Impact, Spec-Test-Code Traceability, Static Language Check, CI Economics, Engineering Check, and Gates.

Resolution

Restructure the description using the repository template. Complete every required section, use explicit checkbox selections, and provide the missing source-boundary, candidate-relationship, classification, policy, traceability, static-language, CI-economics, engineering, and gate results. Retain the existing proof, limitations, hosted-qualification status, and rollback details.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

I’m a rabbit with a code-review nose,
I follow each scope where the syntax tree goes.
One careful pass gathers names in a row,
Body facts stay where function bodies grow.
Reference tests hop through cases with care,
And malformed input gets its own compare.

Comment @coderabbitai help to get the list of available commands.

@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.

Independent review of EffortlessMetrics/ripr-swarm Draft PR #8263.

Disposition: REVIEW_INCOMPLETE for merge qualification. No blocking source defect identified in the bounded refactor. Pre-Ready source/oracle review and bounded integration controls are complete for the recorded base/head/tree; promotion still needs live identity/check reconciliation and hosted qualification.

Reviewed head: 8ac12c0.
Integration base: 3477bf9.
Actual merge: 87bd30f.
Candidate and merge tree: b3b410906719b57307dee00f38d42bde01db03af.
Git objects independently establish the merge parents are exactly base then head, both trees match, and merge-base(base, head) equals base. Full changed-file inventory is ra.rs and ra/module_scope_walk_tests.rs; git diff --check passes.

Inspected semantics and consumers: module_item_scopes_in, ModuleItemScopes serialization/name retention, summarize_file_with_parser and injected collector seam, nested-call predicate, LineIndex, and same-file helper crediting in analysis/facts/test_helpers.rs. Descendant-wide cfg/cfg_attr and named-node collection remain deliberately conservative; body-only local uses/deferred code/direct calls exclude signature expressions. Direct calls retain nested-fn/closure/async boundaries and single-segment parsing. Parent-based module-item selection, associated/local-function exclusions, raw spelling, key collisions, bodyless functions, macro token-tree opacity and malformed-source refusal are preserved. No dependency, schema, cache-version, classification, workflow or release surface changed. Existing helper tests exercise actual credit/refusal decisions, not only scope-map shapes.

Oracle challenge: independently extracted base producer return signature/body exactly equals the frozen test oracle (SHA256 5786ed6a8032f0192e39532743e854ea190783814d68496018001b4cf6f60574). This is refactor equivalence, not independent Rust semantics: parser, LineIndex, nested-call predicate and downstream FileFacts pipeline are shared. A separate reviewer-authored expected-map fixture checks raw identifiers, exact line identity, module visibility boundaries, nested cfg, shadow bindings, macro opacity, signature uses/closure/async, direct-call exclusions and bodyless async members; 56 generated visibility/signature/body combinations also compare exact extracted base/candidate collectors. Control harness source extraction was checked against actual base/head, including LineIndex and predicate.

Compiled controls: expected-map fixture plus 56 cases passes native 0. Candidate-only removal of body containment compiles and fails native 101 after admitting signature use/deferred facts. A common-mode predicate mutant affects both collectors: base/candidate equality passes, then the independent expected call set fails native 101 on nested calls. Initial weaker fixture with only signature_call did not discriminate body-guard removal; adding signature import/deferred expressions supplied the missing stimulus. This is a test-strengthening observation, not an observed source regression.

Independent exact-head execution: Rust 1.95.0 / Linux x86_64 / locked default features / CARGO_INCREMENTAL=0, review-owned detached checkout and Cargo target. 53 parser tests and 26 helper-consumer tests pass, zero failed/ignored. Fresh inventories equal the author inventories (79 distinct subjects). Frozen test executable SHA256 4292dc3d18aed5f6c784de64b1b8c60f3fd2a7a6d18287889e01261e012a33f9.

Independent actual-merge execution: rebuilt from the detached actual merge checkout, then 53 parser and 26 helper-consumer tests passed, zero failed/ignored (the same 79 distinct subjects executed a second time, not 158 distinct tests). Frozen merge test executable SHA256 2e1b4b237bd16cbc1b6b93a7959d4071c39749d54271ee08adc6963436e302c5.

Independent actual-merge CLI: cargo build --locked -p ripr --bin ripr selected the actual compiler artifact, frozen binary SHA256 b315d4e6ecfaeba1ec416d1d4f5e8087ed69faf2d6fcdb351de00893c5c93f46. Ran check --root /workspace/scratch/module-scope-walk/workload --diff change.diff --format json --mode ready with an initially absent cache and 30-second cap. Native exit 0, no timeout, no remaining process-group members, complete stdout byte-identical to the archived baseline and candidate JSON (SHA256 7379285334ee6ee7d857766f149f6d06021685dc63019929bfeaceb4a91786c3). This was an untimed output control, not another speed measurement.

Author evidence verification: fetched immutable author evidence at commit cbd0da9, checked all 126 manifest payload sizes/digests (zero mismatches), and verified manifest SHA256 ec9ed13990796ef1ca0acad65205149d425be12b42b47b3ea87c3796a71696a9. Inspected original test-first green and compiled wrong-cfg red logs, candidate 53/26 test logs/receipts, check-fast ten-gate report and two-file selector against Git inventory, precommit report, compiler metadata, benchmark driver/input identity and raw records. These remain author executions, not independent reruns. Retained CLI records show eight successful, uncensored runs with empty owned-process cleanup records and identical complete public JSON bytes (SHA256 7379285334ee6ee7d857766f149f6d06021685dc63019929bfeaceb4a91786c3). Recomputed medians: baseline 5.161610703s, candidate 5.194317286s. NO CLI wall-time improvement is established. Recomputed isolated collector medians 0.476256275s and 0.278332776s: 41.558% reduction on that extracted pre-parsed helper workload only. Original benchmark executables are described by metadata/hashes, not included as executable payloads in this 126-file archive; no independent timing replication is claimed.

Hosted observations/remaining proof: earlier connected PR read showed Draft at requested base/head/merge; connected inline-thread read returned zero threads. CI run 38936779743 had Rust-only feature tests in progress and vscode/msrv/Perl-release jobs skipped at observation. Protected routed Rust-small is wired to ready_for_review, not ordinary Draft activity. Complete hosted qualification, actual hosted checkout evidence, full golden/dogfood and Windows/release proof are not established by this review. No hosted rerun, Ready, merge, release, author-branch edit or review resolution was performed.

Stopped access action: gh pr view 8263 --repo EffortlessMetrics/ripr-swarm --json headRefOid,isDraft,mergeStateStatus,statusCheckRollup returned native 1, Post https://api.github.com/graphql: Forbidden. That exact read was stopped and not retried. Earlier connected reads succeeded; this is not evidence of global GitHub denial or quota exhaustion. Complete live check-status/currentness refresh is not claimed. Parent must reconcile live PR head/base and hosted requirements before promotion.

Review timestamp: 2026-10-16T17:18:49.431272+00:00. Review-owned checkouts remained clean throughout. Raw independent logs, receipts, harness sources and frozen test/CLI witnesses are retained in this executor at /workspace/review-8263-evidence; they are not published executable artifacts. No source repair is requested.

@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

  • Lane ub-worker-handoff has no applicable surface in this PR. The diff is a behavior-preserving refactor of a Rust syntax-scope collector; no JS worker, async-runtime crossing, GC-root, detach, or transfer boundary is introduced or modified.

Verification questions

  • Confirm deferred semantics: new code sets deferred=true only via async fn top-level or closure / async block found in body; nested fn body containing async block does not flip deferred for outer. Module test fixture enforces outer deferred on async fn and does not assert it on declared trait method.
  • Confirm the macro_strings_and_external_modules fixture only validates parse-cleanly equality via compare() returning Ok; it does not assert specific scope-map values for the macro-case. Coverage of opaque! body is real-source (ra.rs) only.
  • Confirm module_scope_walk_refusal_parity asserts module_item_scopes(text).is_none() for malformed fixtures, asserting pre-collector refusal path is identical; not added to refactor scope but explicitly checked.

Refuted

  • Consolidating four descendants() traversals into one might leave intermediate Vec<SyntaxNode> clones heap-allocated and require explicit drop ordering to avoid leaks.; refuted because: ra_ap_syntax SyntaxNode is a handle (Arc-backed green node); node.clone() is refcount bump/decrement with no heap allocation of node contents. No raw memory ownership is introduced; RAII on Vec/String handles cleanup.
  • A single descendants() walk merging cfg/bound/use/deferred/called could drop a deferred-call crossing a nested worker spawn boundary (e.g., spawn_local/postMessage ordering).; refuted because: ripr has no worker, spawn, postMessage, transferable, or JS-binding surface. The 'deferred' flag tracks only ClosureExpr / async BlockExpr presence and is consumed in-process to populate fns_with_deferred_code; no FFI or worker handoff depends on it.
  • UB-active-view lane is JavaScript-specific (ArrayBuffer, TypedArray, SharedArrayBuffer resize/detach/transfer/stale length snapshots). The PR edits Rust syntax-tree traversal on GreenNode/Arc-backed immutable AST data; no JS buffer views, no resize, no detach, no transferable handles exist in the diff.
  • The compare() helper is tautological because summarize_file_with_item_scopes with original_module_item_scopes_in just re-inlines the same logic, so current==reference holds trivially.; refuted because: Helper passes a distinct closure (original vs candidate collector) into the shared summarize path, exercising the keep-filter and downstream FileFacts construction under both; refusal parity is separately asserted. Pre-/post-filter equality is the intended oracle, not a tautology.
  • Unified descendant pass might lose body-only facts for bodyless items, producing extra or missing direct_calls/has_local_use entries (a memory lifetime or active-view aliasing issue in the lane's framing).; refuted because: Both the original if let Some(body) = function.body() { ... } block and the candidate if body.is_some() { if local_use ... if deferred ... scopes.direct_calls.insert ... } skip these maps for bodyless items; the equivalence test module_scope_walk_uses_deferred_and_bodyless enforces the same omission for declared. The lane's memory/active-view vocabulary does not apply to Rust AST node storage; the equivalence invariant is upheld by the test against the frozen original producer.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • parked follow-up: hosted qualification and full-workspace timing are not supplied; treat the local ~41.6% collector win as diagnostic, not a guarantee.
  • Test seam is well-bounded: tests live in #[cfg(test)] mod module_scope_walk_tests; include_str! pulls ra.rs and test_helpers.rs as real-source fixtures, exercising the same descendant code path the CLI hits. Eight tests cover the full ModuleItemScopes surface and complete FileFacts equality, so duplication risk between the reference body and the candidate body is exercised, not just asserted.

EffortlessSteven commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Source/receipt and currentness coordination for exact head 8ac12c026f976489630a767185be756b4fdcecb2, base 3477bf95a9ead7f35ec099a4e6cf17af96708003, candidate tree b3b410906719b57307dee00f38d42bde01db03af. Git objects confirm merge 87bd30f14e0ee130b49e2a5ab61bbbed6d07d719 has those base/head parents and the same tree. Duplicate comments/reviews were checked before this note.

The published independent review 5551232865 already completes pre-Ready source/oracle review and bounded integration controls: candidate and actual-merge parser/helper execution, independent expected-map/generated cases, compiled negative controls, and merge CLI output parity. Its remaining REVIEW_INCOMPLETE concerns overall qualification. The body’s “fresh independent exact-head review remains required” wording is therefore stale for that completed scope; no duplicate runtime review is requested here.

This additional pass was source inspection and retained-receipt analysis only; no Rust tests/builds or timing runs were executed. No blocking source defect found. Independently verified the frozen 101-line extractor exactly matches base after naming normalization; the rest of ra.rs is byte-identical after reversing the collector replacement and injection seam. Tests compare unpruned raw scopes as well as complete FileFacts, preserving the distinction raised in the earlier oracle checklist. Nested-scope asymmetry, signature/body separation, raw-name/line keys, conditional map writes, module membership and bodyless behavior are retained. The extracted microbenchmark collector, LineIndex and nested-call predicate match their actual source bodies.

Verified the author manifest SHA-256 and 35 selected payload sizes/hashes, including all eight CLI outputs, test/red-witness receipts and benchmark drivers/results. The eight public JSON outputs are byte-identical and complete with one finding. These remain author executions. The isolated collector improved 41.558%; complete CLI medians were 5.161610703s → 5.194317286s (0.634% higher). No measured end-to-end improvement or hosted-timeout repair is established.

One source clarification to ub-review’s verification question: an async block inside a nested function does set the enclosing function’s deferred flag. The descendant walk/body containment and deferred check retain that conservative behavior; nested-function exclusion applies only to direct calls.

Current connected readback at 18:46 UTC: unchanged exact identities, Draft=true, zero inline review threads, and 24 visible checks all terminal success/skipped. Rust-only feature lane passed; the CI workflow’s vscode/MSRV/Perl-release jobs were skipped. No Routed Rust Small qualification run/result is present for this head, and no active duplicate run was found.

Existing delivery owner: please reconcile the completed-review wording and state the remaining Draft hold/admission requirement. This note preserves Keep Draft and does not infer that the hold has been released. No candidate edit, CI launch/rerun, Ready transition, resolution or merge was performed.

EffortlessSteven commented Oct 17, 2026 •

Copy link
Copy Markdown
Member Author

Checked stale-lane takeover / bounded delivery claim for #8263: module-scope traversal reuse and its composition with merged #8258. The original lane had been inactive for over six hours when claimed. User-authorized ordinary delivery supersedes the earlier task-local no-Ready/no-merge handoff; repository proof and protection requirements remain.

Published head ce7fcf458b622f0309fafbf62cf5910e6e7ca47d, tree f1519328dd84c0c42b66c6b3cd8825d7e739e649; normal history-preserving branch update. Both frozen collector oracles are retained. Full FileFacts four-way comparisons, raw unpruned scope equality, and compiled wrong-output controls pass. Current local proof: parser62 + helpers26 (88 distinct subjects), check-fast10 gates, precommit and both named CLI fixture controls pass. Initial missing-Cargo driver failure is diagnosed and retained separately; no source change was needed for correction. Original independent review5551232865 remains applicable in its unchanged scope; composed-head review5555373016 records fresh source/oracle inspection and overall REVIEW_INCOMPLETE for hosted qualification. No end-to-end speedup or timeout repair is claimed.

Actual remote merge 6a58963a24c1d090db8a559a56b6b54914594b3e, tree cfc544cdcc01ef0bf1a00a6745da241868cfb532, parents current main 60a22c66851e8f5f6d932361c8e6cd758b9efd48 then this head. #8258 ancestry/production probe implementation and three PR files verified. #8278 main movement independently inspected; no collector/facts/probe change or repair hold.

PR_IN_FLIGHT / WAITING_REQUIRED_CHECKS. One normal Ready transition succeeded at 2026-10-17T01:38:50Z. Routed Rust Small run38991747383 is admitted: routing/docs detection succeeded, GitHub-hosted Rust gates job117275492120 is in progress. Detector checkout logs confirm actual merge6a58963; that is detector evidence only. Actual Rust gates checkout and required Ripr Rust Small Result are still pending. Current review refresh: zero inline threads, no new material finding.

GitHub owns the next transition. Resume when the required run is terminal or a new material finding appears. Inspect actual Rust job checkout/tree/prerequisites, current exact head, required results, reviews/threads/holds; diagnose any failure before retry. Once proof/policy permit, publish exact-head REVIEW_READY and use a normal expected-head squash merge. Do not re-toggle unchanged Ready or force-push. No auto-merge armed, merge performed, release, deployment or protection change. Proof/checkpoints and frozen native witnesses retained for qualification/failure diagnosis.

@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.

Disposition: REVIEW_INCOMPLETE for remaining CLI/hosted qualification; pre-Ready substantive source/oracle inspection of the composed head is complete. No actionable composition defect identified. This COMMENT records the delivery owner's synthesis of a fresh independent read-only reader pass and observed author executions; it is not an independent runtime rerun or a GitHub approval.

reviewed_head_sha: ce7fcf4
candidate_tree: f1519328dd84c0c42b66c6b3cd8825d7e739e649
reviewed_basis: a1ea790
observed_remote_merge: 6a58963; parents 60a22c6 then ce7fcf4; tree cfc544cdcc01ef0bf1a00a6745da241868cfb532. These are fetched Git objects, not inferred from PR base metadata. #8258's f325422 is an ancestor; its production probe_shapes.rs matches. All three PR files match the tested head. The remote merge's seven additional files are exactly #8278's selector delta.

Inspected: complete three-file diff; module_item_scopes_in; both adapters/common summarizer; frozen collectors and fixtures; scope pruning/serialization; complete FileFacts equality; helper-crediting gates; classify/repository probe consumers. The optimized collector and frozen scope oracle retain their original bodies. The probe reference suite differs only in function visibility. Reversing the bounded collector/injection changes reproduces basis ra.rs byte-for-byte.

Production invokes both optimized collectors through the same parse/LineIndex/shared-source path. Each test adapter substitutes only its intended collector. Four-way full-facts comparisons exercise production, each original separately, and both originals; raw scope equality separately precedes name pruning. Invocation counts and nonempty shape premises establish reachability. Separate compiled empty-scope and empty-shape substitutions change complete facts, rejecting bypassed or discarded outputs.

Challenged nested cfg/bindings/uses, bodyless async declarations, signature-only facts, nested fn/closure/async call boundaries, macro opacity, same-line keys and pruning-hidden differences. The source preserves the conservative enclosing deferred flag for nested async blocks; nested-function exclusion applies to direct calls. Shared parser/helpers remain a limitation: these are preservation controls, not independent external Rust accuracy proof.

Fresh reader inspection at 2026-10-17T01:16:39Z found no actionable source/oracle finding. Its subsequent independent #8278 inspection considered the plausible finding-multiplicity interaction: selector handling consumes already-produced Findings, while this composition preserves facts/shapes. No new focused proof solely for that unrelated main delta was required. No reader source/ref/target changes or builds occurred.

Observed author execution: locked Rust1.95/default Rust-Python-TypeScript library artifact, SHA256 d94c721476949f48bc3c44266e4ba83a73678a225402ea0aee12c5fb607be406; parser62/62 and corrected helper26/26, zero failed/ignored, 88 distinct subjects. Initial helpers failed five metadata cases without Cargo on PATH; a direct metadata control demonstrated ENOENT and corrected metadata success, followed by the same executable passing26/26 with the toolchain environment. Failed history is retained, not relabeled. check-fast passed10 gates including strict workspace/all-target Clippy, with an independently matching three-file selector; precommit passed. CLI fixture controls remain in progress at this record.

Retain independent review5551232865 for its unchanged source/oracle/consumer scope and original execution identities. No original result is claimed as a fresh composed-head run. No end-to-end speedup, timeout repair, Windows/release qualification or release claim.

Remaining: finish the two named CLI controls, refresh live head/reviews/threads/runs, and use the normal Draft-to-Ready qualification once those local obligations are complete. Inspect actual hosted checkout and required results before final published-head REVIEW_READY and expected-head squash merge. No Ready or merge is claimed by this review.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 01:38
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@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

  • Lane role is JS/buffer-focused but this PR is a Rust-only syntax-scope refactor; no active-view surface exists to flag. The lane reports zero findings and demotes itself rather than fabricating concerns.
  • Info-disclosure / secret-material angle: ra.rs is a static source-only analyzer. Module-scope collection produces ModuleItemScopes -> FileFacts consumed via test_helpers and summarize_file. No filesystem reads, network I/O, env vars, or credential surface touched by this diff. PR body claims and 8 equivalence/refusal controls plus two real-source fixtures support this. No security regression identified in the bounded UB/security scope.
  • The eight controls compare each fixture's frozen-oracle output against the candidate for the same fixture; they do not cross-check fixtures against each other, so a systematic regression shared by both oracle and candidate across all fixtures would not be caught. Real-sources inclusion (ra.rs, test_helpers.rs) partially mitigates.

Verification questions

  • Confirm no additional callers of the renamed summarize_file_with_probe_shapes were reintroduced in the diff; the new test-only wrapper covers existing test usage (per seeded review 5551232865 covering helper crediting in analysis/facts/test_helpers.rs). Sibling scan limited to the three changed paths; a full sibling scan across the workspace was not executed in this lane.
  • Confirm deferred semantics in the merged traversal match the original: deferred=true only via async fn top-level token or closure/async block found in body; nested fn body containing async block does not flip deferred for outer. The !deferred guard preserves the original short-circuit.
  • Confirm cLI median wall-clock difference (5.162s vs 5.194s) and the 0.6% regression on the bounded helper workload, while within overlap, indicate no end-to-end speedup is claimed and overlap should not be presented as improvement.

Refuted

  • Consolidating four descendants() traversals into one might leave intermediate Vec clones heap-allocated and require explicit deallocation at an async boundary.; refuted because: No async or worker boundary is crossed: the collector seam is synchronous, scopes.bound_names and scopes.direct_calls are inserted via BTreeMap directly, no Box::from(slice) or cross-runtime transfer pattern is present, and defer/closure checks remain intra-traversal with the original !deferred short-circuit preserved.
  • Box::from(slice)/allocation-failure analysis could surface from the merged descendant traversal; refuted because: No Box::from, no slice->Box conversion exists in this diff; descendants() yields owned SyntaxNode handles from the RA arena, and bound/called are plain Vec with deterministic push. Allocation failure is not raised by this PR diff.
  • Consolidating four descendants() traversals into one might leave intermediate Vec clones heap-allocated and require explicit drop ordering that could be observed as a panic-safety / abort-on-poison boundary; refuted because: Refuted: diff introduces no Vec<SyntaxNode> materialization. Loop iterates function.syntax().descendants() directly and only clones nodes that are passed to ast::Attr::cast(node.clone()), ast::AnyHasName::cast(node.clone()), ast::BlockExpr::cast(node.clone()). These are RAAP-syntax Red/Green-tree SyntaxNode clones (cheap, refcounted). Collected bound: Vec<String> and called: Vec<String> are plain String vectors; panic during cast does not poison shared state. No abort boundary, no allocator-failure path unique to this diff.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • Park any 'scan rest of repo for descendants() callers of ast::Fn / ast::CallExpr that might also be mergeable here'; this lane confirmed there are no in-repo consumers of ModuleItemScopes fields besides the summarizer seam itself, so the next candidate would be out of scope for #8263.
  • Pre-existing fixture-only coverage on opaque! scope-map values and on declared trait-method deferred-status is preserved verbatim from the candidate body; not a new oracle gap introduced by this diff.

Copy link
Copy Markdown
Member Author

Final qualification reconciliation for head ce7fcf4: required run 38991747383 succeeded, including aggregate 117286884346. Producer 117275492120 actually executed 6a58963, composing this head with 60a22c6. Nextest: 16,554 passed, 3 skipped. Doctests: 2 passed, 1 ignored. Required policy, checks, strict Clippy, output/fixture contracts, corpora and evidence passed.

Independent composition review 5555373016 remains applicable. Subsequent source reconciliation through main 7c03968 found nine intervening changes, with no parser/collector/test-seam overlap. Analysis consumers retain the preserved source/fact contract; the oracle constructor classification change uses the unchanged summarizer pipeline. No specific composition defect was found. This is a bounded source applicability judgment, not a claim that the later combined tree was executed. Existing scoped review and tested composition are sufficient for the normal protected expected-head merge.

Latest bot questions: the private cfg(test) shapes-only adapter remains and delegates to the combined collector seam. Nested-function async blocks intentionally conservatively set enclosing deferred=true; direct-call collection has different exclusions, as already explained in 6222415799. Timing claims remain workload-specific: isolated collector median improved 41.558%, while complete CLI median increased 0.634%; no end-to-end speedup or timeout-repair claim.

Live reconciliation: unchanged head, Ready, clean mergeability, zero inline threads, no requested changes or active hold. Required checks remain preserved.

@EffortlessSteven
EffortlessSteven merged commit c6ca394 into main Oct 17, 2026
37 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/module-scope-walk-reuse branch October 17, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant