Skip to content

fix(python): multi-line literal element gates and whole-token value matching, with 8 rule-10 corpus cases - #10226

Merged
EffortlessSteven merged 7 commits into
mainfrom
claude/py-next-row
Oct 25, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
claude/py-next-row

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Corpus cases for RIPR-SPEC-0238 rule 10 (changed dict/list elements match whole literals) found three real false_exposed rows, filed as #10210:

  • An element on its own line of a multi-line literal bypassed the changed-element gate entirely (the gate only parsed one-line literals).
  • Changed values were matched by substring, so 80 was "observed" inside "8080".

Fix:

  • enclosing_literal_pair joins the enclosing return {…}/x = […] literal (new side, and old side with the paired old line) so the existing dict/list gates judge the changed element. Rejects call arguments, comments and mismatched closers.
  • oracle_contains_value_literal: numbers must be whole tokens (no adjacent digit/letter/_/.), strings must appear as complete quoted literals; other expressions keep the substring match.
  • Spec rule 10 gains one sentence on multi-line literals.

Corpus: 8 py-literals-* cases on a new authored-py-pytest-literals subject, labelled by real pytest runs (4 discriminated, 4 not). Python corpus: 253 cases, 0 false verdicts, spec examples 57/57. The three previously false-exposed rows now read weakly_exposed (ideal); no existing row moved.

Governing issue or accepted claim: #10210 (rule-10 coverage under #9412)

Acceptance delta (one sentence): Rule 10 of RIPR-SPEC-0238 is corpus-covered for dict values, keys, .get, list indices and whole-collection compares, and the multi-line and substring false-exposed paths are closed.

Proof: cargo test -p ripr --lib python (1333 pass, incl. positive/negative controls for the gate, joiner and token matcher), cargo xtask verdict-corpus check --language python, cargo xtask precommit.


Generated by Claude Code

