Skip to content

perf(classify): skip macro-item parse when the exact answer is known (#9217) - #12033

Merged
EffortlessSteven merged 2 commits into
mainfrom
cursor/9217-macro-item-name-prefilter-67b5
Nov 1, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
cursor/9217-macro-item-name-prefilter-67b5

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Skip MacroSites::scan / parse_clean_source_file in macro_may_define_item_named when the exact answer is already known from cheap text checks. Classification answers stay the same; helper-hop callers keep using this function. Per-source memoization of sites on the helper-hop path is not in this PR.

Advances #9217

Swarm / Source Boundary

This PR targets EffortlessMetrics/ripr-swarm, the normal development trunk for
trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge,
    dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating
    surface
  • other swarm-scoped work:

If this PR moves crates.io publishing, VS Marketplace publishing, Open VSX
publishing, GitHub Release assets, signing, release environments, or release
secrets, close or retarget it. Those surfaces belong in EffortlessMetrics/ripr
unless a dedicated release-boundary change has already been approved.

Source-of-truth Links

Proposal: none
Spec: none (perf skip of an existing exact answer; #8467 controls stay)
ADR: none
Plan item: none
Governing issue or accepted claim: #9217
Acceptance delta (one sentence): macro_may_define_item_named returns false without scanning when the source has no !, or when the callee name (with r# stripped) is absent as a whole word and the source has no macro_rules!, while unparsed macro_rules! files stay undecided and existing #8467 answers stay unchanged.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): cursor/9217-macro-item-name-prefilter-67b5
Stack parent or prerequisite PR (if any): none for this delta. GitHub merged origin/main 99b2e4d08e (#11995) into this PR; that landing removed the inherited check-process-policy orphan that had failed local precommit and hosted Rust gates on ccd20e0655. Unique delta vs current main is unchanged (three files).
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): none; needs no reconciliation

Name a stack or proposed replacement explicitly. A proposed replacement does
not make its predecessor superseded. Shared files or a shared parent issue
alone do not establish duplication. If the relationship is unknown, record it
as needing reconciliation before disposing of either PR.

Scope

Exact-answer prefilter in macro_may_define_item_named, plus a test-only retarget of the #9086 SCAN_COUNT pin so it still measures scan-once-per-distinct-query after the skip.

Scope Classification

This PR is scoped by:

  • One production behavior
  • One public contract
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other:

Production delta:

  • macro_may_define_item_named returns false without MacroSites::scan when source contains no !.
  • After stripping a leading r#, an empty name returns false without scanning (same as may_define).
  • If the stripped name is not a whole word in source and source has no macro_rules!, return false without scanning.
  • Otherwise scan and may_define as before. An unparsable file that holds macro_rules! still answers true (undecided).

Evidence/support delta:

Single acceptance criterion:

Non-goals:

  • Per-source memoization of MacroSites on the helper-hop path (file_imports_foreign_callee_name / reveal.rs).
  • Production edits to reveal.rs or helper_transfer.rs.
  • Changing classification vocabulary or findings.

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

  • User-visible finding classes are unchanged. Changelog records the skip as a Changed performance note.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes:

Proof

cargo test -p ripr --lib macro_item_names::tests
cargo test -p ripr --lib scoped_import_answer_scans_once_per_distinct_query
cargo test -p ripr --lib scans_each_file_once_not_once_per_test
cargo test -p ripr --lib never_scan_imports
cargo clippy -p ripr --all-targets -- -D warnings
cargo xtask precommit

Result, failures, or skipped proof:

Claim Boundary

What may be claimed after this PR? What must not be claimed yet?

Rollback

How can this PR be reverted safely?

Revert the commit. Answers return to always-scan; the #9086 fixture bang is only needed while the skip exists.

Spec-Test-Code Traceability

  • Spec: none for this perf skip; macro_item_names: macro-defined owner name still missed for fn name in arguments, passthrough macros and some use forms #8467 controls remain the semantic regression set
  • Tests: macro_item_names::tests::{a_source_without_bang_never_scans, an_absent_name_without_macro_rules_never_scans, a_present_name_still_scans_and_may_define, an_unparsed_macro_rules_file_still_scans_when_the_name_is_absent}; helper_transfer::tests::scoped_import_answer_scans_once_per_distinct_query
  • Code: macro_may_define_item_named in crates/ripr/src/analysis/classify/macro_item_names.rs
  • Golden outputs: none
  • Metrics: none
  • ADR/learning: none

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

  • LEM impact: n/a
  • Workflows touched: none
  • Branch protection impact: n/a
  • Failure mode caught: n/a
  • Cheaper signal considered: n/a
  • Required lanes affected: none
  • Advisory lanes affected: none
  • On-demand/release lanes affected: none
  • Labels that alter behavior: none
  • Artifact families affected: none
  • Rollback path: n/a

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Gates

Local: fmt (via precommit), package Clippy, focused tests as above. Full workspace test/clippy/doc/package not rerun locally. Hosted Ripr Rust Small Result is the qualification request after Ready + merge-ready. Current-subject run is in flight on adopted head 8c9710c1; do not re-apply merge-ready.

Exact candidate SHA at publication: ccd20e0655dfadae757a7e4dc9d30ef205c10346
Adopted exact head after GitHub merge of main: 8c9710c1a7905fe775962e1be640577757d96cd8

Open in Web Open in Cursor 

…9217)

Return false from macro_may_define_item_named without MacroSites::scan
when the source has no `!`, or when the callee name is absent and the
file has no macro_rules!. Unparsed files that hold macro_rules! stay
undecided.

Retarget the #9086 SCAN_COUNT pin onto a source that contains `!` so it
still measures scan-once-per-distinct-query after the skip.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@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 Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: e88012b4-bc61-47ab-9801-280a87507147
Commits

Reviewing files that changed from the base of the PR and between 99b2e4d and 8c9710c.

Files selected for processing: 3
  • changelog.d/9217-macro-item-name-prefilter.md
  • crates/ripr/src/analysis/classify/helper_transfer.rs
  • crates/ripr/src/analysis/classify/macro_item_names.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

review-pr (author self-review COMMENT)

GitHub cannot request-changes from the author. This is not an approval.

reviewed_head_sha: ccd20e0655dfadae757a7e4dc9d30ef205c10346
integration_basis: origin/main a69bf0214f7bd7e0537a1cdd07e95608e5a366e8
claim_boundary: exact-answer prefilter in macro_may_define_item_named (#9217 item 1); helper_transfer.rs test-module fixture retarget only; no helper-hop memoization; no reveal.rs edits
changed_surfaces_and_semantic_owners_inspected: analysis/classify/macro_item_names.rs (owner of MacroSites::scan / may_define); consumers file_imports_foreign_callee_name (reveal.rs:4638) and helper-hop callers via that gate; FileUseStatements still scans directly (ProbeContext memo path unchanged); helper_transfer.rs mod tests only; changelog.d fragment
blocking_findings: none on this head
non_blocking_suggestions: unparsed control uses SCAN_COUNT >= 1 rather than == 1; raw source.contains("macro_rules!") is a conservative extra scan vs the masked Unparsed path (answers stay exact)
refuted_or_stale_findings: gemini-code-assist and coderabbit comments are quota/rate-limit, not source findings (missing provider review, not a clean bot pass)
proof_and_ci_observed: local macro_item_names::tests 14/14 (two skip tests failed before the prefilter); scoped_import_answer_scans_once_per_distinct_query pass after fixture bang; other SCAN_COUNT pins pass; cargo clippy -p ripr --all-targets -- -D warnings pass; cargo xtask check-pr-shape pass on published body; cargo xtask precommit fail on inherited check-process-policy orphan for run_chain.rs grouped import (#12027), not this diff; goldens skipped
proof_or_review_missing: hosted Ripr Rust Small Result (not requested until Ready + merge-ready); ub-review / coderabbit / gemini quota; full workspace test matrix
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim (changelog); integration basis unchanged; no goldens/conflicts
residual_assumptions_and_non_claims: skip is exact for parsed routes because every may_define path needs the name in text; Unparsed+macro_rules! remains undecided by not skipping when macro_rules! is present. Does not claim a measured wall-clock win, helper-hop site memoization, or runtime mutation outcomes.
disposition: REVIEW_INCOMPLETE for missing hosted qualification; no blocking source/oracle defect on this head. Eligible to leave Draft, mark Ready, and request merge-ready. Not REVIEW_READY for merge.

Authority

macro_may_define_item_named remains the helper-hop authority. ProbeContext still uses FileUseStatements::macro_sites → MacroSites::scan directly, so the skip does not change the memoized per-file path. Callers in reveal.rs / helper_transfer.rs production code are unchanged.

Oracle challenge

A name-only skip would still scan the bang-less entry fixture; a bang-only skip would still scan emit!(other) for entry. Both fail before the prefilter (SCAN_COUNT 1 and 2) and pass after (0). Positive emit!(entry) still scans once and answers true. Unparsed fn { macro_rules! ... with an absent name still answers true, so a wrong "name absent → false" skip is rejected. Existing #8467 controls unchanged.

Fixture retarget

#9086 scoped_import_answer_scans_once_per_distinct_query must keep measuring scan-once-per-distinct-query. The old bang-less source would now skip. Unused macro_rules! unused supplies ! without rebinding parse/other. Test-module only.

Zero inline threads. Quota bot comments are missing provider evidence.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 1, 2026 02:53
@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!

@EffortlessSteven

Copy link
Copy Markdown
Member Author

merge-ready requested on frozen head ccd20e0655dfadae757a7e4dc9d30ef205c10346.

Ready is review state; the merge-ready label is the qualification request for Ripr Rust Small Result. Head will not be pushed again unless that result fails with a candidate defect. Inherited check-process-policy red on main (#12027) is not repaired here; if qualification fails on that gate it is inherited, not this diff.

No merge from this session.

@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 (fresh-context reviewer, head ccd20e0): REVIEW_INCOMPLETE

First independent review on this PR. It is bound to the head below and rests on the source at that head and on the hosted checks at that head.

Inspected:

  • Head ccd20e0655dfadae757a7e4dc9d30ef205c10346; not draft; mergeable: MERGEABLE, mergeStateStatus: BLOCKED; no labels; title "perf(classify): skip macro-item parse when the exact answer is known (#9217)". Governed by issue #9217.
  • The candidate's whole change against the current main tip a69bf0214f7bd7e0537a1cdd07e95608e5a366e8, which is also this branch's base, is 3 paths, +72/-1: changelog.d/9217-macro-item-name-prefilter.md (+5/-0, new), crates/ripr/src/analysis/classify/helper_transfer.rs (+9/-1) and crates/ripr/src/analysis/classify/macro_item_names.rs (+58/-0). The change is confined to one function and its tests.
  • What the change does. macro_may_define_item_named(source, name) gains three cheap checks before it reaches MacroSites::scan(source): if !source.contains('!') { return false; }; the queried name has its r# prefix stripped and an empty name returns false; and if !contains_as_whole_word(source, name) && !source.contains("macro_rules!") { return false; }. Everything else falls through to the original MacroSites::scan(source).may_define(name).
  • I checked the shortcut for soundness rather than assuming it. MacroSites::scan (crates/ripr/src/analysis/classify/macro_item_names.rs) parses the source with parse_clean_source_file; on a parse failure it returns Self::Unparsed { has_macro_rules: mask_comments_and_strings(source).contains("macro_rules!") }, and may_define on that variant returns *has_macro_rules — the undecided answer is true exactly when the file is unparsable and holds macro_rules!. The prefilter's escape hatch is keyed on the same condition, so the undecided case still reaches the scan. The three checks are each sound for the same reason: a macro invocation requires a ! in the text; may_define's argument-based paths (mentions_name, bare_item_argument, declares_in_arguments) all look for the name inside the invocation's arguments, which are part of the source, and the local-macro_rules! path can only make the answer true when the name appears in the definition's expansion text, which is also part of the source — so a name absent from the source text cannot make may_define true. The r# strip mirrors the one inside may_define, so the two agree on raw identifiers.
  • One asymmetry worth recording, and it is in the safe direction: scan computes has_macro_rules over the comment-and-string-masked source, while the prefilter tests the raw source. A file whose only macro_rules! is inside a comment or a string therefore takes the slow path even though the masked answer is false. That is conservative — it costs a parse it could have skipped, and it cannot change an answer.
  • The oracle. Four new tests use a #[cfg(test)] SCAN_COUNT thread-local that MacroSites::scan increments, and they pin the mechanism rather than a wall clock: a_source_without_bang_never_scans (a source with the name present but no !, so a name-only prefilter would still scan) asserts zero scans; an_absent_name_without_macro_rules_never_scans (a source with ! but no macro_rules!) asserts zero scans for both entry and r#entry; a_present_name_still_scans_and_may_define asserts one scan and a true answer; an_unparsed_macro_rules_file_still_scans_when_the_name_is_absent asserts the unparsable macro_rules! case still scans. Observing the count of avoided parses is the right shape of proof for a performance change, and it discriminates — each test is constructed so that a weaker prefilter would still scan.
  • The delta also repairs an existing test whose premise the change silently broke. helper_transfer.rs's scoped_import_answer_scans_once_per_distinct_query used a source with no !, so after the change it would have taken the fast path and no longer measured scan-once-per-distinct-query. The author added a macro_rules! unused { () => {}; } line to keep the bang and documented why, including the claim that the unused macro "does not rebind parse or other" — which holds, because may_define's local-definition branch is keyed on the invoked macro's name and unused is never invoked.
  • The PR body's acceptance delta matches the implementation sentence for sentence: "macro_may_define_item_named returns false without scanning when the source has no !, or when the callee name (with r# stripped) is absent as a whole word and the source has no macro_rules!, while unparsed macro_rules! files stay undecided and existing #8467 answers stay unchanged."
  • Hosted evidence at this head (54 contexts): the check rollup is PENDING — 14 SUCCESS, 33 SKIPPED, 1 NEUTRAL, and 6 still running (ub-review, paste-macos-latest and four others). The required status check Ripr Rust Small Result is absent, and every Rust lane is SKIPPED. The PR body records the same thing from its side: local cargo xtask precommit fails on an inherited check-process-policy orphan in policy/process_allowlist.d/11720-first-pr-run-chain.txt, which the body attributes to #12021 / open #12027 and names as not-this-diff.

Blocking:

  • None found. The shortcut is sound on all three of its branches, the oracle discriminates, the acceptance matches the implementation, and the one existing test whose premise the change invalidated was repaired with its reason recorded.

Non-blocking:

  • The structural fix is available and this PR deliberately does not take it — and it says so, which is what makes this a note rather than a criticism. crates/ripr/src/analysis/classify/reveal.rs:4696 already reaches the same parse through a memo: .get_or_build(&file, || super::macro_item_names::MacroSites::scan(source)). The helper-hop path this PR optimizes reaches the same MacroSites::scan through crates/ripr/src/analysis/classify/context.rs:184 (memo.macro_may_define_callee_name(file, source, callee)), which is where the repeated parse lives. So the repository already contains the structure that removes the parse once per file rather than once per query, in the same module family. The PR body says "Per-source memoization of sites on the helper-hop path is not in this PR", which is exactly the disclosure that makes this acceptable: the author has identified the follow-up, named it, and left it out of a change whose acceptance is a behavioural skip. Recording it because the next reader of this code will meet the same repetition and should know the memo shape exists.
  • The prefilter's own cost is O(source length) per query, and it is paid once per (file, callee) pair. Three substring scans over the source replace one parse, which is a large constant-factor win, but the scans are repeated for each queried callee name on the same file — so a file with many callee names pays many scans and, when any name is present, still pays a parse per query. Both costs are bounded and strictly smaller than what they replace, so this is a net win by construction; it is only a note that "skip the parse" and "do the parse once" are different improvements, and only the first is in this PR.
  • No measurement is published, and for this acceptance that is defensible. The change's acceptance is behavioural — the scan must not happen when the answer is known — and the oracle proves it by counting scans, which is stronger evidence than a timing delta. What is missing is the size of the prize: no figure says how many parses a real classification run performs, or what fraction this removes. A one-line note in the changelog fragment or the body ("the helper-hop path re-parses per callee name; on the corpus this removed N parses of M") would tell a reader whether the change matters in practice without needing a benchmark. The fragment currently states the mechanism only.
  • Efficiency — the change removes the most expensive operation it can. MacroSites::scan calls parse_clean_source_file, a full parse of the file; the prefilter replaces it with substring searches that cannot exceed the parse by more than a constant factor. There is no new I/O, no process spawn, no cache with an invalidation obligation, no unbounded collection, and no allocation added on the analysis path — the scan counter is #[cfg(test)] gated inside scan itself, so the release binary pays nothing for the instrumentation. The changelog fragment and the code agree that the answers do not change, and the unparsed-macro_rules! carve-out is the one place where they could have, so it is worth noting that the carve-out is exactly where the code and the fragment both say so.
  • The has_macro_rules asymmetry costs a parse in a rare case. A file whose only macro_rules! sits inside a comment or a string takes the slow path even though the masked answer is false. Matching the prefilter to scan here — masking the source once and reusing it for both checks — would recover that parse, at the cost of one masked copy per query. At the rarity of the case, I would not make that change; recording it so the asymmetry is not mistaken for an oversight if someone reads the two macro_rules! tests side by side.

Not run:

  • The Rust toolchain on this host is not on PATH, so there was no local build, no cargo xtask precommit, no local test run, and no way to execute the new tests here. Every Rust-level statement above comes from the hosted check list at this exact head or from reading source at this exact SHA.
  • The hosted Rust phase is unobserved at this head, not green: every Rust lane is SKIPPED, the required check Ripr Rust Small Result is absent, and six contexts were still running when I read them. This review does not rest on the Rust phase and does not claim it passed.
  • The new scan-counting tests have not executed at this head. My reading that the shortcut is sound and that each test discriminates is from the source and from the tests' own assertions, not from an observed run; in particular, the claim that the shortcut cannot change an answer rests on the relationship between may_define's argument-based paths and the presence of the name in the source text, which I derived by reading rather than by executing both sides.
  • I did not reproduce the parse-count reduction on a real corpus; I did not run any classification.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head ccd20e0655dfadae757a7e4dc9d30ef205c10346. Not an approval.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

ccd20e0 hosted reds were inherited, not this unique delta.

GitHub merged main 99b2e4d08e (#11995) into this PR. Adopted head 8c9710c1a7905fe775962e1be640577757d96cd8. Unique production/test/changelog files vs new main are unchanged (3 paths, +72/-1). merge-ready remains; not re-applied (current-subject run in flight: https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/41269301992).

Waiting for Ripr Rust Small Result SUCCESS on this exact head. No merge from this session.

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

review-pr (author self-review COMMENT) — integration-basis refresh only

GitHub cannot request-changes from the author. This is not an approval.

reviewed_head_sha: 8c9710c1a7905fe775962e1be640577757d96cd8
integration_basis: origin/main 99b2e4d08e5dbed103d661e89cf1c6fabb6a7b62 (#11995)
claim_boundary: exact-answer prefilter in macro_may_define_item_named (#9217 item 1); helper_transfer.rs test-module fixture retarget only; no helper-hop memoization; no reveal.rs edits
changed_surfaces_and_semantic_owners_inspected: unique delta vs new main is the same 3 paths as ccd20e0655 (+72/-1): macro_item_names.rs, helper_transfer.rs tests only, changelog fragment. Production/test/oracle/public-claim dimensions unchanged from the ccd20e0655 source review.
blocking_findings: none on this head
non_blocking_suggestions: unchanged from ccd20e0655 review (conservative raw contains("macro_rules!"); SCAN_COUNT >= 1 on unparsed control)
refuted_or_stale_findings: ccd20e0655 hosted reds classified inherited (process-policy orphan landed via #11995; LSP/selector/worktree tests were main-red shards). Quota bot comments remain missing provider review, not a clean bot pass. Zero inline threads.
proof_and_ci_observed: unique files identical to the reviewed ccd20e0655 unique delta. merge-ready request in flight for this exact head (actions/runs/41269301992); Ripr Rust Small on GitHub Hosted / Rust gates in_progress; Ripr Rust Small Result not yet terminal.
proof_or_review_missing: hosted Ripr Rust Small Result on 8c9710c1; ub-review / coderabbit / gemini quota
affected_currentness_dimensions: integration basis only (GitHub merged main #11995). Production implementation, test stimulus, test oracle, public claim, generated relationships unchanged. No conflict resolution in the unique delta.
residual_assumptions_and_non_claims: same as ccd20e0655: skip is exact for parsed routes; Unparsed+macro_rules! remains undecided. Does not claim a measured wall-clock win, helper-hop site memoization, or runtime mutation outcomes.
disposition: REVIEW_INCOMPLETE for missing hosted qualification on this exact head; no blocking source/oracle defect. Not REVIEW_READY for merge. Do not re-apply merge-ready while the current-subject run is in flight. No merge from this session.

Independent review 5726184907 remains valid for the unique source/oracle at ccd20e0655; this head only adds the GitHub merge of main. Refresh is integration-basis only.

@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 cheap prefilter preserves the parsed-answer route: no bang returns false, an empty raw identifier returns false, and absent names still scan when macro_rules! is present.
  • Confirm focused behavioral coverage exists for both skip paths and both scan paths, including raw identifiers and unparsable macro_rules! input.
  • Confirm the two new skip tests are red/green-sensitive to the production prefilter, but no broad differential test proves prefilter equivalence to the parsed classifier across varied Rust syntax.
  • Confirm the runtime-helper scan did not establish absence of every equivalent macro-item textual prefilter elsewhere, so repository-wide call-site coverage remains needed.
  • Confirm the helper_transfer change is test-only and preserves the scan-once-per-distinct-query pin by adding a bang and unused macro_rules! without changing production routing.

Refuted

  • No worker, async, GC, detach, or transfer boundary is touched by the diff.

Evidence gaps

  • Broader public route coverage remains incomplete because the ripr sensor failed and cargo-test receipt is absent; this lane cannot independently validate all affected callers.
  • The absent cargo-test receipt leaves runtime validation of the new prefilter pins unresolved.
  • The late cargo-test receipt remains absent, so the advertised Rust behavior proof is not independently completed in this review packet.
  • The source-UB sensor did not complete successfully, so the added behavioral tests have not been confirmed by the supplied sensor packet.
  • Model proof intent was rejected by deterministic validation.
  • Full semantic equivalence is not independently proven because cargo-test evidence was absent and ripr exited with code 2.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Qualification on frozen head 8c9710c1a7905fe775962e1be640577757d96cd8 failed as infrastructure, not this unique delta.

Unique delta vs main is still the three files. In-place rerun failed jobs cannot pass admission (attempt vs recorded GITHUB_RUN_ID-GITHUB_RUN_ATTEMPT). Supported retry: remove and re-apply merge-ready on this exact head for a fresh run. No merge from this session.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Re-requested qualification on frozen head 8c9710c1a7905fe775962e1be640577757d96cd8 (remove + re-add merge-ready after the diagnosed runner SIGTERM). Fresh current-subject run: https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/41276174569 (Merge-ready request 8c9710c1…). Do not re-apply while this run is in flight. No merge from this session.

Copy link
Copy Markdown
Member Author

Review of record, head 8c9710c1a7905fe775962e1be640577757d96cd8. Disposition: REVIEW_READY.

Inspected: full diff (3 files), semantic owner analysis/classify/macro_item_names.rs. The new early returns in macro_may_define_item_named are exact: with no !, MacroSites::scan yields no invocations (Parsed) or has_macro_rules=false (Unparsed, since macro_rules! contains !), so the answer is false either way. An absent whole-word name with no macro_rules! can only be true through may_define, which needs the name in invocation arguments or a local definition, so false is exact. r# prefix handling matches may_define. A name that appears only in comments/strings still scans (conservative). An unparsable file holding macro_rules! still scans and stays undecided. Tests: four new tests use the existing SCAN_COUNT hook with discriminating positive and negative cases (bang-only and name-only prefilters are each ruled out); the existing helper_transfer scan-once pin was adjusted so it still measures scan-once rather than the skip, with a non-rebinding macro. Changelog fragment 9217-... cites (#9217). No docs/golden surface. Ripr Rust Small Result completed/success on this exact SHA (06:28Z; earlier failures were infra/inherited per the PR comments), mergeable_state clean, no unresolved threads.

Findings: none.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit ddb5e98 into main Nov 1, 2026
116 of 124 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/9217-macro-item-name-prefilter-67b5 branch November 1, 2026 09:30
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