Skip to content

fix(repair): unbreak main after #11596 (role-authority sniff, stale refusal assertions) - #11734

Merged
EffortlessSteven merged 7 commits into
mainfrom
fix/role-authority-dirty-premise-sniff
Oct 31, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
fix/role-authority-dirty-premise-sniff

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #11539
Acceptance delta (one sentence): check-rust-source-role-authority passes again on main by routing the #11596 dirty-premise test-gate sniff through analysis::facts::cfg_predicates.

Why

PR CI for #11707 failed check-rust-source-role-authority: crates/ripr/src/app/repair_attempt/mod.rs re-derives source role with "#[cfg(test)]". The literal came in with #11596 and main does not run this gate, so every PR merged with main now fails it. Not caused by the refusal-message PRs.

Change

  • Re-export attribute_is_plain_test_gate from analysis (it already owns the closed spelling).
  • repair_attempt/mod.rs uses it per line instead of contains("#[cfg(test)]").

cargo check -p ripr --lib passes. Hosted CI is the full runner. A changelog fragment is included.


Generated by Claude Code

…predicate authority

check-rust-source-role-authority rejects the literal attribute match added in #11596.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j
@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 31, 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 29 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: 5607cc00-6780-486f-9ccf-7a9d29f398b2
Commits

Reviewing files that changed from the base of the PR and between 8f0e1b0 and a3e6b2a.

Files selected for processing: 5
  • changelog.d/11722-dirty-premise-sniff-cfg-authority.md
  • changelog.d/11734-dirty-premise-symlink-defer.md
  • crates/ripr/src/analysis/mod.rs
  • crates/ripr/src/app/repair_attempt/mod.rs
  • crates/ripr/src/cli/commands/agent_refusal_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

…wording

The two #11596 tests expected pre-rewrite text (differ from HEAD / No workflow was prepared) but the message says Uncommitted: and Nothing was started.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmp1dk37XMDiDt4z11j
@EffortlessSteven EffortlessSteven changed the title fix(repair): route the dirty-premise test-gate sniff through the cfg authority fix(repair): unbreak main after #11596 (role-authority sniff, stale refusal assertions) Oct 31, 2026

Copy link
Copy Markdown
Member Author

Review of record - head c7fc1e0 (source/oracle review; hosted qualification pending)

Angles inspected on the full diff (4 files):

  • Correctness / gate not weakened: the "#[cfg(test)]" literal is replaced by attribute_is_plain_test_gate (the cfg-predicate owner, re-exported from analysis), applied per trimmed line; the source-role gate is satisfied by asking the owner, not by an exemption. One behavioral nuance: the owner matches only a line that is exactly the attribute, whereas the old substring also matched #[cfg(test)] mod t { on one line. rustfmt puts the attribute on its own line and the preflight is deferral-biased (the exact check is the backstop), so the worst case is an earlier refusal of a hand-formatted one-line inline test module in an already-dirty tree; not blocking.
  • Coordinator's extra check (lib tests): the two agent_refusal_tests cases asserted stale text (differ from HEAD: ..., No workflow was prepared and no repair attempt was started.); this PR updates them to the actual refusal text (Uncommitted: src/lib.rs, Nothing was started.), the same fragments the real-binary test used for this refusal. Both lib tests are therefore fixed in this PR, with no assertion removed or loosened beyond the corrected wording. Confirmation is the Rust-only/hosted lib run on this head.
  • Tests: existing dirty_premise_preflight_only_names_plain_production_paths still covers the inline #[cfg(test)] fall-through (separate-line form).
  • Duplicates: fix(repair): refuse an obviously-dirty production premise before the before-phase inventory #11617 (same claim as fix(repair): refuse an obviously-dirty production premise before the before-phase inventory (#11458) #11596) was closed as duplicate with evidence once fix(repair): refuse an obviously-dirty production premise before the before-phase inventory (#11458) #11596 merged; only one carrier remains.

Generated by Claude Code

EffortlessSteven commented Oct 31, 2026 •

Copy link
Copy Markdown
Member Author