… rules and match whole value tokens (#10210)

Adds 8 py-literals-* corpus cases for RIPR-SPEC-0238 rule 10.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TJm1ic5tVeaxnwQM8c6xmr
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 25, 2026 05:11
@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!

@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 25, 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 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 168 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: 4917f580-d89e-4a32-aba3-04405ea2fbaa
Commits

Reviewing files that changed from the base of the PR and between feea378 and 4a99db4.

Files selected for processing: 60
  • .ripr/traceability.toml
  • changelog.d/10210-python-literals-corpus.md
  • changelog.d/10210-python-literals-honesty.md
  • changelog.d/10210-python-multiline-literal-elements.md
  • crates/ripr/src/analysis/language/python/classify.rs
  • crates/ripr/src/analysis/language/python/repo/evidence.rs
  • crates/ripr/src/analysis/language/python/row_miss.rs
  • crates/ripr/src/analysis/language/python/row_miss_tests.rs
  • crates/ripr/src/analysis/language/python/sink_alignment.rs
  • crates/ripr/src/analysis/language/python/tests.rs
  • docs/specs/RIPR-SPEC-0238-python-oracle-and-reach-rules.md
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • fixtures/python-verdict-corpus/cases/py-literals-key-get.diff
  • fixtures/python-verdict-corpus/cases/py-literals-key-get.json
  • fixtures/python-verdict-corpus/cases/py-literals-key-unobserved.diff
  • fixtures/python-verdict-corpus/cases/py-literals-key-unobserved.json
  • fixtures/python-verdict-corpus/cases/py-literals-list-index-observed.diff
  • fixtures/python-verdict-corpus/cases/py-literals-list-index-observed.json
  • fixtures/python-verdict-corpus/cases/py-literals-list-index-unobserved.diff
  • fixtures/python-verdict-corpus/cases/py-literals-list-index-unobserved.json
  • fixtures/python-verdict-corpus/cases/py-literals-value-digit-adjacent.diff
  • fixtures/python-verdict-corpus/cases/py-literals-value-digit-adjacent.json
  • fixtures/python-verdict-corpus/cases/py-literals-value-sibling-equal.diff
  • fixtures/python-verdict-corpus/cases/py-literals-value-sibling-equal.json
  • fixtures/python-verdict-corpus/cases/py-literals-value-subscripted.diff
  • fixtures/python-verdict-corpus/cases/py-literals-value-subscripted.json
  • fixtures/python-verdict-corpus/cases/py-literals-whole-collection.diff
  • fixtures/python-verdict-corpus/cases/py-literals-whole-collection.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-key-get.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-key-unobserved.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-list-index-observed.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-list-index-unobserved.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-value-digit-adjacent.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-value-sibling-equal.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-value-subscripted.json
  • fixtures/python-verdict-corpus/expected/rows/py-literals-whole-collection.json
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals.json
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals/lits/__init__.py
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals/lits/cfg.py
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals/pyproject.toml
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals/tests/__init__.py
  • fixtures/python-verdict-corpus/subjects/authored-py-pytest-literals/tests/test_cfg.py
  • fixtures/python_literal_value_inside_longer_number/SPEC.md
  • fixtures/python_literal_value_inside_longer_number/diff.patch
  • fixtures/python_literal_value_inside_longer_number/expected/CHANGELOG.md
  • fixtures/python_literal_value_inside_longer_number/expected/check.json
  • fixtures/python_literal_value_inside_longer_number/expected/human-full.txt
  • fixtures/python_literal_value_inside_longer_number/expected/human.txt
  • fixtures/python_literal_value_inside_longer_number/input/ports.py
  • fixtures/python_literal_value_inside_longer_number/input/ripr.toml
  • fixtures/python_literal_value_inside_longer_number/input/tests/test_ports.py
  • fixtures/python_multiline_literal_sibling_read/SPEC.md
  • fixtures/python_multiline_literal_sibling_read/diff.patch
  • fixtures/python_multiline_literal_sibling_read/expected/CHANGELOG.md
  • fixtures/python_multiline_literal_sibling_read/expected/check.json
  • fixtures/python_multiline_literal_sibling_read/expected/human-full.txt
  • fixtures/python_multiline_literal_sibling_read/expected/human.txt
  • fixtures/python_multiline_literal_sibling_read/input/labels.py
  • fixtures/python_multiline_literal_sibling_read/input/ripr.toml
  • fixtures/python_multiline_literal_sibling_read/input/tests/test_labels.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready was requested, but this PR conflicts with main (head 2735b20a), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

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

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

#10210 custody and discriminating review handoff

REPAIR_REQUIRED for the observed element-gate behavior at PR head d8f82e049886be2852ddf58188ea344f8fe5543f, tree 1857f265bee4657b4e9a4789d1ab92fbf310539f, base 8b3b83d9363523e601a026856a64be1bb72b0854.

This PR is the canonical #10210 candidate. It appeared during an isolated additional implementation pass; publication recheck found it, so no competing PR was opened and this handoff preserves this PR's branch/head. The additional branch below is retained for inspectable regression/source evidence and selective adoption, not as a second landing candidate.

[P1] The whole-display shortcut still credits unchanged siblings

At the dict gate and the matching list gate, merely containing == [/== { returns true before changed-member checks. These strong, non-tautological oracles only read unchanged siblings:

# dict: {'high': 11, 'low': 10} -> {'high': 80, 'low': 10}
assert list((10,)) == [labels()['low']]
# list: [11, 10] -> [80, 10]
assert list((10,)) == [labels()[1]]

Both Python oracles are true before and after. The exact candidate's pure observer functions also return true for each instead of withholding element observation. Bind the compared collection operand to the owner result; an unrelated display containing a sibling read must not supply whole-collection credit. Retain changed-subscript/.get/actual whole-output positives and existing one-line compatibility. Avoid admitting masking wrappers or aliases without retained-value evidence.

[P2] Numeric values can still match quoted strings

The numeric matcher checks adjacent characters but accepts a number inside a quoted string. For changed value 80, assert labels() is not None and str('80') == '80' supplies true observer credit while ignoring the collection contents. Native literal/token identity can distinguish numeric 80 from string '80'; retain signed-number, bool, and one-line positives.

Raw evidence and limits

Command: rustc --edition 2024 /tmp/10226-gate.rs -o /tmp/10226-gate && /tmp/10226-gate (Rust 1.95.0, Linux; no Cargo build of this PR, dependencies, installs, or qualification request). The harness below copies this exact head's pure observer functions unchanged and invokes them with explicit changed keys/indices/values.

dict-scalar-sibling: actual=false expected=false
dict-changed-key: actual=true expected=true
dict-whole-output: actual=true expected=true
dict-sibling-in-unrelated-display: actual=true expected=false
numeric-vs-quoted-string: actual=true expected=false
list-scalar-sibling: actual=false expected=false
list-changed-index: actual=true expected=true
list-sibling-in-unrelated-display: actual=true expected=false

The harness is a diagnostic printer: exit 0 means execution succeeded, not that its controls passed. The five matching controls and three mismatches are function execution evidence, not a full analyzer verdict run on this PR. Full-path classification on this head remains to be exercised by its owner. Independent CPython 3.12.14 execution of actual multiline functions confirms the sibling-display and masking/retention oracles remain true for old and new values. The regression matrix below explicitly requires Strong related rows to prevent a weak tautology from masquerading as a negative control.

Inspectable additional source/test checkpoint: branch codex/10210-python-multiline-elements, head 47b80ca15c005a1cc6e45bde966628871667473b, tree e7575087b1f310db5ed05e1b473dff04c96a3f6c, base 2d93df787c4f63120c1a9e34b0b48ba584c37f2d (tree a255ff0f9f98b21ca2cbcbaa64fd952feb9e0864). Its ten focused regression subjects cover keys/indices, .get, whole output, sibling/unrelated displays, numeric/string token boundaries, comments/hash strings, signed/bool compatibility, methods, shadowed wrappers, lossy aliases, and retained immediate aliases. The bounded diff is 9 files, +853/-24; this is not proposed as a competing PR or a wholesale replacement of the corpus candidate.

Observed on that checkpoint only:

cargo test -p ripr --lib multiline_collection -- --nocapture
10 passed; 0 failed; 0 ignored; 14237 filtered out; exit 0
cargo test -p ripr --lib analysis::language::python::
1116 passed; 0 failed; 0 ignored; 13131 filtered out; exit 0

Its test-only parent 77d3904b60d8df396d35c29bc0c0a8d5c3fb0e90 produced the intended behavioral red: 2 sibling/key-index tests reported Exposed instead of WeaklyExposed (1 other control passed; it was later strengthened). Exact-base worktree doctor/check-fast/narrow all-target check passed. Traceability, static language, changelog-fragment, and whitespace checks passed. A separate reviewer inspected the final checkpoint's exact head and challenged actual Python controls; no blocking source finding remained in that bounded source. These results do not qualify this PR's different tree.

Next owner obligation: incorporate/refute these specific findings on this PR's existing branch, run the discriminating full-path tests on its exact new head, refresh affected independent review, and satisfy all required current gates and applicable authorization before readiness/merge. No Ready transition, merge-ready label, qualification request, or merge was performed by this handoff. Local precommit/goldens/dogfood/corpus and hosted qualification were not run on the additional checkpoint; this receipt grants no merge clearance.

Exact pure-observer harness input

Generate /tmp/10226-gate.rs by placing the following unchanged function source and calls in a standalone Rust file (all source is from the pinned PR head):

// Exact pure observer functions from PR #10226 head d8f82e049886be2852ddf58188ea344f8fe5543f.
mod candidate {
pub(super) fn oracle_observes_changed_dict_element(
    oracle: &str,
    changed_keys: &[String],
    changed_values: &[String],
) -> bool {
    // A whole-collection comparison (`== {...}` / `== [...]`) observes every element.
    if oracle.contains("=={")
        || oracle.contains("== {")
        || oracle.contains("==[")
        || oracle.contains("== [")
    {
        return true;
    }
    // Observes a changed value literal (e.g. the new `9090` / `"failure"`), but
    // not when that literal only appears beside a sibling-key subscript
    // (`assert build()['timeout'] == 80` after `'port'` changed to `80`).
    for value in changed_values {
        if oracle_contains_value_literal(oracle, value)
            && !oracle_solely_subscripts_unchanged_dict_key(oracle, changed_keys)
        {
            return true;
        }
    }
    // Subscripts a changed key by literal (`["port"]`, `['port']`, `.get("port")`).
    changed_keys
        .iter()
        .any(|key| oracle_subscripts_dict_key(oracle, key))
}

fn oracle_subscripts_dict_key(oracle: &str, key: &str) -> bool {
    oracle.contains(&format!("[\"{key}\"]"))
        || oracle.contains(&format!("['{key}']"))
        || oracle.contains(&format!(".get(\"{key}\")"))
        || oracle.contains(&format!(".get('{key}')"))
}

fn oracle_has_literal_dict_subscript(oracle: &str) -> bool {
    oracle.contains("[\"")
        || oracle.contains("['")
        || oracle.contains(".get(\"")
        || oracle.contains(".get('")
}

fn oracle_solely_subscripts_unchanged_dict_key(oracle: &str, changed_keys: &[String]) -> bool {
    oracle_has_literal_dict_subscript(oracle)
        && !changed_keys
            .iter()
            .any(|key| oracle_subscripts_dict_key(oracle, key))
}

/// Whether the oracle contains the changed element's value as a WHOLE literal
/// token (RIPR-SPEC-0238 rule 10): a number not adjacent to a digit, letter, `_`
/// or `.` (so `80` is not found inside `8080`), a string as a complete quoted
/// literal (so `y` is not found inside `"yes"`). Any other value expression keeps
/// the substring match.
pub(super) fn oracle_contains_value_literal(oracle: &str, value: &str) -> bool {
    let value = value.trim();
    let literal = value.trim_matches('"').trim_matches('\'');
    if literal.is_empty() || (literal.len() < 2 && literal.len() == value.len()) {
        return false;
    }
    let quoted = value.len() >= 2
        && literal.len() + 2 == value.len()
        && (value.starts_with('"') && value.ends_with('"')
            || value.starts_with('\'') && value.ends_with('\''));
    if quoted {
        return !literal.contains(['"', '\''])
            && (oracle.contains(&format!("\"{literal}\""))
                || oracle.contains(&format!("'{literal}'")));
    }
    let digits = literal.strip_prefix('-').unwrap_or(literal);
    let numeric = digits.starts_with(|c: char| c.is_ascii_digit())
        && digits
            .chars()
            .all(|c| c.is_ascii_digit() || c == '.' || c == '_');
    if !numeric {
        return oracle.contains(literal);
    }
    let adjacent = |c: char| c.is_alphanumeric() || c == '_' || c == '.';
    oracle.match_indices(literal).any(|(start, found)| {
        let before = oracle[..start].chars().next_back();
        let after = oracle[start + found.len()..].chars().next();
        !before.is_some_and(adjacent) && !after.is_some_and(adjacent)
    })
}

fn oracle_observes_changed_list_element(
    oracle: &str,
    changed_indices: &[usize],
    changed_values: &[String],
) -> bool {
    if oracle.contains("=={")
        || oracle.contains("== {")
        || oracle.contains("==[")
        || oracle.contains("== [")
    {
        return true;
    }
    for value in changed_values {
        if oracle_contains_value_literal(oracle, value)
            && !oracle_solely_subscripts_unchanged_list_index(oracle, changed_indices)
        {
            return true;
        }
    }
    changed_indices
        .iter()
        .any(|index| oracle_subscripts_list_index(oracle, *index))
}

fn oracle_subscripts_list_index(oracle: &str, index: usize) -> bool {
    oracle.contains(&format!("[{index}]"))
}

fn oracle_has_list_index_subscript(oracle: &str) -> bool {
    let bytes = oracle.as_bytes();
    let mut i = 0;
    while i < bytes.len() {
        if bytes[i] == b'[' {
            let mut j = i + 1;
            if j < bytes.len() && bytes[j].is_ascii_digit() {
                while j < bytes.len() && bytes[j].is_ascii_digit() {
                    j += 1;
                }
                if j < bytes.len() && bytes[j] == b']' {
                    return true;
                }
            }
        }
        i += 1;
    }
    false
}

fn oracle_solely_subscripts_unchanged_list_index(oracle: &str, changed_indices: &[usize]) -> bool {
    oracle_has_list_index_subscript(oracle)
        && !changed_indices
            .iter()
            .any(|index| oracle_subscripts_list_index(oracle, *index))
}


pub fn receipt() {
    let keys = vec!["high".to_string()];
    let values = vec!["80".to_string()];
    for (name, oracle, expected) in [
        ("dict-scalar-sibling", "assert labels()['low'] == 10", false),
        ("dict-changed-key", "assert labels()['high'] == 80", true),
        ("dict-whole-output", "assert labels() == {'high': 80, 'low': 10}", true),
        ("dict-sibling-in-unrelated-display", "assert list((10,)) == [labels()['low']]", false),
        ("numeric-vs-quoted-string", "assert labels() is not None and str('80') == '80'", false),
    ] {
        let actual = oracle_observes_changed_dict_element(oracle, &keys, &values);
        println!("{name}: actual={actual} expected={expected}");
    }
    for (name, oracle, expected) in [
        ("list-scalar-sibling", "assert labels()[1] == 10", false),
        ("list-changed-index", "assert labels()[0] == 80", true),
        ("list-sibling-in-unrelated-display", "assert list((10,)) == [labels()[1]]", false),
    ] {
        let actual = oracle_observes_changed_list_element(oracle, &[0], &values);
        println!("{name}: actual={actual} expected={expected}");
    }
}

}
fn main() { candidate::receipt(); }

Source SHA-256: 13d154e9af65734056fde18f093c5665d1f860ddc1333d51be77b817e27edfa9 (sink_alignment.rs fetched by git show d8f82e049886be2852ddf58188ea344f8fe5543f:crates/ripr/src/analysis/language/python/sink_alignment.rs). Harness SHA-256: 770b58a300446695370dc004daa0e1d03e1955ff9f688b3230d371281af7fe5f.

@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 for the existing P1 in the preceding review. This pass closes its missing full-classifier evidence seam; it does not propose another implementation.

Reviewed head: d8f82e049886be2852ddf58188ea344f8fe5543f; tree: 1857f265bee4657b4e9a4789d1ab92fbf310539f; base: 8b3b83d9363523e601a026856a64be1bb72b0854. PR account: EffortlessSteven; canonical branch: claude/py-next-row. The initial head 2735b20a9576408be13ab3ac510fede7d8bad4c5 is the first parent; the frozen base is the second parent. The earlier import conflict is superseded: the current import preserves both CreditedAssertion and enclosing_literal_pair. The matcher blob remains 5bbb891664dcee5d325486fe2dc7188b12829308.

Observed current-head classifier results, using extracted owners/tests and classify_change_with_source on actual multiline functions:

Changed return Assertion Full classifier Related row
dict: high 11 → 80; low remains 10 assert list((10,)) == [labels()['low']] exposed, direct Strong
list: index 0, 11 → 80; index 1 remains 10 assert list((10,)) == [labels()[1]] exposed, direct Strong
same dict change assert labels() is not None and str('80') == '80' weakly_exposed, orthogonal Strong

Independent Python execution passes each assertion on both old and new versions. Thus the first two rows confirm P1 through the production classifier, not merely the pure observer. The whole-display shortcut at sink_alignment.rs bypasses changed-element identity. It conflicts with rule 10's compared-operand requirement. The shortcut predates this diff; this is an unresolved current acceptance concern, not evidence that this PR introduced the shortcut.

The specific quoted-number P2 example is refuted as a full-classifier false promotion on this head: it is already weakly_exposed. The helper's true alone does not establish a final verdict. This pass adds no stricter numeric/string policy or broader masking hypothesis as a blocker.

Passed local proof (Linux; installed Rust/Cargo 1.95.0; locked dependencies):

cargo test --locked -p ripr --no-default-features --features lang-rust,lang-python --lib python -- --nocapture
1381 passed; 0 failed; 0 ignored; 11231 filtered out; exit 0

That run used unchanged current-head production code plus three proof-only tests, experimental tree 6d223cff042749216dee91660e2be18ec5b5c747. Those tests cover 18 subcases: all eight retained py-literals-* cases, nine duplicate-value/nested-inline/assignment/token controls, and the accepted nested-multiline boundary. The three #10210 examples (key-unobserved, list-index-unobserved, value-sibling-equal) are weakly_exposed; changed-key/index, .get, and actual whole-output positives stay exposed. Changed 80 is not observed inside 8080. Direct execution of the eight retained assertion-only Python test functions also agrees with every case's runtime label; pytest itself was not installed or run.

Two extracted-native helper tests pass on the byte-identical matcher source. Replacing whole-token matching with substring matching and removing multiline context each produces the intended assertion failure (exit 101), with the other control passing. These are helper-level mutation receipts, not full-analyzer mutation runs.

The additional full-classifier diagnostic above ran with the same Cargo configuration and filter review_10226_reported_display_full_classifier, experimental tree 69c0a500404856461f5522d14a19397a9c77cc4c: one diagnostic test executed successfully, exit 0. It prints classifications rather than asserting the desired negative verdict; exit 0 does not make the two P1 mismatches passes. Its log SHA-256 is 5ea37be3dbe7b9b114f9ea1aba9a35fa369f794e4c52c8eabfa44f3d3e8e034d; the 1381-test log SHA-256 is 527ee6448487e9048ce2f5b79b36293ed40827a6aa775b217dab3554f6aaca19.

All proof-only source additions were restored; the review checkout is clean. Nested multiline elements retain the explicitly accepted fail-open limitation from #10210; that is not an additional finding. The original-head default-feature build was cancelled after head movement. An invalid Python-only feature invocation was corrected to include mandatory lang-rust; it establishes no behavioral failure. Full default-feature/CLI/corpus/precommit/hosted qualification are not independently established by this pass; PR-body claims and nonterminal hosted runs are not relabeled as passes.

Canonical-owner next action: repair or source-backed refute the unchanged-sibling whole-display shortcut on this existing branch, retaining the scalar changed-element and actual whole-output positives, then refresh only the affected exact-head classifier proof and review. No merge clearance is given.

@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 verification checks before upstream.

Verification questions

  • Confirm whole-token numeric matching rejects a changed value when the oracle contains a decimal-adjacent or alphanumeric-adjacent substring, but the numeric literal classification is permissive about Python syntax forms.
  • Confirm the new whole-token numeric matcher is deliberately conservative but may treat valid numeric literals with Python syntax not represented by the ASCII decimal/underscore/period subset as nonnumeric expressions.

Refuted

  • The PR's claimed execution proof is already available and clean.; refuted because: It is not available in the supplied.

Parked follow-ups

  • The multiline joiner is line-oriented and intentionally conservative; nested literal elements are not represented in the new corpus or unit controls.

Evidence gaps

  • The change adds corpus evidence for eight rule-10 cases, but the available packet does not include the late cargo-test receipt.
  • Model proof intent was rejected by deterministic validation.
  • Execution proof for the changed Rust behavior and corpus is not yet present in the packet; cargo-test is scheduled late and the RIPR sensor failed.
  • Focused Rust and corpus proof is claimed in the PR body, but the ripr sensor failed and cargo-test was still scheduled, so the advertised 1333-pass and 253-case results are not independently present in the supplied receipts.
  • The failed ripr sensor is trust-affecting and leaves the PR's central proof claim independently unverified in this packet.

… to a result; numbers inside strings are not values (#10210)

A display that reads other data, or a literal-only left operand, no longer
supplies whole-collection credit for a changed element.

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

Copy link
Copy Markdown
Member Author

Addressed the P1 from the two REPAIR_REQUIRED reviews at 6ca9fbc4 (merge of main is d8f82e04, now first parent).

P1 (whole-display shortcut credits unchanged siblings): confirmed and fixed. == [/== { anywhere in the oracle no longer returns credit. oracle_compares_whole_collection requires a display that holds only literals (no call, subscript or .get of other data) and a left operand that is not itself a literal wrapper like list((10,)). Unit tests cover both reported oracles (list((10,)) == [labels()['low']], list((10,)) == [labels()[1]]), plus a full-classifier test on actual multi-line functions: both are no longer exposed, and assert labels() == {'high': 80, 'low': 10} stays exposed.

P2 (number inside a quoted string): the second review shows it already classifies weakly_exposed through the full path, so it was not a blocker. The matcher now also rejects a number inside a quoted string, with unit tests; signed-number and one-line positives are unchanged.

Proof on this head: cargo test -p ripr --lib python 1381 passed, verdict-corpus check --language python 253 cases / 0 false verdicts / no row drift, cargo xtask precommit clean. Re-applying merge-ready for qualification of this head. The github-actions review's open points: decimal/underscore literal forms outside the ASCII subset fall back to the existing substring path (conservative), and nested multi-line elements are rejected by the joiner (parked, not credited).


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Ripr Rust Small Result failed on 6ca9fbc4 at xtask goldens check: fixture rust_qualified_foreign_receiver [human-full.txt] drifted (formatting-only, 19 lines, a Next: line). This PR touches only the Python analyzer and Python corpus, and cargo xtask goldens check passes locally on this branch, so the drift came from the test-merge with main at that moment. I merged current main (e0919a9b) and re-applied merge-ready for one re-run; if the same golden fails again I will root-cause it rather than re-run.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

The second Ripr Rust Small Result failure (e0919a9b) is not this PR's: goldens check reports 14 human-full.txt fixtures (13 Python plus rust_qualified_foreign_receiver) missing the RIPR-SPEC-0319 Next: lines, and the same 14 drift on unmodified main (8d5d0d01). The fix of record is #10273 (re-bless of exactly those 14, tracked in #10272). I ported it by cherry-picking its single commit (75fb3984), which no-ops once main carries it, and re-applied merge-ready. This PR changes no golden output itself.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 75fb3984), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 4 potential issues.

Devin Review

… literals; graduate two false promotions to the honesty corpus (#10210)

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

@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 one verification check before upstream.

Verification questions

  • Confirm whole-token numeric matching is conservative and does not recognize several valid Python numeric literal forms.

Parked follow-ups

  • The multiline literal joiner remains line-oriented and does not represent nested literal elements.
  • The numeric whole-token matcher intentionally recognizes only a narrow ASCII decimal/underscore/period syntax subset; other numeric spellings retain fallback expression matching.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • Current execution evidence for the changed Rust classifier and new corpus is not present in the supplied packet.

Copy link
Copy Markdown
Member Author

Review of record, head 4a99db4e8d2a5c0d2271fa4d123d71363f9df6c4

Required CI: Ripr Rust Small Result success on this head (run 40178436842), plus Rust gates, Windows subset, Rust-only lane, wheel and uv/pip journeys green. Review providers CodeRabbit and Gemini hit quota and gave no review; they are treated as missing, not clean.

Angles

  • Correctness / edge cases: read enclosing_literal_pair (joiner), oracle_compares_whole_collection, oracle_contains_value_literal and the two gate wirings. Edge cases exercised: call-argument and non-bound brackets, mismatched closers, comments anywhere in the literal, tuple displays, literal-wrapper left operands, negative numbers, numbers inside quoted strings, one-line compatibility.
  • Tests / regressions: cargo test -p ripr --lib python 1389 passed (positive and discriminating negative controls at helper and full-classifier level, including row-miss). Python verdict corpus 253 cases, 0 false verdicts, spec examples 57/57, no existing row moved.
  • Spec / contract: RIPR-SPEC-0238 rule 10 states whole-token matching and the compared-operand requirement; this PR adds the multi-line sentence. Fail-closed direction only: every new condition removes credit or declines to join, never adds credit.
  • Honesty: two confirmed false promotions graduated to the evidence-promotion honesty corpus; check-evidence-promotion-honesty passes.

Findings and resolutions

  • Steven (P1): whole-display shortcut credited unchanged siblings. Fixed, full-classifier test added. (P2 numeric-in-quoted-string: already weakly_exposed end to end; matcher also tightened.)
  • Devin: tuple display lost credit (fixed), comment commas shift indices (fixed by declining), row misses lacked the literal pair (fixed), honesty corpus missing (added). All four threads replied and resolved.
  • github-actions review points (permissive numeric syntax, nested multi-line elements): parked; both fall back to the previous behavior, no new credit. Unaffected by this PR.

Not claimed: nested multi-line literal elements, runtime mutation outcomes.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit b649184 into main Oct 25, 2026
60 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/py-next-row branch October 25, 2026 09:49
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