Repository navigation
fix(rust): a changed field write in a method gets a specific check/repair answer (#11398) - #11642
EffortlessSteven wants to merge 9 commits into
Conversation
…c repair answer (#11398) A changed field assignment in a method (`self.count += 1`, a builder's `self.timeout = t * 2; self`) had a diff probe but no repository seam, so `ripr repair` and the check repair line said the change touched no code it could start on. The seam inventory now emits a field_construction seam for a write to one plain `self` field that the RIPR-SPEC-0228 last-write rule accepts (methods unresolved, so a later `self.m()` call counts as a write). A tail `self` that hands the value to the caller is not a write, for the diff probe and the seam alike. The seam is graded only by the diff probe's exact field read, now shared as `assertion_confirms_assigned_field`. An assertion that names the field but is not confirmed makes the discriminating stage unknown, so the answer is never "no test checks the field" or "already checked" by token match. No field write starts a repair (the same as constructed fields). Cache generation 1.124 (sharded/compact 0.131) and the first-useful-action fixture commitments follow the seam change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
…nd-written step (#11398) `ripr check` told the reader of a changed `self.timeout = t * 2` to "match the wrapper that carries the changed field (for example the `Err` variant)", the struct-literal wording. A field-write seam now refuses the stub with `field_written_in_method`, and the hand-written step says to assert the changed field on the value the method was called on (for a builder, on the value the chain returns). The integration test accepts either spelling of the "already checked" refusal so it composes with #11392. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 55 minutes. View limit details
|
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the builder-chain test expects a field-name read to remain unjudged, contradicting the specification's exact-read rule.
- Confirm the new seam route accepts only a plain self field when assigned_field_path returns a non-nested path, but the integration suite does not enumerate other field_assignment_target-compatible assignment forms.
Refuted
- The field-write seam changes could introduce an active-view or stale-length-snapshot UB.; refuted because: The diff introduces Rust static-analysis metadata and text classification only; it does not allocate buffers, expose mutable views, track active-view regions, resize or detach storage, transfer ownership, or snapshot lengths. No relevant UB invariant is changed.
- The PR claim that every changed field write in a method now receives the specific answer is broader than the demonstrated seam invariants, which are limited to plain self fields whose write is the owner's last word.
- Adding field-write repository seams may enable an automatic repair despite the documented no-start policy.; refuted because: repair_packet_eligibility is unchanged, and every new integration case asserts that repair does not start, including missing and unjudged reads.
- Introducing a field_construction repository seam could accidentally enable automatic repair.; refuted because: Eligibility policy was not broadened; the new integration suite explicitly requires every field-write case not to start repair.
- Field-write analysis could be unsafe because the diff touches unsafe/native-risk surfaces.; refuted because: The changed Rust code contains no new unsafe, raw-pointer, FFI, lifetime, or unchecked-memory operation; unsafe-review reported no new gaps, and the substantive change is analysis classification.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…read of the caller's binding (#11398 review) Review B1: `without_tail_self` let a builder `fn retries(mut self, n) -> Self` be credited by `assert_eq!(o.retries, 3)` on a `Copy` binding the write never reached. `assertion_confirms_assigned_field` now requires a borrowed receiver (`&self`, `&mut self`, `self: &Self`), so such a read stays unjudged on the diff and repository sides alike. Also from the review: the hand-written step no longer promises credit for a by-value builder and says ripr cannot confirm it yet (N1); the LSP hover and the agent packet's missing-check text word a field write as a read of the receiver (N2; the packet example and upgrade suggestion are #11726); the spec and changelog say the field-name match is a plain word match (N3); and new integration pins cover the Copy builder and a default-like expected value, with the unjudged helper asserting check's answer too (N5). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
…-assign # Conflicts: # crates/ripr/src/analysis/classify/activation.rs # crates/ripr/src/analysis/classify/mod.rs # crates/ripr/src/analysis/seam_cache.rs
…took 1.124 / 0.131 for #9644) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
…to claude/burndown-field-assign # Conflicts: # crates/ripr/src/analysis/seam_cache.rs
|
Review of record, head
Findings:
Disposition: if Generated by Claude Code |
|
Review delta pushed: head
Local on 07ab781 (the last merge before main; main merged cleanly afterwards): Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm field-write admission delegates to field_assignment_target plus assigned_field_path, but the visible integration corpus does not enumerate assignment-operator variants.
Parked follow-ups
- By-value builder handling is intentionally a documented limitation and should remain parked rather than broaden repair eligibility in this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Full execution evidence remains incomplete because cargo-test was scheduled without a receipt and ripr failed.
- The seeded PR claims focused and library test results, but the current sensor packet has no cargo-test receipt and RIPR failed with exit code 2.
|
|
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head a7006d0): REVIEW_INCOMPLETE
Inspected:
Head a7006d02a803a36647ff68b75b2775e964af48f4, base 7118be731018c6fae55e71542638bb6cc6b702f5, non-draft, labels merge-ready, 24 files, +766/-36, so 802 changed lines / 24 files at the PR level. The hosted admission action reported ADMISSION_CHANGED_FILES=20 and ADMISSION_CHANGED_LINES=784 for the same candidate, subtracting declared-generated paths. Against main tip a69bf0214f7bd7e0537a1cdd07e95608e5a366e8, a blob comparison over all 24 paths gives 6 ALREADY ON MAIN, 15 differing and 3 absent, so 18 paths are outstanding. Owners read at head: analysis/seam_inventory.rs, analysis/seam_cache.rs, analysis/classify/propagation_witness.rs, analysis/classify/activation.rs, analysis/test_grip_evidence.rs, analysis/test_stub.rs + test_stub/tests.rs, analysis/mod.rs, lsp/hover.rs, output/agent_seam_packets.rs, output/human/triage.rs, crates/ripr/tests/field_write_repair_answer.rs (new), and the Python guard_activation.rs at base, main and head. Governing artifacts read at head: docs/specs/RIPR-SPEC-0228-rust-field-write-observation.md (+46/-0), .ripr/traceability.toml, docs/OUTPUT_SCHEMA.md, policy/process_allowlist.d/11398-field-write-repair-answer.txt, and the four fixtures/boundary_gap/expected/... goldens. Hosted at this exact head: merge-ready run 41242683815 (head_sha=a7006d02a803a36647ff68b75b2775e964af48f4, event=pull_request, created 2026-10-31T21:14:52Z) concluded failure. Per job: "Rust gates" SUCCESS (124661300726), shards 1, 2 and 4 SUCCESS (124667530391/450/382), shard 3 FAILURE (124667530361), shard verifier FAILURE (124672237114), "Ripr Rust Small Result" FAILURE (124672298082), Rust-only feature lane SUCCESS (124659641872). The result job's own inputs: ADMISSION_STATUS: admitted, ROUTE_RESULT: success, GITHUB_RESULT: success, ELIGIBILITY_RESULT: success, GITHUB_TESTS_RESULT: failure, REASON: runner_api_failed (CX43/CPX42/CX53 unobserved). No .github/ file is in this diff, so deprecated_workflow_action_refs does not apply.
Blocking:
The required context "Ripr Rust Small Result" is red, and I traced the red to a single test that is inherited from this candidate's base, not produced by the candidate. Shard 3 (job 124667530361, 2026-10-31T21:59:49Z) fails exactly one test: analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals, panicking at crates/ripr/src/analysis/language/python/guard_activation.rs:1436:9 with left: None, right: Some(true); the shard reports 985 passed, 1 failed, and the verifier and result jobs fail only as a consequence. Base attribution is direct: the base commit itself - 7118be731018c6fae55e71542638bb6cc6b702f5 - ran its own rust-tests-junit lane (job 124659381061) at 2026-10-31T21:25:10Z and failed the same test at the same file and line with the same left: None, right: Some(true) values, before any of this candidate's changes existed. The base commit also carries two further red lanes of its own (rust-coverage job 124660975237, vscode job 124662106732). This candidate touches no Python code and does not modify guard_activation.rs, so the red is inherited. Per the rule that a red required check is never a clearance, the candidate cannot be cleared while that context is red. The functional fix is PR #11918 ("fix(python): None never equals a number in shared literal equality (main red)"), which is MERGED; main's copy of guard_activation.rs (blob 4d3fc2692c04da108be057a481731f97b32863c5, 73347 bytes) differs from the base's (blob e7c50cc69ed1ffe5190ebb5a167b6cfc7db1ad4e, 72070 bytes) and still carries the same compare_literal_values("16", "==", "16.0") == Some(true) assertion. This candidate's base predates that merge, so the red is expected to clear when main is merged in; I did not run that test on main, so main's greenness for it is not established here.
Non-blocking:
- The body's local proof is bound to a superseded commit. It reports "
cargo xtask precommiton 3b33faa: exit 0" and "cargo test -p ripr --test field_write_repair_answer: 10/10 pass", while the current head isa7006d02a(the earlier review 5723115055 sat on3b33faab). Hosted lanes close most of that gap here - "Rust gates" (which runs clippy with-D warnings) is SUCCESS and the new integration cases PASS across the three green shards (124667530391, 124667530450, 124667530382 each showripr::field_write_repair_answerPASS lines, with no FAILED line for that binary) - but the localcargo xtask precommitclaim was not reproduced at this head. - The oracle is discriminating, not self-confirming. Of the twelve cases in
crates/ripr/tests/field_write_repair_answer.rs, nine assert absence -builder_chain_exact_read_stays_unjudged_not_missing,weak_field_read_stays_unjudged,read_after_a_later_reset_is_not_a_check_of_the_write,read_of_the_same_field_on_another_binding_is_not_a_check,write_followed_by_an_unresolved_self_call_has_no_field_seam,nested_field_path_write_has_no_field_seam,copy_builder_read_of_the_unmoved_binding_is_not_a_check,default_like_expected_value_is_not_a_check_of_the_write- so a too-eager implementation fails them. andpropagation_witness.rsaddsassigned_field_path_reads_a_tail_self_as_a_hand_off_not_a_writewith three positive and five negative owner bodies. - The existing bot verification question on this PR - that field-write admission delegates to
field_assignment_targetplusassigned_field_pathwhile the visible integration corpus does not enumerate assignment-operator variants - resolves positively, and I record it as answered rather than as a defect: the helper's own testfield_assignment_target_reads_self_field_assignments_only(propagation_witness.rs:4319) pinsself.count += 1,self.count = self.count + 1;,self.child.count <<= 2andself.state = State::Done, and refusesself.count == 1,self.count >= 1,self.items[0] = 1,self.f() = 1,other.count = 1,self = Self::new(). Other compound operators travel the same code path and are not enumerated separately; that is an observation about corpus breadth, not a defect I can demonstrate. - Efficiency: no unbounded growth, no process spawning, no new I/O. One redundancy is visible in source:
assigned_field_pathre-masks the owner body on every invocation (propagation_witness.rs:1859),may_write_fieldmasks it again (:2102), and the right-hand side and each callee are masked separately (:1917,:2369). The diff-probe call site (classify/activation.rs:4018) invokes this once per changed probe resolving to that owner, and this PR adds a second consumer - the repository seam inseam_inventory.rs- calling the same helper, so an owner body is re-masked once per changed probe per consumer rather than once per owner. Absolute cost is unestablished (no profile, no local build); bodies are bounded by owner length. The cache generation bump 1.124 to 1.125 is a deliberate one-time invalidation. - Shared surface, not a duplicate claim. #11642 shares
classify/activation.rswith #11618 (blob23bf27c3vs3b180a82) and #10240 (b68031cb), and.ripr/traceability.tomlplusdocs/OUTPUT_SCHEMA.mdwith #11632 (f4e47869vsb6ff8dc1,8d9eb4a6vsf6091840); every shared path differs in content, so this is OVERLAP with differing bytes, not an identical claim. No other open PR claims #11398 or the field-write answer, so #11642 is the survivor of its own claim. Deciding criterion:classify/activation.rsis the semantic owner of activation and field-write credit, so whichever lands second must re-verify the other's field-write rules rather than assume a textual merge;.ripr/traceability.tomlis a single shared ledger every candidate appends to.
Not run:
- The Rust toolchain on this host is not on
PATH, so no local build, test, clippy orcargo xtaskcommand was executed. Every Rust-level statement above comes from hosted job logs at this exact head, from the base commit's own hosted logs, or from source read at this head. - The self-hosted matrix (CX43/CPX42/CX53) was not observed in this run: the runner API query failed, so those lanes were skipped. That dimension is unestablished, not failed.
- I did not read the "Rust gates" job log for this head step by step; I relied on its recorded SUCCESS conclusion.
- The base commit's other red lanes (
rust-coverage,vscode) were identified from its check suite; their logs were not read, so I do not characterise them. - REST core quota was intermittently exhausted; PR metadata, file sets, contents, check state, labels and the base comparison came through GraphQL, and the job logs were retrieved while the quota still served.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head a7006d02a803a36647ff68b75b2775e964af48f4. Not an approval.
|
Closing as superseded. Main already carries an equivalent implementation of the #11398 claim (#11813, 9b06ec1); merging main conflicts in 13 files, and the cache-schema bump and fixture commitments here (1.125) cannot be regenerated against main's 1.126 without a Rust build. The two pieces main lacks, the borrowed-receiver-only rule and the Generated by Claude Code |
Requested by Steven Zimmerman · project thread
Governing issue or accepted claim: #11398
Acceptance delta (one sentence): a changed field write in a method (audit case 11
builder,self.timeout = t * 2; self) now gets a specific, agreeing answer fromripr checkandripr repair(the missing check of that field, already checked, or "could not judge the read") instead of "your changed lines touch no code ripr can start a repair on", with no repair start.What changes
analysis/seam_inventory.rs): afield_constructionseam is emitted for a changed assignment to one plainselffield only when the RIPR-SPEC-0228 last-write rule (assigned_field_path) reads it as the owner's last word on that field. Laterself.m()calls are not resolved and count as writes (no seam); nested paths (self.inner.count) get no seam. A bare tailselfin a builder hands the value back and is not a write (without_tail_self), for the diff probe and the seam alike.assertion_confirms_assigned_fieldrequires&self/&mut self/self: &Self. A by-value receiver writes a moved copy; for aCopytypeo.retries(5); assert_eq!(o.retries, 3)reads the unchanged binding, so it never confirms the write (diff and repository sides alike).classify/activation.rs,test_grip_evidence.rs): the seam is credited only by the diff probe's exact field read, now shared asassertion_confirms_assigned_field. An assertion that holds the field's name as a plain word but is not confirmed (builder chain, weak>, read afterreset(), another binding) makes the discriminating stage unknown: never "no test checks the field", never "already checked".repair_packet_eligibilityis unchanged. A field-value route needs a field-value fact that no producer emits, and constructed fields (audit case 10) already refuse on purpose (sibling_field_assertion_stays_non_readyand nine more pins). Starting on a field write would be a new start policy, so it stays out.test_stub.rs,output/human/triage.rs): a field-write seam refuses the stub with its own reason (field_written_in_method).ripr checkno longer says "match the wrapper ... (for example theErrvariant)" for it. It says to call the method with an input for which old and new code store different values and assert the changed field on the value it was called on, and that ripr cannot yet confirm such a check when the method takesselfby value (a builder), so it will still report the change as unclear. The LSP hover and the agent packet's missing-check text use the same wording; the packet's example assertion and the upgrade suggestion are field writes in methods: agent packet example and upgrade suggestion still describe a returned struct (follow-up to #11642) #11726.boundary_gapfirst-useful-action commitments re-hashed, plus the fixture and doc commitments that pin the version.Before / after (audit harness,
RIPR_HARNESS_FEATURE_BRANCH=1)Case 11
builder, before: checkcould not tie one to this finding's changed line; repairtouch no code ripr can start a repair on.After: check
no repair start offered: ... still missing: a test assertion that checks the changed field value+No test stub here: the change sets a field of \self` inside a method ...+ the hand-written step above; repairthe code at src/lib.rs:16 `self.timeout = t * 2`: ... missing evidence: a test assertion that checks the changed field value`. The other 23 rows are unchanged (starts: 07, 12, 13, 19; 05 waits on #11377).Proof
cargo test -p ripr --test field_write_repair_answer: 10/10 pass. Positive (unread field, sibling read, builder audit shape name the missing field check in both commands; exact read is already checked in both) and negatives (builder-chain read, weak read, read afterreset(), other binding stay unjudged; write followed by an unresolvedselfcall and a nested path get no seam). Every case asserts that repair does not start.cargo test -p ripr --lib: 16355 passed, 1 failed (analysis::diff::model::tests::added_run_start_on_a_long_run_is_bounded, a wall-clock bound under a loaded shared machine; it passes when run alone and does not touch this diff).FieldWrittenInMethodguard removed,field_write_in_a_method_names_the_receiver_not_a_struct_literalfails (left: Err(FieldNotReturned),right: Err(FieldWrittenInMethod)). The tail-selfand last-write rules have their own unit pins inpropagation_witness.rs(positive and five negative bodies). Seam-inventory guard: with its plain-field requirement removed (.is_none_or(|_field| false)),nested_field_path_write_has_no_field_seamfails and the other 9 pass. The self-call negative is held by the last-write rule (assigned_field_pathreturns nothing), which the unit pins cover.cargo xtask precommiton 3b33faa: exit 0 (fmt, clippy on the changed package, goldens check, check-user-text with no ceiling change, process/network policy, file policy, local context, no-panic, allow-attributes). The first run flagged clippynonminimal_booland the process allowlist; both fixed in this branch.Not in this PR
Generated by Claude Code