Additional affected consumer receipt for this existing repair: #11112 head ae9b380 required run41212761082 failed Rust-gates job124571234875 at Repository policy preflight: check-rust-source-role-authority reports crates/ripr/src/app/repair_attempt/mod.rs re-deriving role with #[cfg(test)]. Actual merge04ca46aac9d5e29e690bf7dc4b433fb4c65b67fa has base62e3f49a10ae23183ffa4c825bbdda63548ec9b7. That base and inspected main share offending module blob4f17e45ddc1ac3138b95b4a558ea56fe2ebfec63. Exact behavioral base reproduction is being checked separately; no attribution beyond the source identity is claimed yet.

#11734 remains the existing repair of record; #11742's duplicate disposition is acknowledged. No competing repair or qualification was started by this consumer lane. The current formatting-preflight failure and same-line attribute-recognition limitation in6545203150 remain separate from the inherited literal finding and should not be treated as passed/equivalent evidence.

15:21 UTC attribution established: the canonical #11112 author built and ran the narrow checker separately on exact hosted merge04ca46aac9d5e29e690bf7dc4b433fb4c65b67fa and its exact base62e3f49a10ae23183ffa4c825bbdda63548ec9b7. Both fail on the identical literal. Flagged file, scanner and checker function match. This is inherited from #11596, not introduced by #11112. The proposed whole-line recognizer's same-line attribute compatibility remains a source-observed concern, not an executed control. No competing fix or integration was created.

