Repository navigation
Description
Parent: #3215
Depends on: #3294
Follows limitation vocabulary: #3271
Problem
After a changed binding is connected to its predicate use, the #3215 reproducer still cannot become satisfiable unless RIPR can conservatively evaluate the short deterministic operation chain that produces the operand values.
The first required family is common parser/lexer string and index code driven by literal test inputs:
let start = delim.chars().next().map_or(0, |c| c.len_utf8());
let end = input.rfind(delim).map_or(0, |idx| idx);
if end == start { ... }Today #3271 can name this as rust_value_propagation_unresolved, but exact inputs such as input = "abc", delim = "" do not produce exact values at the predicate. The analyzer therefore cannot distinguish existing proof from missing proof.
Required outcome
Add a bounded, typed, conservative value-transfer layer for exact literal inputs and a controlled set of deterministic Rust/std operations. The evaluator is an evidence producer, not a general interpreter.
V1 operation families
str::strip_prefix / strip_suffix
str::find / rfind
str::starts_with / ends_with / contains
str::len
chars().next() / next_back()
char::len_utf8
Option::map_or with literal default and a supported pure closure
checked_add / checked_sub on exact integer inputs
bounded string slicing from exact resolved indices when UTF-8 boundaries are established
literal-driven simple string match arms
Each operation result is one of:
exact(value, provenance)
not_applicable
unsupported(kind, earliest_edge)
ambiguous(reason)
invalid_boundary(reason)
Unknown must remain unknown. No operation may become exact from token resemblance, an oracle expectation, or a successful runtime test.
Evidence contract
For every exact value retain:
source test/input identity
input literal and type
operation family
receiver/arguments
closure/default where applicable
result value
source spans
bounded chain depth
The test oracle remains separate. Exact input evaluation may establish activation/infection evidence; the exact assertion establishes observation/discrimination only when it targets the same sink.
Fix plan
- Introduce one typed value-transfer interface shared by the supported operation families.
- Evaluate only pure, deterministic expressions whose inputs are exact and whose semantics are implemented explicitly.
- Bound chain length and collection/string size; disclose the limit rather than silently stopping.
- Preserve UTF-8 boundary semantics for slicing and
len_utf8. - Handle
Option::map_oronly when both the default and the mapped closure are supported; keepmap_or_else, arbitrary closures, member lookalikes, and trait-overridden methods unsupported. - Feed exact results into analysis(rust): propagate changed bindings into same-function predicate operands (#3215 P2) #3294's predicate operands and existing activation/missing-discriminator models.
- Keep sibling-field and wrong-sink strong assertions as negative controls.
- Add per-family removal experiments or a table-driven discriminator showing each family changes at least one expected result and cannot be replaced by a constant.
Required fixtures
- the
rfind/chars.next/len_utf8empty-delimiter equality boundary; - positive and negative
strip_prefix/strip_suffixpaths; findandrfindwith present, absent, empty, and multi-byte needles;starts_with/ends_with/containstrue and false controls;next/next_backon empty, ASCII, and multi-byte strings;- checked arithmetic success and overflow/underflow;
- valid and invalid UTF-8 slicing boundaries;
- literal string
matcharms plus wildcard and duplicate-text controls; map_or_else, custom methods with the same names, dynamic inputs, mutable captures, and unsupported closures as fail-closed negatives.
Acceptance
- The source
ripr#1429equality-boundary fixture resolvesstart,end, andend == startfor exact supported inputs. - Positive and negative tests can establish distinct predicate outcomes without a fabricated value.
- Every supported operation emits typed provenance and every unsupported edge names the earliest operation.
- Multi-byte UTF-8 cases preserve character/byte semantics.
-
map_or_else, lookalike methods, dynamic receivers, unsupported closures, overflow, and invalid slicing remain limited. - A strong assertion on the wrong sink does not credit discrimination.
- Existing exact tests can move a supported seam out of
rust_value_propagation_unresolved; missing boundary inputs still produce a concrete missing discriminator. - CLI, JSON, LSP explanation, and gap-ledger evidence agree on exact versus limited value state.
- Removal/discriminator experiments fail when any claimed family is neutered.
Verification
cargo test -p ripr --lib analysis::value -- --nocapture
cargo test -p ripr --lib analysis::activation -- --nocapture
cargo test -p ripr --lib analysis::classifier -- --nocapture
cargo xtask fixtures
cargo xtask goldens check
cargo xtask check-output-contracts
cargo xtask check-static-language
cargo xtask check-evidence-promotion-honesty
cargo xtask check-pr
git diff --check
Non-goals
- No arbitrary const evaluation, allocation modeling, regex, Unicode normalization, trait dispatch, mutation execution, runtime receipt promotion, or general symbolic execution.
- No cross-function helper transfer; analysis(rust): preserve exact evidence through bounded helper and scanner paths (#3215 P4) #3296 owns that step.
- No assumption that exact activation alone proves adequacy.
Claim boundary
Completion resolves a bounded set of deterministic std string/index expressions from exact test inputs and feeds those values into the exact predicate relation. It does not prove arbitrary Rust value flow or helper-chain semantics.
Activity
coderabbitai commentedon Aug 16, 2026
🔗 Related PRs
#3193 - test(fixtures): isolate unchanged proof identity [merged]
#3203 - test(gate): reject vacuous non-promotion charters [merged]
#3243 - analysis(classify): whitespace-stable wildcard-discard detection (
#3233) [merged]#3271 - feat(analysis): name bounded Rust value propagation limits [merged]
#3273 - fix(rust): classify cfg(test) helpers as evidence [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
fix(analysis): exact escape grammar and operand-resolution hardening …
fix(analysis): quote-aware splitting, per-probe operand resolution, f…
fix(analysis): exact-operand comparison honesty and oracle-backed fix…
feat(analysis): resolve bounded std operations from exact test inputs (…
feat(analysis): preserve exact evidence through bounded helper chains (…
docs(output): cross-reference the per-value provenance field from the…
feat(output): surface computed-value provenance in JSON observed valu…
feat(analysis): bounded literal match-arm transfer across the helper …
fix(analysis): resolve alternative, escaped and char match arms and l…
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards
feat(analysis): evaluate exactly resolvable match guards (RIPR-SPEC-0…