Skip to content

fix(rust): admit bounded real terminal tuple projection (#1728) - #7836

Merged
EffortlessSteven merged 15 commits into
mainfrom
fix/1728-terminal-derived-flow
Oct 17, 2026
Merged

EffortlessSteven merged 15 commits into
mainfrom
fix/1728-terminal-derived-flow

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Current maintenance repair

A crate-root macro can emit an inherited Some that erases the selected terminal relation. The reviewed head falsely reported that arm exposed although a compiling wrong-arm native specimen passed all four assertions. This repair withholds the bounded terminal witness for opaque item/statement expansions using the shared macro scope boundary, while retaining ordinary constructors, confined expression expansions and the real full terminal owner.

  • Branch: fix/1728-terminal-derived-flow
  • Published head: aee66a963db165f4153d92134250bd13a7b00e1e
  • Tree: d627d453838d3852562bbf02e9ff1376ced0a102
  • Previous reviewed head: bb9ed3ceaa341f185c1ac7d00b682349aec55cdf
  • Authoring base: c96a7929f8c694eb62cff2dbe2ad7ee94beea815

The P1 review is reproduced and repaired in the same candidate. A permanent public regression and generated-constructor honesty fixture discriminate this failure. The new fixture's owner, diff and four-field oracle are byte-identical to the written-constructor control. Only its crate-root constructor definition becomes a macro expansion. Existing goldens, consumer source, pins, thresholds, schemas and shared evidence.rs are unchanged by this repair.

Current candidate proof: 25 library / 27 public tests (23/26 original controls plus new regressions); native five positive cases / 11 compiling mutants failing assertions; workspace/all-target check, shared honesty, policy-all, dogfood, check-fast 15 gates / 39 selected paths including strict Clippy, and precommit pass. Changelog disposition: existing changelog.d/1728-real-terminal-tuple-flow.md updated, preserving its canonical section/bullet/issue form. Spec 0093 and traceability map the new evidence; honesty charter 0108 includes its refusal invariant.

Unprepared full goldens/fixtures red solely on #7616 remains retained. Locked fetch downloaded absent anyhow 1.0.100; the same frozen CLI without rebuild changes owner-pin weak exposure to exposed. CLI SHA256: b8ca3c42dc88829433227fa75ff0099da5aeffce1d5737ac9bb97c80ec4bb567. Prepared full goldens/fixtures pass: 408 fixtures / 1,005 comparisons. No existing golden was changed or blessed. Behind-only doctor red is retained; no restack was performed.

Frozen current-main composition: 6511f787db89e9944096f08b776e19bfb4915c82, tree 90e5131ccda4389f36533cedf5d0bf05fba8f4d6, parents main 477d1f79d4934e8253446d42c63b8651b310ed82 / repair head. Its 25 library / 27 public tests, honesty and all 15 check-fast gates pass, including strict workspace/all-target Clippy. Full goldens and fixtures pass: 414 fixtures / 1,022 golden comparisons. The initial aggregate was deliberately interrupted at the reserved storage floor (driver 143); that partial receipt is retained. After all consumers exited, newly generated disposable compiler sessions were released and capacity restored; preloaded state and mandatory witnesses remain. Resumed checks used CARGO_INCREMENTAL=0 and completed successfully. No command already in progress was duplicated. Fresh shell/process verification establishes both source worktrees are clean and no validation is active.

GitHub's separately observed simulated merge is e0767f15de3833e882324947156ad281c45779a5, tree 1fd50cdbad3fd1b6f8a70344784754e3d1ae2eb3, parents later main 43e030656efdcedc3e8d8b507d59ce5a39253b6d / repaired head. It has not been executed or qualified here. The four-commit later-main delta changes output renderers/workflows/unrelated corpus evidence; native diff inspection confirms no classifier, manifest/lock or toolchain changes. Frozen qualification remains bound to 477d1f79….

One maintenance handoff carries current validation status. Raw logs, source witnesses, frozen CLI/native counterexample and report copies remain on this executor in /workspace/proof-7836-repair.

Next: parent assigns fresh independent exact-head review using this completed evidence handoff. Review thread resolution and lifecycle remain parent-owned. No Ready, merge, release, deployment, adoption or issue closure. Historical denied nextest/release downloads and administration reads were not retried; hosted/full-nextest and indirect serialized caller qualification remain unestablished.

Original author handoff — historical evidence for bb9ed3c…

Summary

The real terminalize_proof consumer derives request_set outside its closure and returns status, reason, request IDs and receipt IDs after sorting matching receipts. The #3769 helper-only witness cannot admit that flow. This adds a bounded parsed-source witness for that exact owner shape and a direct, single-receipt projection oracle. Request-only changes become exposed only when the oracle observes all four returned fields for the selected arm.

Swarm / Source Boundary

  • ordinary analyzer, spec, test and fixture development for ripr-swarm

Source-of-truth Links

Candidate Relationships

Branch: fix/1728-terminal-derived-flow. This follows merged #3769 (1b4366bcbe867624eb9bc01fde32883f10a4b88c) and preserves #4043 shadowing and #4068 direct-return protections. It does not replace an open candidate. Initial ownership recheck covered all 34 open PR inventories. A fresh pre-publication check covered all 33 open PRs, including both file pages for #7828; none changed the three production files or focused test. Shared corpus additions are separate bounded entries; current co-owners include #7828, #7817, #7809, #7804 and #7778. Shared classifier/evidence.rs, owned by #7627/#7765 and other active work, is untouched.

Scope

  • One production behavior: bounded terminal tuple-arm observation.
  • Production files: tuple_match/derived_admission.rs, new tuple_match/derived_admission/terminal_flow.rs, and tuple_match_derived.rs.
  • Evidence: faithful public-API regression, focused negative controls, two durable namespace honesty fixtures, spec/traceability and changelog.

The grammar binds one parser-owned match to the five canonical parameters and exact surrounding owner tokens, ignoring lexer trivia only. The existing derived discriminator retains arm and initializer identity. A standalone oracle binds literal receipt and request maps to a direct owner invocation and four literal result assertions. Existing indexed macro/value-name authority refuses formatter and constructor replacement, opaque imports, incomplete source, mutation and shadowing.

Proof

Before repair, test-only commit cf88a90334b30aeac119152d0a397dc1e5fbe511 (tree 10f39a0275d7bc1a4da1db3e86b8b1b4fcd0c141, parent c96a7929f8c694eb62cff2dbe2ad7ee94beea815) produced 1 passed / 1 failed. The faithful request-only regression remained WeaklyExposed with observation_unverified: probe probe:src_lib.rs:match_arm:802442a0, gap gap:rust:src/lib.rs:terminalize_proof:match_arm:match_arm:true_false. The exact red result is retained.

At the published candidate head:

cargo test -p ripr --lib tuple_match                         # 23 passed
cargo test -p ripr --test match_arm_tuple_derived_local       # 26 passed
cargo check --workspace --all-targets                        # pass
cargo xtask check-fast                                      # pass, 15 gates / 29 changed files
cargo xtask precommit                                       # pass, exact-head report
cargo xtask check-policy-all                                # pass
cargo xtask check-evidence-promotion-honesty                  # pass
cargo xtask goldens check                                   # fail: one baseline owner-pin drift
cargo xtask fixtures                                        # fail: same baseline owner-pin drift

The full golden/fixture failure is owner_return_pin_fallible_literal, expected exposed, actual weakly_exposed. Unchanged base c96a7929f8c694eb62cff2dbe2ad7ee94beea815 reproduces the golden failure and its produced fixture JSON is byte-identical to the candidate. Both new terminal fixtures match their committed goldens. No unrelated snapshot was re-blessed. Precommit report digest: sha256:8eaad3a133de5e043092f442fb4da3aed5ce1bd3226da6a53899f6e04a74356d.

The completed verification composition passes 23 library / 26 public tests, all 15 check-fast gates (including strict workspace/all-target Clippy), and evidence-promotion-honesty. Full goldens and fixtures both exit 1 on the same single owner-pin drift. The owner-pin JSON is byte-identical across unchanged authoring base, candidate and composition: sha256:c7b452ad144fb678082422102f0599af1ad6e18783bffd7bf7e3bd2ca9a2bd39. Both new terminal fixtures match. The owned branch is restored and clean with no validation processes running. The canonical handoff includes the final receipt. No qualification of advancing main or hosted required checks is claimed.

Logs, native sources/binaries, report and identity manifests are retained on the selected executor under /workspace/proof-1728.

Native Rust checks retained all four identity combinations and an additional sorting/dedup case: 5 passed. Five compiling mutants fail meaningful assertions: wrong arm, wrong proof-map binding, diagnostic-only reason, omitted receipt projection and unsorted matching. Local/imported counterfeit formatters and an inherited Some constructor demonstrate native wrong-arm runs that still pass a request-only test; their analyzer controls remain unverified, and imported formatter/inherited constructor cases have committed corpus/golden fixtures.

Sibling-only, wrong binding, shadowing/mutation, swapped tuple, uninvoked oracle, diagnostic-only literal and no-op assertions remain unverified. Ready/Deep analysis is deterministic in the focused regression; that is analyzer test coverage, not a PR lifecycle transition.

Candidate head: bb9ed3ceaa341f185c1ac7d00b682349aec55cdf; tree: 33c1b831d3541634ac156c471482ea1263e2b323; authoring base: c96a7929f8c694eb62cff2dbe2ad7ee94beea815.

Conflict-free verification composition: main 43257ab95a483eabd9338bc5e5034d872cc0ee70 plus candidate head; local verification commit aa75d47b954395503c74ef0c353c425993c8fa23, tree 48fa7592b810f2377964b6c1588d289bd81eb92b. This verification commit does not change the published candidate branch.

Claim Boundary

This advances the analyzer prerequisite for the real full owner. It does not establish full live UB adoption: indirect serialized caller oracles, multi-receipt oracle evaluation and arbitrary Rust data flow remain outside this witness. The serial UB front remains #1306 before #1309. No UB sources, pins, suppressions, thresholds, public schema or support tier were changed. Do not close #1728 on this evidence.

Full nextest qualification is unestablished: the official prebuilt download returned HTTP 403; installation stopped. Cargo checks are separately reported and are not a nextest-equivalence claim. Connected GitHub required-status-policy lookup returned HTTP 403, Resource not accessible by integration; the administration endpoint remains stopped with no alternate route. Parent coordination owns required-check metadata and lifecycle. Hosted routed Rust qualification is unestablished; this PR remains Draft. Fresh independent exact-head review is requested from parent coordination.

Rollback / Traceability

Revert the bounded witness and its evidence changes together. Existing precursor behavior is retained. Spec 0093 maps the focused public/library tests, three production files and two honesty fixtures through .ripr/traceability.toml. No ADR or new spec ID is needed.

Support-tier / Policy / CI Impact

Support-tier impact: none. Policy exceptions: none. CI economics: n/a; no workflows, labels, branch protection, release or package boundaries changed. Golden artifacts are analyzer evidence only. No Ready, merge, release, deployment or adoption is requested.

@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 14, 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 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 69 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: d6d3ea87-aab9-4383-b660-c106c96906f7
📥 Commits

Reviewing files that changed from the base of the PR and between 8cee599 and 67d8291.

📒 Files selected for processing: 39
  • .ripr/traceability.toml
  • changelog.d/1728-real-terminal-tuple-flow.md
  • crates/ripr/src/analysis/classifier/evidence/tuple_match/derived_admission.rs
  • crates/ripr/src/analysis/classifier/evidence/tuple_match/derived_admission/terminal_flow.rs
  • crates/ripr/src/analysis/classifier/evidence/tuple_match_derived.rs
  • crates/ripr/tests/match_arm_tuple_derived_local.rs
  • docs/specs/RIPR-SPEC-0093-match-arm-blind-reach-downgrade.md
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • fixtures/match_arm_tuple_terminal_generated_constructor/SPEC.md
  • fixtures/match_arm_tuple_terminal_generated_constructor/diff.patch
  • fixtures/match_arm_tuple_terminal_generated_constructor/expected/CHANGELOG.md
  • fixtures/match_arm_tuple_terminal_generated_constructor/expected/check.json
  • fixtures/match_arm_tuple_terminal_generated_constructor/expected/human-full.txt
  • fixtures/match_arm_tuple_terminal_generated_constructor/expected/human.txt
  • fixtures/match_arm_tuple_terminal_generated_constructor/input/Cargo.toml
  • fixtures/match_arm_tuple_terminal_generated_constructor/input/src/lib.rs
  • fixtures/match_arm_tuple_terminal_generated_constructor/input/src/work_queue.rs
  • fixtures/match_arm_tuple_terminal_generated_constructor/input/tests/projection.rs
  • fixtures/match_arm_tuple_terminal_imported_formatter/SPEC.md
  • fixtures/match_arm_tuple_terminal_imported_formatter/diff.patch
  • fixtures/match_arm_tuple_terminal_imported_formatter/expected/CHANGELOG.md
  • fixtures/match_arm_tuple_terminal_imported_formatter/expected/check.json
  • fixtures/match_arm_tuple_terminal_imported_formatter/expected/human-full.txt
  • fixtures/match_arm_tuple_terminal_imported_formatter/expected/human.txt
  • fixtures/match_arm_tuple_terminal_imported_formatter/input/Cargo.toml
  • fixtures/match_arm_tuple_terminal_imported_formatter/input/formatter/Cargo.toml
  • fixtures/match_arm_tuple_terminal_imported_formatter/input/formatter/src/lib.rs
  • fixtures/match_arm_tuple_terminal_imported_formatter/input/src/lib.rs
  • fixtures/match_arm_tuple_terminal_imported_formatter/input/tests/projection.rs
  • fixtures/match_arm_tuple_terminal_inherited_constructor/SPEC.md
  • fixtures/match_arm_tuple_terminal_inherited_constructor/diff.patch
  • fixtures/match_arm_tuple_terminal_inherited_constructor/expected/CHANGELOG.md
  • fixtures/match_arm_tuple_terminal_inherited_constructor/expected/check.json
  • fixtures/match_arm_tuple_terminal_inherited_constructor/expected/human-full.txt
  • fixtures/match_arm_tuple_terminal_inherited_constructor/expected/human.txt
  • fixtures/match_arm_tuple_terminal_inherited_constructor/input/Cargo.toml
  • fixtures/match_arm_tuple_terminal_inherited_constructor/input/src/lib.rs
  • fixtures/match_arm_tuple_terminal_inherited_constructor/input/src/work_queue.rs
  • fixtures/match_arm_tuple_terminal_inherited_constructor/input/tests/projection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • PR body claims both Ready and Deep modes produce byte-identical changed_request_only_arm findings; this is asserted by real_terminal_projection_is_current_and_deterministic_in_ready_and_deep and would be a strong invariant to lock with an additional snapshot fixture if the project grows further terminal owners.
  • Bounded parsed-source grammar fixes token identity but does not evaluate runtime semantics; a non-parser-owned formatter or alias could still change observable behavior beyond what the discriminated arm captures. Mitigated by namespace checks and honesty fixtures; residual risk remains for unsupported Rust forms.

Verification questions

  • Confirm terminal_flow::owner_match short-circuits on any Use whose joined tokens are not exactly 'usecrate::;'; an import grouped as 'use crate::;use X;' (multi-statement) is refused even though 'use crate::*' alone would be valid - grammar is too strict but fail-closed.
  • Confirm dual counterfeit fixtures cover only macro_use extern crate and wildcard-glob import for the formatter case, and only a same-crate inherited Some for the constructor case; a function-or-trait 'Some' from a transitive workspace path or via 'use super::*' is not exercised.
  • Confirm ub-worker-handoff scope: this PR is a pure Rust static-analyzer addition; no JS runtime, no transferable, no postMessage, no SharedArrayBuffer, no async capture boundary is touched. Nothing for this lane to action. Residual risk for a human: confirm there is no JS/WASM crate being added in a sibling PR (#7828, #7817, #7809, #7804, #7778) that would change the handoff posture; that is outside this diff.

Refuted

  • Box::from(slice) or allocation-failure hazard from new map/vec constructions in terminal_flow.rs; refuted because: Lane owns RAII handling for BTreeMap/Vec/String in terminal_flow; all are plain safe Rust; no slice-to-Box conversion introduced; the prior PR did not introduce any unsafe code path that could surface an allocation-failure false-premise.
  • Box::from(slice) allocation failure does not return None; recoverable fallback claims are dropped.
  • The new terminal_projection_observes path captures BTreeMap inputs across a worker boundary and could observe torn writes or post-transfer aliasing; refuted because: projection_observes parses the test fn synchronously, owns the maps via let bindings in the same single-threaded analyzer process, and never crosses a JS boundary. No postMessage, no transferable, no SharedArrayBuffer.

Evidence gaps

  • Cargo-test receipt scheduled late; ripr sensor failed with exit 2; nextest installation returned HTTP 403.
  • 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.

REPAIR_REQUIRED — P1: macro-generated inherited Some bypasses terminal constructor provenance.

At exact head bb9ed3ceaa341f185c1ac7d00b682349aec55cdf, terminal_namespace_unambiguous scans macro authority only for format, then checks Some/Ok/None with source_declares_value_name. That declaration scan cannot see a function emitted by a macro. owner_match checks macro definitions in the owner's source file; the retained out-of-line owner has none.

I reproduced this by taking the committed inherited-constructor fixture and replacing only its crate-root written fn Some with:

macro_rules! generate_constructor {
    () => {
        fn Some<T>((receipt, _relation): (T, &'static str))
            -> Option<(T, &'static str)>
        {
            std::option::Option::Some((receipt, "request_identity_v2"))
        }
    };
}
generate_constructor!();

The full terminal owner remains in work_queue.rs with use crate::*: outer request derivation, receipt sorting, formatted reason and returned four-field tuple remain intact. The exact-head CLI reports candidate-current probe:src_work_queue.rs:match_arm:e2ddad8e as exposed (analysis complete; one exposed / one removed-side weak finding). A separate native copy changing only (true, false) to return "wrong_identity" compiles on Rust 1.95.0 and passes the actual terminal_projection_0 test, all four assertions, 1 selected / 0 ignored. The emitted constructor erases the arm result. This must remain unverified, just like the written-constructor fixture.

Please fail closed for opaque constructor-producing item expansions in this bounded witness, using the existing macro/provenance authority rather than attempting general expansion, and retain this compiling counterexample in the honesty corpus. Do not change the full consumer or weaken its oracle.

Exact identities and independent proof

  • Authoring base c96a7929f8c694eb62cff2dbe2ad7ee94beea815, tree 982e81d891b459affb4d09942496cd451fa6eebb; reviewed head bb9ed3ceaa341f185c1ac7d00b682349aec55cdf, tree 33c1b831d3541634ac156c471482ea1263e2b323.
  • Frozen consumer UB #1306 38b1b9faae5e2c35badb53deb22e7ec057bf0d5b; independently fetched owner blob 1ae5baef607bdf2d9c53fa6749956f6db38fd9c0 and contract-test blob 43b30019d91ec2867e6bb42805830cc242a8eaa1. The retained native owner matches after visibility/current-literal normalization; no parameter/collect-tail substitute.
  • Independent exact-head cargo test -p ripr --lib tuple_match: 23 passed; public match_arm_tuple_derived_local: 26 passed. Legacy #3769/#4043/#4068 boundaries inspected and their controls passed.
  • Full native owner: 5 positive cases; 10 compiling mutants fail assertions, including wrong request/receipt map, mutated requests, shadowed receipts, swapped Boolean/returned tuples, receipt sorting and request dedup. Counterfeit formatter/constructor, self-comparison and uninvoked-oracle controls demonstrate wrong-arm native passes and justify refusal.
  • Frozen main ad9dbb7a48a41a00b6a39e76198db2604e50a46a + candidate: local composition 9ed4bd4eb52960f84ed4227dc4beb5624484b724, tree 7160fc56fad1dc5ba9b3ef5e316ddbe92c7c2aca, parents main/candidate. 26 public tests and shared honesty pass. A reviewer-only test with seven additional binding/raw-identifier refusal cases passed; its patch was retained and the composition restored clean. These passing controls do not cover the generated-constructor defect above.
  • Exact-head goldens: 407 fixtures / 1,002 comparisons, red solely on owner_return_pin_fallible_literal; both new terminal fixtures match. Unchanged base independently reproduces the same three drift surfaces and byte-identical produced JSON. Canonical residual is open #7616, recorded owner Rust reach/propagation, no assignee. Its current diagnosis matters: the fixture-locked anyhow 1.0.100 was absent. After the existing CI prerequisite cargo fetch --locked --manifest-path fixtures/owner_return_pin_fallible_literal/input/Cargo.toml, the same frozen base and head executables, without rebuild, produce identical exposed JSON on fresh caches. Prepared full-base goldens pass. Preserve the original red receipts; this is a verified availability boundary, not a source-regression waiver.

Source receipts: production blobs 719a37da9e874b2426e7d1ebac49fb3d58abd3c3 / 35492733e5b4e5204d7d9e8a593b6aa4fce7c133 / c79f27414485621c0172d475b9412c149f1e325e; shared evidence.rs remains ece9f65cf9704033f335f87359a46abe0876a4f8. Frozen head executable SHA256 575746a8d44209b5935ddcc4239fed30299b5abd8143a2f8a3e35365e8e4e97b; generated-constructor analysis JSON 486f9bbbc6c5fa0190f2bd68df46900c1d718a883560ddd72fc189a4a49866cf; native wrong-arm log bbe2325c71dd2c5223be87bed53d7eec186b64e6d7f358b241e1eff0b21cfda9. Retained sources, binaries, patches and raw results: reviewer executor /workspace/review-proof-7836.

The other current review's determinism question is covered by the passing Ready/Deep public test; its blanket “all Use except crate wildcard” description is broader than the actual predicate, which also permits ordinary named imports. Its generic namespace concern now has the concrete P1 reproduction above. Bot quota/status success is not substantive clearance.

Disposition: REPAIR_REQUIRED. No author files or published refs changed. Hosted qualification, full nextest, indirect serialized caller admission and UB adoption remain unestablished. Stopped nextest-download and administration-policy actions were not retried. Keep Draft; do not close #1728 or advance lifecycle on this evidence.

EffortlessSteven commented Oct 14, 2026 •

Copy link
Copy Markdown
Member Author

Independent review follow-up: the P1 in exact-head COMMENT review is also reproduced through the actual public API on frozen-main composition 9ed4bd4eb52960f84ed4227dc4beb5624484b724, parents main ad9dbb7a48a41a00b6a39e76198db2604e50a46a / candidate bb9ed3ceaa341f185c1ac7d00b682349aec55cdf, tree 7160fc56fad1dc5ba9b3ef5e316ddbe92c7c2aca.

Reviewer-only reviewer_generated_constructor_cannot_certify_the_terminal_arm compiled and executed 1 selected / 0 ignored, then failed the intended class assertion: actual Exposed, expected WeaklyExposed. The discrimination stage falsely says the returned projection observes the unique arm literal, although the native compiling wrong-arm counterpart passes all four assertions because a macro emits the inherited counterfeit Some. This is an assertion red, not setup failure. Production blobs are unchanged; experimental test blob 0205b8657738f3e66e09b45da1707e0e7d63ee53 and patch SHA256 9b4815524f934631cd90f47f5bab3dd68faecd7164db964b31d34d0432d0a5e7 are retained on the reviewer executor. Failure-log SHA256 bbd57c9c1ef5a98ab1f1ac0ebbfd497f66aaec296a71e34247aa53eaeddb20f4. The composition was restored clean after the experiment.

The original 26 public tests, seven separate reviewer refusal cases and existing shared honesty corpus pass on this same composition. Their green results do not negate the new counterexample. No author edit, Ready, merge, pin or gate change was made. Disposition remains REPAIR_REQUIRED.

EffortlessSteven commented Oct 14, 2026 •

Copy link
Copy Markdown
Member Author

CANDIDATE_REPAIRED — parent fresh exact-head review required.

Owner / governing claim: sole maintenance writer for #7836 / ripr#1728. Repair stays on fix/1728-terminal-derived-flow; original author is archived, prior reviewer finished. Parent owns lifecycle and review-thread resolution.

Published exact object

  • Head aee66a963db165f4153d92134250bd13a7b00e1e
  • Tree d627d453838d3852562bbf02e9ff1376ced0a102
  • Parent reviewed head bb9ed3ceaa341f185c1ac7d00b682349aec55cdf
  • Authoring base c96a7929f8c694eb62cff2dbe2ad7ee94beea815
  • Ordinary fast-forward push completed; connected GitHub independently confirms this head/tree, open Draft state. Both source worktrees are clean.

Finding disposition
The P1 review is valid, reproduced and repaired. Before production repair, the permanent public test executes and fails the intended assertion: actual Exposed, expected WeaklyExposed (1 selected / 0 ignored). Its native generated-constructor wrong-arm counterpart compiles under Rust 1.95.0 and passes all four assertions, 1 selected / 0 ignored, including a rerun of the frozen executable. The returned relation was erased by inherited Some.

The owning admission layer now reuses the shared statement/expression macro boundary to refuse opaque item-producing expansions; indexed binding authority covers its permitted standard statement macros. Ordinary constructors and confined expression expansions keep useful paths. Full terminal owner grammar, sorting, maps, returned tuple and source identity are retained. The new public regression, two boundary tests and rust_terminal_generated_constructor_no_promotion honesty fixture make this permanent. New fixture owner/diff/oracle bytes match the written-constructor control. No consumer rewrite, shared evidence.rs, pin, threshold, schema, suppression or existing golden change. Spec/traceability and the existing canonical changelog fragment are updated. The review thread remains unresolved for parent disposition after fresh review.

Completed proof

  • Candidate: 25 library / 27 public (all original 23/26 controls plus regressions), 5 native positive cases, 11 compiling mutants failing assertions: wrong arm/proof map/receipt map, mutated requests, shadowed receipts, swapped Boolean/output tuples, unsorted receipts, omitted projection, missing request dedup, diagnostic-only reason.
  • Candidate workspace/all-target compile, shared honesty, policy-all, dogfood, precommit, check-fast 15 gates / 39 independently selected paths including strict Clippy: pass.
  • Prepared candidate goldens and fixtures: 408 fixtures / 1,005 comparisons, pass.
  • Frozen current-main composition: main 477d1f79d4934e8253446d42c63b8651b310ed82 + candidate; local commit 6511f787db89e9944096f08b776e19bfb4915c82, tree 90e5131ccda4389f36533cedf5d0bf05fba8f4d6, parents main/candidate. 25 library / 27 public, honesty, all 15 check-fast gates (strict Clippy), full goldens and fixtures pass; 414 fixtures / 1,022 golden comparisons.

Preserved contrary receipts and environment
Unprepared goldens/fixtures red solely on #7616 is retained. Locked preparation downloaded absent anyhow 1.0.100. The same frozen CLI, without rebuild and with fresh caches, changes owner-pin weakly_exposed to exposed; unchanged SHA256 b8ca3c42dc88829433227fa75ff0099da5aeffce1d5737ac9bb97c80ec4bb567. No blessing or failure waiver. Behind-only doctor red is also retained; root instructions permit the separate composition without restacking.

The first composition aggregate was deliberately terminated at the reserved storage floor (driver 143, not a pass). After a disconnection notice, a successful fresh shell check verified persisted source and only exited zombie entries. All consumers had ended before 54 newly generated disposable compiler sessions were released; preloaded sessions and required witnesses stayed intact. Resumed remaining checks with CARGO_INCREMENTAL=0 completed successfully. Their original partial receipt remains preserved. Final process check: no active validation; four exited zombie entries belong to host init. Free space restored above reserve. No in-progress command was duplicated.

GitHub's observed simulated merge is separately e0767f15de3833e882324947156ad281c45779a5, tree 1fd50cdbad3fd1b6f8a70344784754e3d1ae2eb3, parents later main 43e030656efdcedc3e8d8b507d59ce5a39253b6d / candidate. This object has not been executed/qualified here. Native inspection of the four-commit later-main delta finds no classifier, Cargo manifest/lock or toolchain change; it changes output rendering/workflows/unrelated corpus evidence. Frozen proof stays bound to 477d1f7.

Raw sources, logs, report copies, frozen candidate/integration CLI and native false-pass executable are retained on this executor at /workspace/proof-7836-repair. Evidence manifest SHA256 14c68f8d20f097763d93718d8dd90594b88533eee53ec847e7a5d2f5aaf93888. The clean exact composition checkout is retained at /workspace/7836-integration for the next consumer. No unique source/failure witness deleted.

Next: parent assigns fresh independent review of aee66a9… / d627d453…, then handles review-thread/lifecycle and hosted qualification. Historical denied release/nextest downloads and administration reads were not retried. Full nextest/hosted qualification, indirect serialized caller admission, UB adoption and release/deployment remain unestablished. Keep Draft and #1728 open.

@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, 2026-10-14 UTC: REPAIR_REQUIRED at published head bb9ed3ceaa341f185c1ac7d00b682349aec55cdf, tree 33c1b831d3541634ac156c471482ea1263e2b323. This independently corroborates the existing generated-constructor P1; no duplicate inline finding or competing repair is added.

Blocking source finding. The unresolved generated-Some thread/review remains applicable. In derived_admission.rs::terminal_namespace_unambiguous, the macro scan establishes formatter binding, while source_declares_value_name sees parsed declarations rather than the fn Some inside a macro token tree. A crate-root generate_constructor!() can emit the inherited constructor used by the otherwise exact out-of-line owner. Its replacement relation constant disconnects the selected arm from the returned reason.

I independently built and ran the retained full owner with the pinned compiler rustc 1.95.0 (59807616e 2026-04-14), using only dependency-free native controls in a review-owned location:

  • Ordinary owner and the four request/task identity combinations: each passes its four-field oracle (4 distinct positive runs, 1 selected / 0 ignored each).
  • Ordinary owner with only (true, false) changed to "wrong_identity": compiles, then fails the reason assertion, exit 101.
  • Macro-generated inherited Some, unchanged and wrong-arm versions: both compile and pass all four assertions, exit 0, 1 selected / 0 ignored each.
  • Generated constructor with wrong proof lookup get(plan_status): compiles, then fails status (not_executed versus head_passed), exit 101. The oracle still detects a different wrong input route.

The wrong-arm constructor experiment preserves outer request derivation, sorting/dedup, receipt filtering/sorting, standard formatter and returned four-field tuple. It is an admitted native semantic counterexample to result observation, not a helper-only replacement. Its source SHA256 is a7d4d7061a7931e33473042e931543ead676a8239a4c37e6f776d6b2afed1747; binary SHA256 06b9941d70ab0df5a9bb30cd391b947d7e060b90a1ef71cc601cdc46630e3384. The existing public-API assertion red supplies the separately published analyzer false-promotion receipt; I did not relabel it as a new local analyzer execution.

Inspection scope and ownership. Read all three production changes, the actual dispatcher and stage-combiner consumers, parser-owned macro/value-name authority, focused public test stimuli/oracles, spec 0093, traceability, honesty entries and both namespace fixtures' JSON/human expectations. Independently fetched the complete frozen UB owner at 38b1b9faae5e2c35badb53deb22e7ec057bf0d5b, blob 1ae5baef607bdf2d9c53fa6749956f6db38fd9c0; the projection grammar retains the real owner shape. No schema, support-tier, release or workflow change is in this diff. Existing written constructor and formatter negatives do not cover generated constructors. The sole-writer checkpoint reports unpublished repair aee66a963db165f4153d92134250bd13a7b00e1e; reported repair proof does not clear this published head. Keep repair and its regression with that writer and canonical ripr#1728.

Integration and CI identities. Authoring merge base is c96a7929f8c694eb62cff2dbe2ad7ee94beea815. Direct main ref observed 78312b335cdb1558372aded3a4911073052753a9; git merge-tree --write-tree <main> <head> exits 0 with composition tree 7ebcf7132dd810d9afc869bdad3b949e9a61f6c4. This establishes no textual conflict at that basis, not executable combined-tree qualification. PR base metadata still names ff4a2fcd... and is not current-main proof.

I inspected the actual Rust-only job log. It checked out integration commit 4357fb4435b6c8c50410005d24e13cb6c3e05227, merging this head into ff4a2fcd6fac21a93b8fb04f1b0befc80311a601; ran locked fixture dependency preparation and cargo test -p ripr --locked --no-default-features --features lang-rust --no-fail-fast. The focused public target executed 26 passed / 0 failed / 0 ignored, including Ready/Deep determinism and namespace controls. This green restricted-feature lane does not refute the generated-constructor gap or qualify advancing main/default-feature nextest.

Stage-specific disposition. Source: repair required at this head. Integration: no textual conflict on the observed basis; execution proof missing for that fresh tree. Local proof: bounded native controls executed; no current qualified analyzer artifact was available in this executor, so no redundant product build or fresh analyzer/full-nextest claim. Hosted protected qualification: routed-rust.yml creates Ripr Rust Small Result on ready_for_review; its absence in Draft is expected later-stage evidence, not a requirement to obtain before the transition that generates it. The source P1 remains the present admission blocker. Parent owns any Ready/protected merge transition and thread disposition after published repair review.

No new defect beyond the already tracked P1 was verified. Do not close #1728 or claim indirect serialized caller adoption. Historical denied downloads/administration-policy actions were not retried; no CI dispatched or cancelled. Perl #17479 publication, #17573 integration and paused #17623/#17655 experiments remain untouched.

Raw native sources, selected binaries, build/run logs, SHA256 receipts, reviewed diff/source snapshots, CI excerpt and integration receipt are retained on this executor at /workspace/review-evidence-7836 (about 55 MiB; no mutable Cargo target use). Shared checkout and candidate bytes were preserved. The isolated review worktree is released after publication; retained witnesses remain available for an affected-delta review.

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • No transferable/shared/GC/detach surface in this Rust analyzer diff; lane is structurally inapplicable.
  • No new inputs cross trust boundaries (no FFI, unsafe, env, secret material). Spec authoring path remains bounded textual admission; no data exfiltration or DoS surface introduced.

Verification questions

  • Confirm projection_observes enforces immutable bindings (let receipts/proof_request_ids/receipt_request_ids/terminal) and refuses mutation/shadowing/writes so a shared executor cannot observe torn writes; this is the only async-adjacent property in scope.
  • Confirm that owner_match short-circuits on any ast::Use whose joined tokens are not exactly usecrate::*;. A multi-statement grouped use crate::*;use X; (with whitespace use crate::*) would be token-mismatched against the canonical exact string usecrate::*;, which is fail-closed strict. This is fine for worker/async correctness (no shared state, parser-owned) but flag the grammar may be too strict to admit otherwise real owners. (crates/ripr/src/analysis/classifier/evidence/tuple_match/derived_admission/terminal_flow.rs:125).

Refuted

  • A resizable-buffer or detached ArrayBuffer view could let a counterfeit relation survive the masked-body token comparison.; refuted because: Active-view concerns presuppose mutable backing storage with detach/transfer. terminal_flow.rs builds one owned String via to_string() on immutable SyntaxTokens and compares Vec<(SyntaxKind, String)> slices; there is no buffer to resize, transfer, or observe as stale.
  • The new parser-owned match-arm grammar might share SyntaxNode arenas across worker tasks causing lifetime/detach unsoundness.; refuted because: Parsing uses local parse_clean_source_file returning owned ra_ap_syntax::SyntaxNode per call with no arena sharing; crate-wide scan is sequential per-file; no SharedArrayBuffer/transferable equivalent exists in Rust analyzer.
  • Native four-field oracle cannot distinguish a compiling wrong-arm mutant that returns the relation constant from the real arm; refuted because: Not a public PR claim; PR body explicitly leaves the public-API discrimination regression for imported-format/inherited/generated constructors to the negative fixtures, which now pin those at weakly_exposed. Native wrong-arm is a research artifact, not a test oracle assertion.
  • The bounded parsed-source terminal grammar must be evaluated at runtime rather than AST-shape to detect malicious macros; refuted because: Reject: the producer explicitly chose fail-closed AST admission for a frozen public-API consumer; the new constructor_expansions_unambiguous + fixtures collectively refuse item-producing/statement macros and the inherited/generated Some scenarios retain weakly_exposed rather than admit.
  • The bounded parser-only grammar is unsafe in real codebases because arbitrary Rust data flow, indirect serialized caller oracles, and multi-receipt oracle evaluation remain unsupported.; refuted because: PR body, SPEC-0093, and changelog explicitly disclaim those cases and retain the indirect serialized caller oracle under separate #1728 acceptance. No claim is made that this advances full live UB adoption.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • Three honesty corpus entries plus owning-library tests enforce no promotion to exposed for counterfeit formatter / inherited Some / generated Some vectors; reviewers should still hand-verify the fixture goldens match the retained receipts.

@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 exact-head repair review, 2026-10-14 UTC: source repair verified; overall REVIEW_INCOMPLETE for merge qualification at aee66a963db165f4153d92134250bd13a7b00e1e, tree d627d453838d3852562bbf02e9ff1376ced0a102, authoring base c96a7929f8c694eb62cff2dbe2ad7ee94beea815. No new blocking source or oracle defect found in this bounded contract. This is a COMMENT review; lifecycle and thread resolution remain parent-owned.

Prior P1 disposition. I independently reproduced review 5512408063 on old head bb9ed3ceaa341f185c1ac7d00b682349aec55cdf by adding only the permanent new public regression in a review-owned checkout. It compiled and executed 1 selected / 0 ignored, then failed the intended class assertion: actual Exposed, expected WeaklyExposed. The old frozen CLI also reports the generated-constructor current arm exposed. Separately, the macro-generated inherited Some wrong-arm native specimen compiles and passes all four fixture assertions, 1 selected / 0 ignored. This remains the semantic counterexample; passing tests alone could not clear it.

The repaired admission owner now checks opaque constructor-producing macro calls using the shared parser-owned statement boundary, and checks binding authority for every permitted standard macro. The public regression, boundary tests, generated-constructor fixture and independent honesty charter pin the refusal. New fixture owner/diff/four-field oracle bytes are identical to the written-constructor control. Existing expected files, shared evidence.rs, consumer source, dependency pins, thresholds, schema and support tier are unchanged by the repair. The prior P1 is repaired in source, subject to parent thread disposition; I did not resolve its thread.

Independent execution and semantic inspection. Exact repaired head: 25 library / 27 public tests pass, zero failed/ignored. Ordinary Option constructors, confined expression macros, actual crate wildcard and real terminal projection retain exposure. Ambiguous/duplicate maps, swapped/wrong bindings, mutation, shadowing, sibling-only inputs, counterfeit local/imported formatters, written/generated constructors, no-op/diagnostic-only/uninvoked/conditional/post-return observations refuse. Ready/Deep determinism also passes.

Native Rust 1.95.0: 5 positive cases pass; 11 mutants compile and fail assertions (wrong arm, proof/receipt lookup, cleared requests, shadowed receipts, swapped Boolean/output tuples, missing receipt sorting, omitted receipt projection, missing request dedup, diagnostic-only reason). I independently fetched the complete UB #1306 tree at 38b1b9faae5e2c35badb53deb22e7ec057bf0d5b, verified terminal owner blob 1ae5baef607bdf2d9c53fa6749956f6db38fd9c0 and contract-test blob 43b30019d91ec2867e6bb42805830cc242a8eaa1, and compared the full retained owner after only visibility/current-literal normalization. The witness follows outer proof lookup, sort/dedup, borrowed set, receipt intersection, arm, sorted matching, formatted reason and returned four-field tuple. The actual caller/serialized row tests remain a distinct unsupported acceptance boundary.

Inspected all three production changes, dispatcher/admission/discriminator wiring and stage-combiner consumer, shared macro/value-name authority, full public stimuli/oracles, spec 0093, traceability, changelog and all three namespace fixtures/charter rows. Their CLI JSON matches committed goldens under the repository's existing normalization of canonical_next_action; candidate-current and removed-side findings remain weakly_exposed. Candidate and composition shared honesty checks pass. No concurrency/FFI/unsafe/JS transport or publication mechanism is introduced.

Integration identities and later-main applicability. Recomputed the author-frozen merge tree from main 477d1f79d4934e8253446d42c63b8651b310ed82 plus repair head: 90e5131ccda4389f36533cedf5d0bf05fba8f4d6, matching the handoff. The local-only author commit 6511f787db89e9944096f08b776e19bfb4915c82 and raw author logs are absent in this fresh executor (connected GitHub returns 404 for that local object). Thus its exact commit metadata and reported 15-gate/414-fixture/1,022-comparison executions remain attributed to the repair handoff, not relabeled as my executions.

Live main observed b81496ae2127e62c15b92472e92e2409ece4b86a is seven commits beyond the frozen basis. Beyond the handoff's four-commit inspection, #7757 changes disclosure probes/loader and #7804 changes propagation subjects, shared classifier/context/pipeline; #7841 changes calibration output. I inspected those relevant source deltas: no terminal-witness, Cargo manifest/lock or toolchain change. The propagation downgrade is conditional on a retained closing-only ? origin, not ordinary match-arm evidence. Inspection alone does not qualify those changes.

I created a separate reviewer composition 05c27c1e4db145188780257a9a57f4160b4ffa2f, tree 856674cab34b17e217116acafd4fd8d02e1c77c5, parents b81496ae2127e62c15b92472e92e2409ece4b86a / aee66a963db165f4153d92134250bd13a7b00e1e. It has no textual conflicts; the three candidate production blobs are identical. Fresh composition execution passes 25 library / 27 public, shared honesty, all three normalized namespace fixture JSON comparisons, and all 15 check-fast gates / 39 independently selected paths, including strict workspace/all-target Clippy. This is bounded local integration proof for that exact subject.

GitHub's separately observed merge ref remains e0767f15de3833e882324947156ad281c45779a5, tree 1fd50cdbad3fd1b6f8a70344784754e3d1ae2eb3, parents 43e030656efdcedc3e8d8b507d59ce5a39253b6d / repaired head. I inspected the actual Rust-only job log: it checked out this object, prepared locked fixture dependencies, ran cargo test -p ripr --locked --no-default-features --features lang-rust --no-fail-fast, and the focused target executed 27 passed / 0 failed / 0 ignored. This restricted-feature hosted result is distinct from my later-main composition and required default-feature/nextest qualification.

Stage-specific handback. Source/oracle: prior P1 repaired, no new defect found. Pre-Ready: parent reconciles the live merge subject and relevant combined-tree evidence, dispositions the existing substantive thread, and refreshes any materially affected prerequisite. Behind-only state does not require restacking. The Ready-triggered Ripr Rust Small Result is absent in Draft as expected; that later-stage absence is not itself a pre-Ready source blocker. Hosted protected/full-nextest merge qualification and actual admitted checkout remain unestablished here. No denied historical nextest/release download or administration read was retried, and no CI was dispatched/cancelled.

The owner-pin availability issue #7616 remains separate: locked preparation downloaded absent anyhow 1.0.100; the unchanged frozen candidate CLI with Cargo/toolchain available produces exposed on a fresh fixture copy. No expectation was blessed. Initial missing configured temporary directory setup failures are retained separately from the successful rerun and meaningful old-head assertion red.

Do not infer indirect serialized caller admission, multiple-receipt oracle evaluation, UB adoption, release acceptance or #1728 closure. No author files, published refs, lifecycle or threads were changed. Durable sources, binaries, patches, raw results and digests are retained at /workspace/review-proof-7836-fresh for parent consumption.

Evidence manifest SHA256: 68e104393466edfb8af5f33cd8b22bc128335e65240ecc0ca46a10b63d533ea6. All review command drivers have terminal exits; review-owned checkouts are released, original checkout is clean, and no active validation remains.

Copy link
Copy Markdown
Member Author

Merged origin/main (traceability.toml conflict only; kept main's entries). Head 85e40a903.

  • Focused: cargo test -p ripr --test match_arm_tuple_derived_local 27 passed; cargo test -p ripr --lib derived_admission 19 passed.
  • cargo xtask fixtures: not runnable here (needs goldens prepare cache/network). precommit pending/not completed locally (shared host contention, disk-full incidents). Rely on hosted CI.
  • Independent review of production diff raised leads NOT yet verified/addressed: (1) admission path calls terminal_projection_observes with selected = None, so test inputs may not be tied to the probed arm (possible wrong exposed signal); (2) constructor_expansions_unambiguous refuses any non-listed statement macro (e.g. println!) anywhere in the workspace, silently disabling the projection; (3) per-probe repeated whole-workspace parsing; (4) shadow guard misses struct Some/type aliases. Author should triage (1) before merge.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 07:20

@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 inapplicable: no transferable/shared memory, ArrayBuffer/TypedArray, detach, resize, or active-view surface in this Rust analyzer diff. Static parsed-source contracts only.
  • Worker-handoff lane is structurally inapplicable: this is a Rust analyzer PR with no JS, Worker, async-runtime, Transferable, GC, or detach surface in the changed Rust source, tests, or fixtures. No torn-write, transferable-leak, or shared-state observation is reachable.

Verification questions

  • Confirm ripr sensor returned exit code 2 in the packet (mentioned in sensor table); receipt at sensors/ripr/ may explain but is not material to the red/green claim since the public API test and the three fixture goldens independently prove behavior.
  • Confirm public regression discriminates macro-generated inherited Some via namespace scan + per-file macro expansion gate; counterfeit token tree compiled and (exposed, weakly_exposed) diverges across the two adversarial cases.
  • Confirm grammar too strict for grouped use crate::*; use std::*; or brace-grouped glob imports. Spec text and parent docstring justify this as intentional fail-closed, but a real owner using grouped imports would be refused despite being unambiguous. This is a residual coverage gap, not a correctness bug. Same item surfaced in prior review-thread verification questions.
  • Confirm real_terminal_projection_is_current_and_deep_determinism assertion relies on probe id + serialized finding equality; if a future head changes addition order it would not detect semantic drift. Lock with a snapshot diff on top_gap.canonical_gap as future-proofing.
  • Confirm constructor_expansions_unambiguous filters ast::MacroCall whose path text is in TERMINAL_STANDARD_MACROS and parent is MacroExpr; an attribute macro #[some_attr] whose Meta resolves to a token stream emitting fn Some is never visited because derives are Attr nodes, not MacroCall. A proc-macro derive that emits the inherited constructor would bypass both constructor_expansions_unambiguous and source_declares_value_name (parser does not see derive output).

Refuted

  • Allocation failure inside the parser-owned BTreeMap::from literal could return None and silently leak a partial map to a later worker, hiding the counterfeit formatter.; refuted because: low.
  • Terminal grammar should have been a new top-level module sibling to derived_admission rather than a private submodule; refuted because: A sibling module would duplicate the ProbeContext/index wiring and the shared parsed/named_function/immutable_binding_name/has_exact_parameter/assertion_operands/direct_name/plain_string helpers already defined in derived_admission.rs. The private mod terminal_flow; keeps imports local, leaves derived_admission's pub(super) surface unchanged and avoids editing shared classifier/evidence.rs.
  • An attribute/derive proc-macro #[derive(GenerateSome)] or #[some_attr] could emit an inherited fn Some and bypass both constructor_expansions_unambiguous (filters MacroCall only) and source_declares_value_name (parser never sees derive expansion). Such a derive would reintroduce the P1 from review #5512408063 on the terminal namespace witness.; refuted because: Indexed workspace completion also requires the proc-macro crate to be in the index; that file would be a third-party target/ build artifact typically excluded by workspace_complete. If user-authored and indexed, the new value_name scan still does not see derive output, but the parent docstring and RIPR-SPEC-0093 §4 'Opaque item/statement expansions anywhere in the indexed namespace also refuse' explicitly accept this limitation; existing indexed macro candidates + formatter scan already cover the standard library paths, and derives are an out-of-spec scenario on purpose. Risk is bounded by fail-closed posture; not a regression.

Evidence gaps

  • in_flight cargo-test receipt absent and ripr sensor exit=2 — fixture goldens not rerun on this exact head; static text identical to base+pr body but standalone rebuild unverified.
  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 07:44
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 07:44
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 11:08

@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

  • No JS, no WASM, no shared-memory, transferable, or resize/detach surface exists in this analyzer PR; the lane's required checks (active view vs whole backing store, resize/detach/transfer, stale length snapshots) have no Rust construct to bind to in this diff.
  • Bounded parsed-source contract cannot reason about runtime semantics of macro expansions that originate outside the indexed source (procedural macros, build-script generated code). A real consumer could carry a constructor authority via a proc-macro token tree that does not appear as a MacroCall/AstNode in the file facts. The fail-closed stance mitigates but does not eliminate this residual.
  • Cargo.toml fixtures use edition = "2024" inline but workspace resolver/target compatibility is unverified; build leases skipped in this packet.

Verification questions

  • Confirm terminal_flow::owner_match uses checked_sub on a u32 text-range subtraction; negative offsets would silently saturate to 0 on earlier versions but panic on overflow in debug. Body text-range start is taken from the actual function body, so for the terminalize_proof spec this is always valid; not a real concern, but the from..to slicing assumes the match sits entirely inside the body.
  • Confirm terminal_namespace_unambiguous combines indexed macro candidates AND macro_binding_scan, then the per-file macro_call_is_statement filter for opaque item/statement expansions; the grammar bound is fail-closed on grouped/brace-globbed use crate::*; use X;.

Refuted

  • constructor_expansions_unambiguous uses macro_call_is_statement which, per the seeded review thread, may silently disable projection when any non-listed statement macro (e.g. println!) appears anywhere in the indexed workspace.; refuted because: The check only refuses when the macro call is a statement AND its parent is not a MacroExpr — expression-position macro calls pass through. standard print/println! macros expand to expression-position calls in Rust, and tests confirm ordinary_constructors_and_confined_expression_expansions_keep_authority includes a vec![1] / assert_eq! / expression!() set. Global disablement is therefore false; only item-producing statement macros refuse, which is exactly the targeted surface.
  • An opaque item/statement macro expansion could mint a custom Drop or &'static buffer that the parser cannot see, leaking lifetime or aliasing UB into the admitted owner.; refuted because: Rust macro hygiene is name-scoped, not lifetime-scoped; emitted items inherit caller lexical lifetimes. terminal_namespace_unambiguous refuses the admission entirely on opaque expansions (constructor_expansions_unambiguous), so even if the hypothetical lifetime hazard existed, this witness withholds admission rather than asserting safety. No actual lifetime hazard reaches the grammar's analyzed code.
  • Worker-handoff lane is structurally inapplicable: this PR is a bounded Rust static-analysis extension with no JS, Worker, transferable, GC, async-runtime, or detach surface in changed source, tests, or fixtures. The only mutable scratchpad is a local BTreeMap seeded by parse output.
  • Box::from(slice) allocation failure does not return None; recoverable fallback claims are dropped.
  • Lane scope is resizable buffer / ArrayBuffer / TypedArray / detach / transfer; the PR is a Rust static-analyzer change and touches none of those. Spec + traceability updates are textual.
  • A crate-root proc-macro could emit an inherited Some to bypass constructor_expansions_unambiguous and falsely expose the request-only arm.; refuted because: constructor_expansions_unambiguous only inspects parser-visible MacroCall nodes; proc-macro output is not a MacroCall in source AST, but the inherited/generated/imported-formatter fixtures all reject via TERMINAL_STANDARD_MACROS authority + format binding scan + source_declares_value_name, and the grammar is intentionally fail-closed (weaker-but-safer). Any unrepresented procedural expansion would simply fail admission, not falsely certify.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 12:07
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 12:07
@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

  • owner_match refuses any Use whose joined tokens differ from the literal 'usecrate::;' string; multi-statement grouped 'use crate::; use std::*;' or brace-grouped glob imports are fail-closed strict. This was raised in prior review threads and remains intentionally strict per spec; flagged for parent attention as legit owners using grouped imports would be refused.
  • Lane is structurally inapplicable to this Rust analyzer PR; no transferable/shared/detach/resize/GC surface exists in source, tests, or fixtures. No worker-handoff issue to report.
  • terminal_projection_observes requires exact token-equality of the masked body against the canonical TERMINAL_BODY constant. Any unrelated whitespace change inside the frozen consumer (e.g. alignment in receipts.iter().filter_map closure) will silently break the discriminated arm but no snapshot test pins the canonical body. Consider one fixture that captures the verbatim canonical TERMINAL_BODY sha256.

Verification questions

  • Confirm the three new honesty fixtures (imported_formatter, generated_constructor, inherited_constructor) all share an identical 461-line check.json with byte-distinct only the file path and probe IDs. They all expect finding.class='weakly_exposed' and observation_unverified for the same (true,false)=>arm, which matches the spec's stated behavior. Honest case where the same byte-pattern justifies failure as the discriminator unconfirmed.
  • Confirm constructor_expansions_unambiguous refuses ALL macro_call_is_statement nodes globally regardless of path scope or visibility; a project-wide inert std::println! would silently disable the bounded terminal projection everywhere.
  • Confirm crates/ripr/src/analysis/classifier/evidence/tuple_match/derived_admission.rs:53 — terminal_namespace_unambiguous short-circuits on '!facts.source.contains(name)' before source_declares_value_name. A doc-comment or string literal mentioning 'Some' (e.g. '// use Some as...' or format string '${Some}') in any file would falsely revoke terminal admission of an otherwise legitimate terminalize_proof owner. Recommend gating on the AST presence of the declaration rather than textual contains: hoist the contains check inside source_declares_value_name or accept matches in non-binding contexts.
  • Confirm per-probe whole-workspace parsing inside terminal_namespace_unambiguous (loops context.index.files().values()) and per-call macro_binding_scan repeats are not memoized; not a sibling-path concern, but worth noting that the diff increases parse cost without shared caching and may surface as flaky under heavy witness runs.
  • Confirm owner_match rejects any ast::Use whose joined tokens equal usecrate::*; exactly but allows path joins that skip the wildcard; a real consumer using use crate::{terminalize_proof, ProofReceipt}; or grouped braces cannot bind under this grammar.
  • Confirm grouped-glob use crate::*; use std::*; is fail-closed refused per owner_match strict token equality; spec accepts this as intentional.

Evidence gaps

  • Build leases (cargo-check/clippy/fmt/test) were skipped in this packet; per fixture Cargo.toml uses edition=2024 but workspace resolver/target compatibility is unverified here.
  • The PR body and fixtures all assert crashers stay in check-policy-all, evidence-promotion-honesty, and full goldens. cargo-test is receipt-absent and ripr sensor failed exit 2 (per packet). Without hosted CI confirmation, the byte-identical check.json claim across three fixtures is unverifiable from this lane.
  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 13:22
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 13:22
@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

  • The PR is a static analyzer grammar plus fixtures; it introduces no new trust boundary, FFI, unsafe surface, env/secret read, or external IO. ripr sensor exited 2 but its failure does not change the public-API regression or the four-field oracle behavior. No security-relevant blocker introduced by this diff.
  • Lane is structurally inapplicable to this Rust analyzer PR; no active-view, ArrayBuffer/TypedArray, detach/transfer/resize, or stale-length surface exists in the diff to bind a check to.
  • Lane has no applicable surface; declaring inapplicability rather than producing speculative lifetime commentary. Spec 0093 already pins the parser-owned contract.
  • The check.json/human.txt/Human-full.txt goldens for the three new terminal fixtures are byte-identical except for file paths and probe ids; no structural assertion independently verifies that the producer output matches the repaired terminal_flow::owner_match grammar for the inherited-constructor variant.
  • Lane ub-worker-handoff is structurally inapplicable to this Rust analyzer PR. No JS, WASM, async runtime, Transferable, GC, or detach surface exists in source, tests, or fixtures. Parser-owned contracts only.
  • Specific tier escape: an out-of-tree proc-macro that emits a Some/Ok/None value-constructor through a wrapper type (e.g. Option::Some qualified, or tuple-struct Some(value) constructor) is not in the indexed factset for source_declares_value_name. Spec text in PR body acknowledges this residual as fail-closed; not material to this PR but flagged for human review given unbounded Rust ecosystem.

Verification questions

  • Confirm fixture crates run as workspace members; cargo xtask fixtures invokes cargo check on each, but the imported_formatter input Cargo.toml keeps edition=2024 inline and the generated_constructor/inherited_constructor input Cargo.toml lacks [workspace] context consistent with the package name (re-uses the work_queue name). Build leases are skipped in this packet so compilation evidence is not material here.
  • Confirm terminal_projection_observes requires exact token-equality of the masked body against canonical TERMINAL_BODY; unrelated whitespace changes inside the frozen consumer (e.g., receipts.iter().filter_map alignment) would silently break the discriminated arm without a pinning fixture.
  • Confirm siblings of constructor_expansions_unambiguous: proc-macro / build-script generated code and macro 2.0 (macro_rules! inside fn body) are NOT covered; constructor_expansion_tests covers macro_rules at crate/module/function scope, but a proc-macro produced fn Some would still be invisible to the parser - fail-closed stance so user risk is over-refusal not under-refusal.

Refuted

  • A native wrong-arm mutant running concurrently with the bounded parsed-source witness could observe a torn write through shared mutable map state and bypass the immutable_binding guard.; refuted because: The analyzer is single-threaded synchronous Rust. terminal_projection_observes only reads from locally constructed BTreeMap values inside a single function body. immutable_binding_name refuses let-mut bindings; checked_sub cannot underflow because the parent gate guarantees body.start() <= match.start(). No concurrent executor observes this state.
  • No JS, WASM, transferable, resize, detach, or active-view surface exists in this Rust analyzer diff. Lane is structurally inapplicable; parsed-source contracts cannot bind to ArrayBuffer/TypedArray semantics.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 14:55
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 14:55
@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

  • fixtures/match_arm_tuple_terminal_generated_constructor/SPEC.md:13 — The 'Must Not' contract of this fixture forbids crediting 'the literal erased by a generated constructor', but the corresponding check.json binding is byte-identical to the written-constructor fixture (only file path and probe id differ). Add an explicit sha256 of the canonical TERMINAL_BODY from terminal_flow.rs and an assertion that the producer output's canonical_gap is unchanged when the source module swaps fn Some { ... } for macro_rules! generate_constructor!{ () => { fn Some<...>{...} } };. Otherwise a future grammar-edit could pass both fixtures simultaneously without anyone noticing it failed to discriminate.
  • Lane inapplicable: this is a static Rust analyzer PR; no JS, WASM, Worker, async runtime, Transferable, SharedArrayBuffer, GC, detach, or resize surface exists in source, tests, or fixtures.
  • owner_match builds a masked source by concatenating string slices via byte offsets (lines ~140-150) and compares tokens() against the canonical body. If a future legitimate edit changes only whitespace/comments inside the frozen body, the test will silently downgrade behavior to None rather than pin canonical body via a fixture sha256 — degraded oracle, no concrete behavior break today.
  • Grammar strictness: terminal_flow::owner_match refuses any ast::Use whose joined tokens are not exactly the string "usecrate::*;". Multi-statement grouped use crate::*; use std::*; or brace-grouped glob imports are fail-closed strict. Real owners using grouped imports would be refused at the namespace boundary. Intentionally documented in spec 0093 and prior review threads as fail-closed posture; flagged as residual risk for parent attention.
  • Lane could not execute cargo test or cargo nextest against the published head in this run; the head's 25 library / 27 public tests, honesty, and 15 check-fast gates plus the four public non-promotion regressions were verified only via the candidate claim and the prior independent reviewer reproduction (1 selected / 0 ignored for inherited counterexample; natives 5 pass / 11 compiling mutants fail). No additional public comment is added beyond the two candidate findings, since the P1 grammar repair is well-corroborated by both seeded thread and fixtures.

Verification questions

  • Confirm projection_observes hardcodes terminal_result != "head_passed" to return None rather than failing or asserting; the four-field oracle is therefore only certified for the happy-path status string, masking correctness regressions for any other receipt result.
  • Confirm per-probe whole-workspace parsing: admits_inner re-parses and re-evaluates source_declares_value_name / constructor_expansions_unambiguous / macro_binding_scan for every related test (since discriminator_recheck is per test). Flagged by 2026-10-17 independent review as a blocker.
  • Confirm sibling-input projections are intentionally left as assert_unverified, but no test explicitly confirms that the selected arm matches witness.input for an Exposed non-request_identity_v2 arm; the deterministic Ready/Deep test only covers (true,false).
  • Confirm terminal_namespace_unambiguous only iterates facts.source per file, never resolves use crate::* against the actual crate-root body. A crate-root generate_constructor!() lives in lib.rs and is inherited into work_queue.rs through use crate::*, but refusal relies on facts.source of work_queue.rs (which does not declare Some), so the inherited-constructor and generated-constructor fixtures rely on the value-name scan in the owner's source file rather than the real scope owner. Sibling: scan should reach the crate root defined by the importing module's use tree.
  • Confirm published head is aee66a9 (tree d627d453838d3852562bbf02e9ff1376ced0a102); current diff is on top of that head plus a later main merge at 85e40a9. Opposition is bounded to the exact repaired grammar; full native execution was not run in this lane.

Refuted

  • Per-probe find_file_facts/per-file macro-candidate rebuild could resemble an ArrayBuffer detach where earlier findings reference token views that were later invalidated.; refuted because: Findings are recomputed deterministically per changed_request_only_arm extraction in the same run; ripr's parser-owned model treats each re-parse as authoritative and real_terminal_projection_is_current_and_deterministic_in_ready_and_deep asserts identical repeated outputs.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven merged commit 5fbd018 into main Oct 17, 2026
35 of 36 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/1728-terminal-derived-flow branch October 17, 2026 16:57
EffortlessSteven pushed a commit that referenced this pull request Oct 17, 2026
…e base-side Summary count

#7836 added these fixtures before #8493 changed the Summary line; wording only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XdFHetzhxrXVMQXg1meaVR
EffortlessSteven added a commit that referenced this pull request Oct 17, 2026
…t current renderer (#8524)

#7836 merged with goldens predating the base-side-evidence summary suffix, so goldens check is red on main for these fixtures.


Claude-Session: https://claude.ai/code/session_01XJQ3eTmHZCPmLwyb77Hexw

Co-authored-by: Claude <noreply@anthropic.com>
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.

feat(doctor): probe perl-ripr-facts --schema compat once perl-lsp-swarm#2591 lands (#1408 follow-up)

2 participants