15:38 UTC qualification reconciliation: run41214536820 on repaired head54325de5cfe719e0a6a9d59fe355a351830b8719 failed at15:35:16, gate124576387775 step16, because check-changelog-fragments reports changelog.d/11722-dirty-premise-sniff-cfg-authority.md has no issue/PR reference ((#N) or link required). Actual checkoutb07eeaa9246069c6cdf4e9afb417d8bc7e15076d combines this head with3787cc75. Formatting passed; final124579256203 failed and shards were skipped. This is the current concrete qualification failure, distinct from the acknowledged nonblocking same-line behavior. No consumer rerun, competing repair or pass claim.

15:44 UTC independent bounded dependency checks: current owner head 9b54b81a501af8408aeb066e68084fed9faab62c adds the missing (#11734) citation. On observed combined checkout 8941ea883d9d9a9b453ec8a41e79f0faeda08365, tree 64addf1cb22e7245c2ad7ac4ec1ed79615a34110, ordered parents mained5fb560d25d20b805694e77ce1b038cc23e41d3 + current head, check-changelog-fragments, check-rust-source-role-authority, check-process-policy, cargo fmt --check and git diff --check all passed. No additional concrete blocker in these narrow checks. This does not establish the rest of the matrix or overwrite the old failed run. The same-line limitation remains explicitly nonblocking and untested here. No canonical source change or campaign was performed by this reviewer.

16:22 UTC new executed blocker in current run41215902167: shard1/job124586106193 failed installed_python_typescript_journeys::typescript_manual_gap_start_refuses_unavailable_changed_file on8941ea883d9d9a9b453ec8a41e79f0faeda08365. Expected incomplete; received dirty-production Uncommitted: src/unavailable.ts … Nothing was started. 4,673 of6,290 selected tests ran,4,672 passed/1failed,1,617 unrun due fail-fast. Dedicated dirty-premise controls passed; remaining shards were still running at inspection.

Independent source diagnosis: the journey commits a regular production file, then replaces it with a symlink to identical content under target, making the tracked path dirty versus HEAD. Both exact baseed5fb560 and candidate run the #11596 dirty-premise preflight before analysis; the TypeScript content contains no Rust test-gate marker, so #11734's predicate substitution does not change this fixture's classification. This is source attribution, not an independently executed base reproduction. RIPR-SPEC-0311 requires dirty out-of-surface files to block, while the journey deliberately exercises incomplete-analysis/no-artifact refusal. Merely changing its expectation to Uncommitted would lose that guard coverage. A narrow fixture proposal is a clean HEAD containing the symlink, with relative comparison base adjusted to retain the requested diff and ready-gap/link-skipped preconditions. That proposal is unexecuted and needs its named journey plus dirty-premise controls, not assumption-based adoption. No competing source repair or campaign was made.

16:39 UTC current repair review: owner head a3e6b2a75c943eeb4fa312b584be7e9d7b77d444, tree 1aef0b7c1ac486f43029716df5db5d18703922a5, supersedes the earlier unexecuted fixture proposal. symlink_metadata/is_file defers a link before reading its target, consistent with the conservative early-preflight contract. Both gap-bound and seam-bound complete-analysis paths still call trusted_head_surface_violations under the edit-cage policy before writing workflow artifacts; this later check is unchanged. Observed merge d11464d has the same tree, with main8f0e1b083e23a25b6de7172dc696ae75ac8228be + head; local merge-tree matched. Repair module blob67b973221f2148dde226ec41e7f597f20057cdef and journey blobf4942b0df91bd0f8824d6c73f3e7ae2bb0fca5ee match across head/merge.

The new Unix early-preflight symlink control plus existing production/missing/oversized controls cover the changed branch, while the existing unavailable-context journey remains the end-to-end regression. An additional late-boundary symlink variation of trusted_surface_violations_allow_a_dirty_test_file_and_name_production_only would strengthen coverage; it was NOT executed: a fresh full library-test build was not attempted because of the observed disk-space risk. No failed build or test result is claimed. This is a source-inspected boundary with an optional unexecuted discriminator, not a new required gate or passing experiment. Existing current qualification41220138245 remains the selected hosted campaign; no duplicate was started.

17:42 UTC final qualification and landing: run41220138245 attempt1 passed gates, all four shards, verifier124606448458 and final124606518242 on actual d11464d. Verifier established24,745 listed = JUnit, with no duplicates/missing/outside-list entries; the formerly failing TypeScript unavailable-file journey and dirty-premise controls passed.

PR #11734 closed/merged at17:35:33 as264db5967022a0aeaec26cc2827d432d3cdb62a5. Important source reconciliation: its tree5ff592ddc37489975e9b7cbc81cd192b48f088cf equals parentd2d27145b1975f46d1526ec99d3ee0044b385a85, so this is an empty completion commit. Parent #11604 already carries the fixes; actual landed source shows symlink_metadata/is_file deferral and the cfg-predicate authority call. This is not a claim that the empty commit introduced them or that the entire landed tree was executed by the prior qualification. Main ancestry is verified. #11112's canonical owner is now reconciling the dependency into its existing candidate; no consumer qualification has yet passed.

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

Copy link
Copy Markdown
Member Author

Head c7fc1e0 failed Rust gates at the formatting preflight only (rustfmt wanted the two require_contains(...) arms in agent_refusal_tests.rs collapsed; no logic failure). Pushed additive formatting commit 54325de (no history rewrite) and re-requested merge-ready on the new head. The review of record above applies to the unchanged logic; the delta is whitespace-only.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Decision record for the third main-break item (installed_python_typescript_journeys::typescript_manual_gap_start_refuses_unavailable_changed_file).

Cause: the journey swaps a committed file for a symlink so analysis cannot read it. The #11596 dirty-premise preflight followed the symlink, read plain production text and refused it as a dirty production edit, ahead of the "analysis incomplete" refusal the journey expects.

Decision: fix the preflight, not the journey. The journey pins the more specific, more useful refusal for that state. The preflight is documented to defer unreadable and oversized paths to the later exact checks, so a non-regular entry now falls through the same way (symlink_metadata, is_file(); it never follows links). A unit case for a symlinked production path is added to dirty_premise_preflight_only_names_plain_production_paths.

Head a3e6b2a7 also carries the changelog reference fix, the role-authority fix and the two stale refusal assertions. cargo check -p ripr --lib --tests passed on the symlink commit; hosted CI is the full runner, and merge-ready has been re-applied.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 264db59 into main Oct 31, 2026
60 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/role-authority-dirty-premise-sniff branch October 31, 2026 17:35
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