From f89bc66c0c1fd761014ebb5ec16140034254fb35 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 03:41:47 +0000 Subject: [PATCH 1/3] analysis(rust): preserve public-parent helper witness across module extraction (#4681) Extend helper-owner delegation for ordinary child modules and same-file nested helpers, scan function bodies in their executable braced region, and fold exact-value contradictions through a unique public parent that calls the private helper. Add module_extraction_public_parent acceptance tests. Proof: cargo xtask precommit; cargo test -p ripr --lib module_extraction_public. Co-authored-by: Steven Zimmerman, CPA --- .ripr/allow-attributes.txt | 1 + .../related_tests/context.rs | 266 +++++++++++++++++- .../src/analysis/test_grip_evidence/tests.rs | 1 + .../tests/module_extraction_public_parent.rs | 218 ++++++++++++++ .../test_grip_evidence/value_contradiction.rs | 210 ++++++++++++-- 5 files changed, 675 insertions(+), 21 deletions(-) create mode 100644 crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs diff --git a/.ripr/allow-attributes.txt b/.ripr/allow-attributes.txt index 69483edb6ae..c0ad34807db 100644 --- a/.ripr/allow-attributes.txt +++ b/.ripr/allow-attributes.txt @@ -46,3 +46,4 @@ crates/ripr/src/cli/progress.rs|expect(dead_code)|1|#9501: `cfg_attr(not(test), crates/ripr/src/edit_cage/mod.rs|expect(dead_code)|1|#9501: `cfg_attr(not(test), expect(dead_code))` on the explicit-module capture API and authority fields beyond the attempt binding, exercised by tests only. crates/ripr/src/lib.rs|expect(dead_code)|2|#9501: two `cfg_attr(not(test), expect(dead_code))` on staged internal contracts: #3163 connects the RepairAttempt delta producer and #2657 the first producer, each before public projection. xtask/src/rust_region_scan.rs|allow(dead_code)|1|#9501: `cfg_attr` text inside a fixture literal or doc example (not a live suppression); newly inventoried because the scanner reads attribute text anywhere. Remove this row if the literals are removed. +crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs|allow(dead_code)|1|#4681: `exact_value_assertion_verdict` is the bare shadow-aware oracle entry exercised from this module's unit tests; production paths use `exact_value_assertion_verdict_for_test` with index-aware public-parent delegation. diff --git a/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs b/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs index d4c437f7c8f..4906df9aaa4 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs @@ -1,4 +1,5 @@ use super::*; +use crate::analysis::facts::{ModulePathTarget, SourceRoleProvenanceEdgeKind}; use crate::analysis::syntax::parse_clean_source_file; use crate::analysis::test_grip_evidence::owner_result_binding::ParsedTestFile; use crate::analysis::test_grip_evidence::shared_grips::SharedGrips; @@ -1620,6 +1621,214 @@ pub(in crate::analysis::test_grip_evidence) struct HelperOwnerCallsByFilePair { pub(in crate::analysis::test_grip_evidence) free_spelling: HelperOwnerCallsByFile, } +/// Direct production delegation into an ordinary child module (#4681). The +/// public parent may call `child::helper()` while tests keep calling the +/// parent entrypoint; only resolved default `mod` edges qualify. +pub(in crate::analysis::test_grip_evidence) fn ordinary_module_delegation_owner_calls( + function: &FunctionSummary, + index: &RustIndex, + owners_by_package_and_module: &OwnerNamesByPackageAndModulePath, +) -> BTreeSet { + if function.source_role.is_evidence_role() || rust_index::is_test_file(&function.file) { + return BTreeSet::new(); + } + let Some(package) = package_scope(&function.file) else { + return BTreeSet::new(); + }; + let Some(file_facts) = index.files().get(&function.file) else { + return BTreeSet::new(); + }; + if file_facts + .role_provenance + .earliest_unresolved_reason + .is_some() + || file_facts.role_provenance.outside_module_tree + { + return BTreeSet::new(); + } + let Some(package_modules) = owners_by_package_and_module.get(&package) else { + return BTreeSet::new(); + }; + let parent_module_path = super::module_path_for_index(index, &function.file) + .unwrap_or_default() + .replace('/', "::"); + let body = strip_comments_and_strings(&function.body); + let mut delegated = BTreeSet::new(); + for declaration in &file_facts.module_declarations { + if declaration.requires_test || declaration.path_target == ModulePathTarget::Unknown { + continue; + } + if declaration.path_target != ModulePathTarget::Default { + continue; + } + let candidate_module_paths = child_module_paths_for_ordinary_declaration( + index, + &function.file, + &parent_module_path, + declaration, + &file_facts, + package_modules, + ); + let mut owner_names = + production_owner_names_in_modules(package_modules, &candidate_module_paths); + for candidate in index.functions() { + if candidate.file == function.file + && candidate + .id + .0 + .ends_with(&format!("::{}::{}", declaration.name, candidate.name)) + { + owner_names.insert(candidate.name.clone()); + } + } + for owner_name in owner_names { + if !owner_token_is_specific_enough(&owner_name.to_ascii_lowercase()) { + continue; + } + if !code_contains_qualified_helper_call(&body, &declaration.name, &owner_name) { + continue; + } + let matching_modules = candidate_module_paths + .iter() + .filter(|module_path| { + package_modules + .get(*module_path) + .is_some_and(|names| names.contains(&owner_name)) + }) + .count(); + let inline_child_owner = index.functions().iter().any(|candidate| { + candidate.file == function.file + && candidate.name == owner_name + && candidate + .id + .0 + .ends_with(&format!("::{}::{owner_name}", declaration.name)) + }); + let total_matches = matching_modules + usize::from(inline_child_owner); + if total_matches != 1 { + continue; + } + delegated.insert(owner_name); + } + } + delegated +} + +fn same_file_nested_module_delegation_owner_calls( + function: &FunctionSummary, + index: &RustIndex, +) -> BTreeSet { + if function.source_role.is_evidence_role() || rust_index::is_test_file(&function.file) { + return BTreeSet::new(); + } + let body = strip_comments_and_strings(&function.body); + let file_prefix = format!("{}::", function.file.display()); + let mut by_module: BTreeMap> = BTreeMap::new(); + for candidate in index.functions() { + if candidate.file != function.file { + continue; + } + let Some(rest) = candidate.id.0.strip_prefix(&file_prefix) else { + continue; + }; + let Some((module_name, _)) = rest.split_once("::") else { + continue; + }; + if !owner_token_is_specific_enough(&candidate.name.to_ascii_lowercase()) { + continue; + } + if !code_contains_qualified_helper_call(&body, module_name, &candidate.name) { + continue; + } + by_module + .entry(module_name.to_string()) + .or_default() + .insert(candidate.name.clone()); + } + let mut delegated = BTreeSet::new(); + for owners in by_module.values() { + if owners.len() == 1 { + delegated.extend(owners.iter().cloned()); + } + } + let mut bare_sibling = BTreeSet::new(); + for candidate in index.functions() { + if candidate.file != function.file { + continue; + } + let Some(rest) = candidate.id.0.strip_prefix(&file_prefix) else { + continue; + }; + if rest.contains("::") { + continue; + } + if !owner_token_is_specific_enough(&candidate.name.to_ascii_lowercase()) { + continue; + } + if call_text_routes_directly_to_named_call(&function.body, &candidate.name) { + bare_sibling.insert(candidate.name.clone()); + } + } + if bare_sibling.len() == 1 { + delegated.extend(bare_sibling); + } + delegated +} + +fn production_owner_names_in_modules( + package_modules: &BTreeMap>, + module_paths: &[String], +) -> BTreeSet { + module_paths + .iter() + .flat_map(|module_path| { + package_modules + .get(module_path) + .into_iter() + .flatten() + .cloned() + }) + .collect() +} + +fn child_module_paths_for_ordinary_declaration( + index: &RustIndex, + parent_file: &std::path::Path, + parent_module_path: &str, + declaration: &crate::analysis::facts::ModuleDeclarationFact, + file_facts: &crate::analysis::facts::FileFactsView<'_>, + package_modules: &BTreeMap>, +) -> Vec { + let mut paths = Vec::new(); + for edge in &file_facts.role_provenance.edges { + if edge.kind != SourceRoleProvenanceEdgeKind::Module + || edge.parent != parent_file + || edge.line != declaration.line + { + continue; + } + let Some(child_path) = super::module_path_for_index(index, &edge.child) else { + continue; + }; + paths.push(child_path.replace('/', "::")); + } + if paths.is_empty() { + for candidate in [ + declaration.name.clone(), + if parent_module_path.is_empty() { + declaration.name.clone() + } else { + format!("{parent_module_path}::{}", declaration.name) + }, + ] { + if package_modules.contains_key(&candidate) && !paths.contains(&candidate) { + paths.push(candidate); + } + } + } + paths +} + pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_fanout( index: &RustIndex, shared: &SharedIndexTables, @@ -1632,6 +1841,7 @@ pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_f direct_function_import_aliases_by_file, unambiguous_production_owner_names_by_package, owner_names_by_module_path, + owner_names_by_package_and_module_path, production_owner_names, .. } = shared; @@ -1669,7 +1879,7 @@ pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_f external_owner_names, allow_fanout_wrappers, )) - && call_text_contains_named_call(&call.text, &call.name) + && call_text_contains_named_call(&function.body, &call.name) }) .map(|call| call.name.clone()) .collect::>(); @@ -1691,6 +1901,17 @@ pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_f // evidence the call text itself cannot show (#6713 review). free_owner_calls.extend(imported_owner_calls); } + let module_delegation = ordinary_module_delegation_owner_calls( + function, + index, + owner_names_by_package_and_module_path, + ); + let nested_module_delegation = + same_file_nested_module_delegation_owner_calls(function, index); + owner_calls.extend(module_delegation.iter().cloned()); + owner_calls.extend(nested_module_delegation.iter().cloned()); + free_owner_calls.extend(module_delegation); + free_owner_calls.extend(nested_module_delegation); if owner_calls.is_empty() { continue; } @@ -3034,7 +3255,7 @@ pub(in crate::analysis::test_grip_evidence) fn helper_directly_delegates_to_spec let owner_name_lower = call.name.to_ascii_lowercase(); if !owner_token_is_specific_enough(&owner_name_lower) || !supported_helper_owner_call_name(&call.name, local_function_names, external_owner_names) - || !call_text_routes_directly_to_named_call(&call.text, &call.name) + || !call_text_routes_directly_to_named_call(&function.body, &call.name) { return false; } @@ -3050,14 +3271,14 @@ pub(in crate::analysis::test_grip_evidence) fn helper_directly_delegates_to_spec &candidate.name, local_function_names, external_owner_names, - ) && call_text_contains_named_call(&candidate.text, &candidate.name) + ) && call_text_contains_named_call(&function.body, &candidate.name) && owner_token_is_specific_enough(&candidate.name.to_ascii_lowercase()) { direct_local_owner_call_names.insert(candidate.name.clone()); delegates_to_call |= candidate.name == call.name - && candidate.line == call.line - && candidate.text == call.text; + && call_text_routes_directly_to_named_call(&function.body, &call.name); } else if candidate.line == call.line + && call_text_routes_directly_to_named_call(&function.body, &candidate.name) && !direct_delegate_extra_call_is_allowed(candidate, call) { has_disallowed_extra_call = true; @@ -3074,13 +3295,48 @@ pub(in crate::analysis::test_grip_evidence) fn helper_directly_delegates_to_spec owner_call_is_unique_or_same_file_fanout && delegates_to_call && !has_disallowed_extra_call } +/// When the indexed body still carries its item header (`fn name(...) { ... }`), +/// delegate/call detection must scan only the braced block. Otherwise the +/// signature prefix poisons `direct_call_prefix_is_allowed` for calls inside +/// `{ ... }` (#4681). +fn function_item_executable_region(text: &str) -> &str { + let trimmed = text.trim_start(); + if !(trimmed.starts_with("fn ") + || trimmed.starts_with("pub fn ") + || trimmed.starts_with("pub(crate) fn ") + || trimmed.starts_with("pub(super) fn ") + || trimmed.starts_with("async fn ") + || trimmed.starts_with("const fn ") + || trimmed.starts_with("pub async fn ") + || trimmed.starts_with("pub(crate) async fn ") + || trimmed.starts_with("pub(super) async fn ")) + { + return text; + } + trimmed.find('{').map_or(text, |open| &trimmed[open..]) +} + pub(in crate::analysis::test_grip_evidence) fn call_text_routes_directly_to_named_call( text: &str, name: &str, +) -> bool { + call_text_contains_executable_named_call(function_item_executable_region(text), name) +} + +pub(in crate::analysis::test_grip_evidence) fn call_text_contains_executable_named_call( + text: &str, + name: &str, ) -> bool { let cleaned = strip_comments_and_strings(text); cleaned.match_indices(name).any(|(start, _)| { let before = cleaned[..start].trim_end(); + if before.ends_with("fn") + || before.ends_with("pub fn") + || before.ends_with("async fn") + || before.ends_with("const fn") + { + return false; + } let after = &cleaned[start + name.len()..]; let named_call = after.starts_with("::") || after.trim_start().starts_with('('); if !named_call { diff --git a/crates/ripr/src/analysis/test_grip_evidence/tests.rs b/crates/ripr/src/analysis/test_grip_evidence/tests.rs index abef428273b..4a511e64635 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/tests.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/tests.rs @@ -1,5 +1,6 @@ mod boolean_owner_pin; mod module_extraction; +mod module_extraction_public_parent; mod shared_execution_context; mod warm_entrypoint; diff --git a/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs new file mode 100644 index 00000000000..1d97d3d6ef6 --- /dev/null +++ b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs @@ -0,0 +1,218 @@ +//! #4681: public parent entrypoint delegates to a private helper; tests call the parent. + +use super::*; +use crate::analysis::facts::build_index; +use std::fs; +use std::path::PathBuf; + +#[derive(Clone, Copy, Debug)] +enum HelperPlacement { + ParentInline, + InlineChild, + FileChild, +} + +const HELPER_PLACEMENTS: [HelperPlacement; 3] = [ + HelperPlacement::FileChild, + HelperPlacement::InlineChild, + HelperPlacement::ParentInline, +]; + +fn public_parent_fixture( + placement: HelperPlacement, + helper_value: i32, + wrong_sibling: bool, + test_calls_wrapper: bool, +) -> Result<(AuthorityFixtureRoot, RustIndex, RepoSeam), String> { + let root = claim_index_fixture_root(4681)?; + fs::create_dir_all(root.join("src")).map_err(|error| error.to_string())?; + fs::write( + root.join("Cargo.toml"), + "[package]\nname = \"public-parent-fixture\"\nversion = \"0.1.0\"\nedition = \"2024\"\n", + ) + .map_err(|error| error.to_string())?; + + let helper_body = format!("fn compute_value() -> i32 {{ {helper_value} }}\n"); + let (lib_extra, helper_call, owner_file, expected_owner) = match placement { + HelperPlacement::ParentInline => ( + helper_body.clone(), + "compute_value()", + "src/lib.rs", + "src/lib.rs::compute_value", + ), + HelperPlacement::InlineChild => ( + format!("mod child {{\n{helper_body}}}"), + "child::compute_value()", + "src/lib.rs", + "src/lib.rs::child::compute_value", + ), + HelperPlacement::FileChild => { + fs::write(root.join("src/child.rs"), helper_body).map_err(|error| error.to_string())?; + ( + "mod child;\n".to_string(), + "child::compute_value()", + "src/child.rs", + "src/child.rs::compute_value", + ) + } + }; + + let sibling = if wrong_sibling { + "mod rival { pub(super) fn compute_value() -> i32 { 99 } }\n" + } else { + "" + }; + let test_call = if test_calls_wrapper { + "assert_eq!(super::entry(), 9);" + } else { + "assert_eq!(super::rival::compute_value(), 99);" + }; + + let lib = format!( + "{lib_extra}{sibling}\ +pub fn entry() -> i32 {{ {helper_call} }}\n\ +#[cfg(test)] mod tests {{\n\ +#[test]\nfn observes_public_parent() {{ {test_call} }}\n\ +}}\n" + ); + fs::write(root.join("src/lib.rs"), lib).map_err(|error| error.to_string())?; + + let mut files = vec![PathBuf::from("src/lib.rs")]; + if matches!(placement, HelperPlacement::FileChild) { + files.push(PathBuf::from("src/child.rs")); + } + let index = build_index(&root, &files)?; + assert_eq!(index.tests().len(), 1, "{placement:?}"); + let seams = inventory_seams_from_index(&[PathBuf::from(owner_file)], &index); + let selected = seams + .into_iter() + .filter(|seam| seam.kind() == SeamKind::ReturnValue && seam.owner() == expected_owner) + .collect::>(); + assert_eq!(selected.len(), 1, "{placement:?}: seams={selected:?}"); + Ok(( + root, + index, + selected + .into_iter() + .next() + .ok_or_else(|| format!("missing owner seam for {placement:?}"))?, + )) +} + +#[test] +fn module_extraction_public_parent_inline_and_file_child_keep_helper_witness() -> Result<(), String> +{ + let mut baseline = None; + for placement in HELPER_PLACEMENTS { + let (_root, index, seam) = public_parent_fixture(placement, 9, false, true)?; + let evidence = evidence_for_seam(&seam, &index); + assert_eq!( + evidence.related_tests.len(), + 1, + "{placement:?}: {evidence:?}" + ); + let related = &evidence.related_tests[0]; + assert_eq!(related.test_name, "observes_public_parent"); + assert_eq!( + related.relation_reason, + RelationReason::HelperOwnerCall, + "{placement:?}: {evidence:?}" + ); + assert_eq!( + evidence.reach.state, + StageState::Yes, + "{placement:?}: {evidence:?}" + ); + assert_eq!( + evidence.discriminate.state, + StageState::Yes, + "{placement:?}: {evidence:?}" + ); + let projection = semantic_projection_public_parent(&seam, &evidence); + if let Some(expected) = &baseline { + assert_eq!(&projection, expected, "{placement:?}: pure motion drift"); + } else { + baseline = Some(projection); + } + } + Ok(()) +} + +fn semantic_projection_public_parent( + seam: &RepoSeam, + evidence: &TestGripEvidence, +) -> serde_json::Value { + serde_json::json!({ + "owner_name": seam.owner().rsplit("::").next(), + "kind": seam.kind(), + "related_tests": evidence.related_tests.iter().map(|test| serde_json::json!({ + "name": test.test_name, + "reason": test.relation_reason, + })).collect::>(), + "reach": evidence.reach.state, + "discriminate": evidence.discriminate.state, + "contradictions": evidence.statically_contradicted_related_tests, + }) +} + +#[test] +fn module_extraction_public_parent_same_named_sibling_with_wrapper_call_stays_witness( +) -> Result<(), String> { + for placement in HELPER_PLACEMENTS { + let (_root, index, seam) = public_parent_fixture(placement, 9, true, true)?; + let evidence = evidence_for_seam(&seam, &index); + assert_eq!( + evidence.related_tests.len(), + 1, + "{placement:?}: {evidence:?}" + ); + assert_eq!( + evidence.related_tests[0].relation_reason, + RelationReason::HelperOwnerCall, + "{placement:?}: {evidence:?}" + ); + assert_eq!(evidence.reach.state, StageState::Yes, "{placement:?}"); + } + Ok(()) +} + +#[test] +fn module_extraction_public_parent_same_named_sibling_stays_unrelated() -> Result<(), String> { + for placement in HELPER_PLACEMENTS { + let (_root, index, seam) = public_parent_fixture(placement, 9, true, false)?; + let evidence = evidence_for_seam(&seam, &index); + assert!( + evidence + .related_tests + .iter() + .all(|test| test.relation_reason != RelationReason::HelperOwnerCall), + "{placement:?}: {evidence:?}" + ); + assert_ne!(evidence.reach.state, StageState::Yes, "{placement:?}"); + } + Ok(()) +} + +#[test] +fn module_extraction_public_parent_changed_value_keeps_discriminator() -> Result<(), String> { + for placement in HELPER_PLACEMENTS { + let (_baseline_root, baseline_index, baseline_seam) = + public_parent_fixture(placement, 9, false, true)?; + let baseline = evidence_for_seam(&baseline_seam, &baseline_index); + assert_eq!(baseline.discriminate.state, StageState::Yes); + let (_root, index, seam) = public_parent_fixture(placement, 10, false, true)?; + let evidence = evidence_for_seam(&seam, &index); + assert_eq!(evidence.statically_contradicted_related_tests, 1); + assert_ne!(evidence.discriminate.state, StageState::Yes); + } + Ok(()) +} + +#[test] +fn module_extraction_public_parent_controls() -> Result<(), String> { + module_extraction_public_parent_inline_and_file_child_keep_helper_witness()?; + module_extraction_public_parent_same_named_sibling_with_wrapper_call_stays_witness()?; + module_extraction_public_parent_same_named_sibling_stays_unrelated()?; + module_extraction_public_parent_changed_value_keeps_discriminator()?; + Ok(()) +} diff --git a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs index e8fada08bf3..a02d655b7e5 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs @@ -29,6 +29,7 @@ use crate::analysis::classify::oracle_owner_call_is_shadowed; use crate::analysis::extract::{equality_assertion_arguments, outer_assertion_condition}; +use crate::analysis::facts::RustIndex; use crate::analysis::facts::TestFact as TestSummary; use crate::analysis::facts::{FunctionSummary, SourceText}; use crate::analysis::rust_index::RustIndex; @@ -65,6 +66,10 @@ pub(super) enum ExactValueVerdict { /// body. `owner` is the seam's owning function; `oracle_text` is the /// assertion fact's text (for example /// `assert_eq!(discounted_total(5_000, 5_000), 5_000)`). +#[allow( + dead_code, + reason = "policy:allow-attributes value-contradiction-bare-entry (#4681)" +)] pub(super) fn exact_value_assertion_verdict( owner: Option<&FunctionSummary>, oracle_text: &str, @@ -76,7 +81,7 @@ pub(super) fn exact_value_assertion_verdict( // assertion never called. return ExactValueVerdict::NotEvaluable; } - verdict_in(owner, oracle_text, &BTreeMap::new()) + verdict_in(owner, oracle_text, &BTreeMap::new(), None) } /// [`exact_value_assertion_verdict`] for an assertion of `test`. An rstest @@ -93,15 +98,15 @@ pub(super) fn exact_value_assertion_verdict_for_test( ) -> ExactValueVerdict { let shadowed = owner.is_some_and(|owner| bare_owner_call_is_shadowed(test, owner, oracle_text, index)); - let Some(rows) = case_row_bindings(test) else { - return exact_value_assertion_verdict(owner, oracle_text, shadowed); - }; if shadowed { return ExactValueVerdict::NotEvaluable; } + let Some(rows) = case_row_bindings(test) else { + return verdict_in(owner, oracle_text, &BTreeMap::new(), Some(index)); + }; let mut verdict = ExactValueVerdict::Consistent; for row in &rows { - match verdict_in(owner, oracle_text, row) { + match verdict_in(owner, oracle_text, row, Some(index)) { contradicted @ ExactValueVerdict::Contradicted { .. } => return contradicted, ExactValueVerdict::NotEvaluable => verdict = ExactValueVerdict::NotEvaluable, ExactValueVerdict::Consistent => {} @@ -314,6 +319,7 @@ fn verdict_in( owner: Option<&FunctionSummary>, oracle_text: &str, environment: &BTreeMap, + index: Option<&RustIndex>, ) -> ExactValueVerdict { let Some(owner) = owner else { return ExactValueVerdict::NotEvaluable; @@ -324,20 +330,27 @@ fn verdict_in( let [actual, expected, ..] = arguments.as_slice() else { return ExactValueVerdict::NotEvaluable; }; - let Some(call_arguments) = owner_call_arguments(actual, &owner.name) else { - return ExactValueVerdict::NotEvaluable; - }; - let mut values = Vec::with_capacity(call_arguments.len()); - for argument in &call_arguments { - let Some(value) = fold_expression(argument, environment) else { + let actual_value = if let Some(call_arguments) = owner_call_arguments(actual, &owner.name) { + let mut values = Vec::with_capacity(call_arguments.len()); + for argument in &call_arguments { + let Some(value) = fold_expression(argument, environment) else { + return ExactValueVerdict::NotEvaluable; + }; + values.push(value); + } + let Some(actual_value) = fold_owner_call(owner, &values) else { return ExactValueVerdict::NotEvaluable; }; - values.push(value); - } - let Some(expected_value) = fold_expression(expected, environment) else { + actual_value + } else if let Some(index) = index { + let Some(actual_value) = fold_through_unique_public_parent(actual, owner, index) else { + return ExactValueVerdict::NotEvaluable; + }; + actual_value + } else { return ExactValueVerdict::NotEvaluable; }; - let Some(actual_value) = fold_owner_call(owner, &values) else { + let Some(expected_value) = fold_expression(expected, environment) else { return ExactValueVerdict::NotEvaluable; }; // `assert_eq!` fails at baseline exactly when the folded values differ; @@ -963,6 +976,154 @@ fn equality_assertion_shape_uncached(oracle_text: &str) -> Option<(bool, Vec Option { + let trimmed = operand.trim(); + let open = trimmed.find('(')?; + let head = trimmed[..open].trim(); + if !trimmed[open + 1..].contains(')') { + return None; + } + let mut depth = 0i32; + let mut close = None; + for (offset, byte) in trimmed.as_bytes()[open..].iter().enumerate() { + match byte { + b'(' => depth += 1, + b')' => { + depth -= 1; + if depth == 0 { + close = Some(open + offset); + break; + } + } + _ => {} + } + } + let close = close?; + if !trimmed[close + 1..].trim().is_empty() { + return None; + } + let name = head + .strip_prefix("super::") + .or_else(|| head.strip_prefix("self::")) + .or_else(|| head.strip_prefix("crate::")) + .unwrap_or(head); + if name.contains("::") || name.is_empty() { + return None; + } + Some(name.to_string()) +} + +fn parent_delegates_uniquely_to_owner(parent: &FunctionSummary, owner_name: &str) -> bool { + use super::related_tests::context::{ + call_text_routes_directly_to_named_call, owner_token_is_specific_enough, + }; + if parent.name == owner_name + || !call_text_routes_directly_to_named_call(&parent.body, owner_name) + { + return false; + } + let mut routed_owners = 0usize; + for call in &parent.calls { + if call.name == parent.name { + continue; + } + if !owner_token_is_specific_enough(&call.name.to_ascii_lowercase()) { + continue; + } + if call_text_routes_directly_to_named_call(&parent.body, &call.name) { + routed_owners += 1; + if call.name != owner_name { + return false; + } + } + } + routed_owners == 1 +} + +fn delegation_module_path_for_owner(owner: &FunctionSummary, index: &RustIndex) -> Option { + let file_prefix = format!("{}::", owner.file.display()); + if let Some(rest) = owner.id.0.strip_prefix(&file_prefix) + && let Some(module) = rest + .strip_suffix(&format!("::{}", owner.name)) + .filter(|module| !module.is_empty()) + { + return Some(module.replace('/', "::")); + } + super::related_tests::module_path_for_index(index, &owner.file) + .map(|path| path.replace('/', "::")) +} + +fn parent_uniquely_delegates_to_owner( + parent: &FunctionSummary, + owner: &FunctionSummary, + index: &RustIndex, +) -> bool { + use super::related_tests::context::{ + call_text_routes_directly_to_named_call, code_contains_qualified_helper_call, + owner_token_is_specific_enough, + }; + use super::related_tests::strip_comments_and_strings; + let body = strip_comments_and_strings(&parent.body); + let bare = parent_delegates_uniquely_to_owner(parent, &owner.name); + let qualified = delegation_module_path_for_owner(owner, index).is_some_and(|module_path| { + code_contains_qualified_helper_call(&body, &module_path, &owner.name) + && !index.functions().iter().any(|candidate| { + candidate.name == owner.name + && candidate.file != owner.file + && delegation_module_path_for_owner(candidate, index).is_some_and(|other| { + other != module_path + && code_contains_qualified_helper_call(&body, &other, &candidate.name) + }) + }) + }); + if bare && qualified { + return false; + } + if bare { + return true; + } + if !qualified { + return false; + } + for call in &parent.calls { + if call.name == parent.name || call.name == owner.name { + continue; + } + if owner_token_is_specific_enough(&call.name.to_ascii_lowercase()) + && call_text_routes_directly_to_named_call(&parent.body, &call.name) + { + return false; + } + } + true +} + +/// #4681: tests may observe a public parent while the seam sits on the +/// private helper it delegates to. Fail closed unless the parent is a +/// same-file production function with one direct routed call to the owner +/// and the owner folds with no forwarded arguments. +fn fold_through_unique_public_parent( + actual: &str, + owner: &FunctionSummary, + index: &RustIndex, +) -> Option { + let parent_name = public_parent_callee_name(actual)?; + if parent_name == owner.name { + return None; + } + let mut matching = index.functions().filter(|function| { + !function.source_role.is_evidence_role() && function.name == parent_name + }); + let parent = matching.next()?; + if matching.next().is_some() { + return None; + } + if !parent_uniquely_delegates_to_owner(parent, owner, index) { + return None; + } + fold_owner_call(owner, &[]) +} + fn owner_call_arguments(operand: &str, owner_name: &str) -> Option> { let trimmed = operand.trim(); let open = super::named_call_open_paren_index(trimmed, owner_name)?; @@ -1875,7 +2036,9 @@ fn fold_block( #[cfg(test)] mod tests { use super::*; + use crate::analysis::facts::FileFacts; use crate::analysis::rust_index::{RaRustSyntaxAdapter, RustSyntaxAdapter}; + use std::collections::BTreeMap; #[test] fn equality_shape_memo_returns_what_a_fresh_shape_would() { @@ -2466,11 +2629,26 @@ mod tests { .assertions .first() .ok_or("the rstest test carries its assertion")?; + let index = RustIndex::from_owned(crate::analysis::facts::OwnedRustIndex { + files: BTreeMap::from([( + std::path::PathBuf::from("src/lib.rs"), + FileFacts { + path: std::path::PathBuf::from("src/lib.rs"), + functions: facts.functions.clone(), + tests: facts.tests.clone(), + source: source.into(), + ..FileFacts::default() + }, + )]), + functions: facts.functions.clone(), + tests: facts.tests.clone(), + ..Default::default() + }); Ok(exact_value_assertion_verdict_for_test( Some(owner), &assertion.text, test, - &RustIndex::default(), + &index, )) }; assert_eq!( From da0da9cfae7ba3c044abd904e415ffe3b2c41d1e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 05:51:42 +0000 Subject: [PATCH 2/3] fix(#4681): disambiguate helper reach, resolve review threads, bless goldens - Same-file helper-name collision guard with qualified module delegation keys. - Index-aware public-parent value fold; module_extraction_public_parent rival control. - Re-bless affected RIPR-SPEC-0005 goldens for grip-graph side effects. - Devin review threads addressed on PR #12413 (replies + resolved). Co-authored-by: Steven Zimmerman, CPA --- .../test_grip_evidence/related_tests.rs | 90 ++++++--- .../related_tests/context.rs | 128 +++++++++++-- .../tests/module_extraction_public_parent.rs | 24 +++ .../test_grip_evidence/value_contradiction.rs | 7 +- .../expected/CHANGELOG.md | 12 ++ .../helper_chain_one_hop/expected/human.txt | 2 +- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 12 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 162 ++++++++-------- .../expected/human.txt | 40 ++-- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 162 ++++++++-------- .../expected/human.txt | 40 ++-- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 180 +++++++----------- .../expected/human.txt | 37 ++-- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 162 ++++++++-------- .../expected/human.txt | 40 ++-- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 102 +++++----- .../expected/human.txt | 37 ++-- .../expected/CHANGELOG.md | 12 ++ .../expected/check.json | 162 ++++++++-------- .../expected/human.txt | 37 ++-- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- .../expected/CHANGELOG.md | 13 ++ .../expected/human.txt | 2 +- 38 files changed, 930 insertions(+), 670 deletions(-) diff --git a/crates/ripr/src/analysis/test_grip_evidence/related_tests.rs b/crates/ripr/src/analysis/test_grip_evidence/related_tests.rs index 88c7bb29bca..56ef9b80cff 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/related_tests.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/related_tests.rs @@ -387,37 +387,75 @@ pub(super) fn match_helper_owner_call( if owner.name.is_empty() { return; } - // A free owner is reached through a helper only when the helper body - // spells a bare or module-qualified call of it; a helper calling only - // `Type::name(..)` never credits the free `name` beside it (#6713). - let indices = if owner.free_function { - context - .tests_by_free_helper_owner_call_name - .get(&owner.name) - } else { - context.tests_by_helper_owner_call_name.get(&owner.name) - }; - let Some(indices) = indices else { - return; - }; - for test_index in indices { - if owner.inherent_receiver - && !owner.inherent_owner.is_some_and(|function| { - context.inherent_helper_reaches_owner(*test_index, function) - }) - { + let mut lookup_names = vec![owner.name.clone()]; + if let Some(module_path) = &owner.module_path { + let normalized = module_path.replace('/', "::"); + if !normalized.is_empty() { + lookup_names.push(format!("{normalized}::{}", owner.name)); + } + } + let mut linked = BTreeSet::new(); + for lookup_name in &lookup_names { + let batch = if owner.free_function { + context + .tests_by_free_helper_owner_call_name + .get(lookup_name) + } else { + context.tests_by_helper_owner_call_name.get(lookup_name) + }; + let Some(batch) = batch else { continue; + }; + for &test_index in batch { + if linked.contains(&test_index) { + continue; + } + if owner.inherent_receiver + && !owner.inherent_owner.is_some_and(|function| { + context.inherent_helper_reaches_owner(test_index, function) + }) + { + continue; + } + if lookup_name == &owner.name + && owner.function.is_some_and(|owner_fn| { + owner_same_file_helper_name_collision(context.index, owner_fn) + && context.tests.get(test_index).is_none_or(|indexed| { + !context::production_delegation_from_test_reaches_owner( + context.index, + indexed.test, + owner_fn, + ) + }) + }) + { + continue; + } + linked.insert(test_index); + insert_related_candidate( + candidates, + context, + prefix, + test_index, + RelationReason::HelperOwnerCall, + ); } - insert_related_candidate( - candidates, - context, - prefix, - *test_index, - RelationReason::HelperOwnerCall, - ); } } +fn owner_same_file_helper_name_collision(index: &RustIndex, owner: &FunctionSummary) -> bool { + index + .functions() + .iter() + .filter(|function| { + function.file == owner.file + && function.name == owner.name + && !function.source_role.is_evidence_role() + }) + .count() + > 1 +} + pub(super) fn match_target_affinity_owner_call( candidates: &mut BTreeMap, seam: &RepoSeam, diff --git a/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs b/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs index 4906df9aaa4..7493dca691d 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs @@ -1652,7 +1652,7 @@ pub(in crate::analysis::test_grip_evidence) fn ordinary_module_delegation_owner_ let parent_module_path = super::module_path_for_index(index, &function.file) .unwrap_or_default() .replace('/', "::"); - let body = strip_comments_and_strings(&function.body); + let body = crate::analysis::extract::mask_comments_and_strings(&function.body); let mut delegated = BTreeSet::new(); for declaration in &file_facts.module_declarations { if declaration.requires_test || declaration.path_target == ModulePathTarget::Unknown { @@ -1708,26 +1708,46 @@ pub(in crate::analysis::test_grip_evidence) fn ordinary_module_delegation_owner_ if total_matches != 1 { continue; } - delegated.insert(owner_name); + let delegated_key = + if production_owner_name_is_unique_in_package(index, &package, &owner_name) { + owner_name + } else { + format!("{}::{owner_name}", declaration.name) + }; + delegated.insert(delegated_key); } } delegated } +fn production_owner_name_is_unique_in_package( + index: &RustIndex, + package: &str, + name: &str, +) -> bool { + index + .functions() + .iter() + .filter(|function| { + !function.source_role.is_evidence_role() + && function.name == name + && package_scope(&function.file).as_deref() == Some(package) + }) + .count() + == 1 +} + fn same_file_nested_module_delegation_owner_calls( function: &FunctionSummary, - index: &RustIndex, + same_file_functions: &[&FunctionSummary], ) -> BTreeSet { if function.source_role.is_evidence_role() || rust_index::is_test_file(&function.file) { return BTreeSet::new(); } - let body = strip_comments_and_strings(&function.body); + let body = crate::analysis::extract::mask_comments_and_strings(&function.body); let file_prefix = format!("{}::", function.file.display()); let mut by_module: BTreeMap> = BTreeMap::new(); - for candidate in index.functions() { - if candidate.file != function.file { - continue; - } + for candidate in same_file_functions { let Some(rest) = candidate.id.0.strip_prefix(&file_prefix) else { continue; }; @@ -1752,10 +1772,7 @@ fn same_file_nested_module_delegation_owner_calls( } } let mut bare_sibling = BTreeSet::new(); - for candidate in index.functions() { - if candidate.file != function.file { - continue; - } + for candidate in same_file_functions { let Some(rest) = candidate.id.0.strip_prefix(&file_prefix) else { continue; }; @@ -1775,6 +1792,75 @@ fn same_file_nested_module_delegation_owner_calls( delegated } +/// When several production owners share a bare name, helper-owner reach must +/// follow a production helper the test calls into a delegation edge that +/// resolves to this owner (#4681 review). +pub(in crate::analysis::test_grip_evidence) fn production_delegation_from_test_reaches_owner( + index: &RustIndex, + test: &TestSummary, + owner_fn: &FunctionSummary, +) -> bool { + let owner_module = owner_delegation_module_path(index, owner_fn); + for call in &test.calls { + let cleaned_call = strip_comments_and_strings(&call.text); + if !call_text_contains_named_call(&cleaned_call, &call.name) { + continue; + } + for callee in index.functions() { + if callee.name != call.name || callee.source_role.is_evidence_role() { + continue; + } + if package_scope(&test.file) != package_scope(&callee.file) { + continue; + } + let body = crate::analysis::extract::mask_comments_and_strings(&callee.body); + if let Some(module) = owner_module.as_deref().filter(|module| !module.is_empty()) { + if code_contains_qualified_helper_call(&body, module, &owner_fn.name) + || callee_delegates_to_owner_in_same_module(callee, owner_fn) + { + return true; + } + continue; + } + if callee.file == owner_fn.file + && call_text_routes_directly_to_named_call(&callee.body, &owner_fn.name) + { + return true; + } + } + } + false +} + +fn callee_delegates_to_owner_in_same_module( + callee: &FunctionSummary, + owner: &FunctionSummary, +) -> bool { + if callee.file != owner.file { + return false; + } + if !call_text_routes_directly_to_named_call(&callee.body, &owner.name) { + return false; + } + let Some(owner_scope) = owner.id.0.strip_suffix(&format!("::{}", owner.name)) else { + return false; + }; + if owner_scope.is_empty() { + return true; + } + callee.id.0.starts_with(&format!("{owner_scope}::")) || callee.id.0 == owner_scope +} + +fn owner_delegation_module_path(index: &RustIndex, owner: &FunctionSummary) -> Option { + let file_prefix = format!("{}::", owner.file.display()); + if let Some(rest) = owner.id.0.strip_prefix(&file_prefix) + && let Some((module, _)) = rest.split_once("::") + { + return Some(module.to_string()); + } + super::module_path_for_index(index, &owner.file).map(|path| path.replace('/', "::")) +} + fn production_owner_names_in_modules( package_modules: &BTreeMap>, module_paths: &[String], @@ -1846,6 +1932,13 @@ pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_f .. } = shared; let actual_tests = actual_test_keys(index); + let mut functions_by_file: BTreeMap> = BTreeMap::new(); + for function in index.functions() { + functions_by_file + .entry(function.file.clone()) + .or_default() + .push(function); + } for function in index.functions().iter().filter(|function| { !actual_tests.contains(&ActualTestKey { file: &function.file, @@ -1906,8 +1999,13 @@ pub(in crate::analysis::test_grip_evidence) fn helper_owner_calls_by_file_with_f index, owner_names_by_package_and_module_path, ); - let nested_module_delegation = - same_file_nested_module_delegation_owner_calls(function, index); + let nested_module_delegation = same_file_nested_module_delegation_owner_calls( + function, + functions_by_file + .get(&function.file) + .map(|functions| functions.as_slice()) + .unwrap_or(&[]), + ); owner_calls.extend(module_delegation.iter().cloned()); owner_calls.extend(nested_module_delegation.iter().cloned()); free_owner_calls.extend(module_delegation); @@ -3299,7 +3397,7 @@ pub(in crate::analysis::test_grip_evidence) fn helper_directly_delegates_to_spec /// delegate/call detection must scan only the braced block. Otherwise the /// signature prefix poisons `direct_call_prefix_is_allowed` for calls inside /// `{ ... }` (#4681). -fn function_item_executable_region(text: &str) -> &str { +pub(in crate::analysis::test_grip_evidence) fn function_item_executable_region(text: &str) -> &str { let trimmed = text.trim_start(); if !(trimmed.starts_with("fn ") || trimmed.starts_with("pub fn ") diff --git a/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs index 1d97d3d6ef6..01e0000cd0b 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs @@ -208,6 +208,30 @@ fn module_extraction_public_parent_changed_value_keeps_discriminator() -> Result Ok(()) } +#[test] +fn module_extraction_public_parent_rival_seam_stays_unrelated_when_test_calls_entry() +-> Result<(), String> { + for placement in HELPER_PLACEMENTS { + let (_root, index, _) = public_parent_fixture(placement, 9, true, true)?; + let rival_owner = "src/lib.rs::rival::compute_value"; + let seams = inventory_seams_from_index(&[PathBuf::from("src/lib.rs")], &index); + let rival = seams + .into_iter() + .find(|seam| seam.owner() == rival_owner) + .ok_or_else(|| format!("missing rival seam for {placement:?}"))?; + let evidence = evidence_for_seam(&rival, &index); + assert!( + evidence + .related_tests + .iter() + .all(|test| test.relation_reason != RelationReason::HelperOwnerCall), + "{placement:?}: {evidence:?}" + ); + assert_ne!(evidence.reach.state, StageState::Yes, "{placement:?}"); + } + Ok(()) +} + #[test] fn module_extraction_public_parent_controls() -> Result<(), String> { module_extraction_public_parent_inline_and_file_child_keep_helper_witness()?; diff --git a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs index a02d655b7e5..17ab628a1c6 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs @@ -1062,8 +1062,7 @@ fn parent_uniquely_delegates_to_owner( call_text_routes_directly_to_named_call, code_contains_qualified_helper_call, owner_token_is_specific_enough, }; - use super::related_tests::strip_comments_and_strings; - let body = strip_comments_and_strings(&parent.body); + let body = crate::analysis::extract::mask_comments_and_strings(&parent.body); let bare = parent_delegates_uniquely_to_owner(parent, &owner.name); let qualified = delegation_module_path_for_owner(owner, index).is_some_and(|module_path| { code_contains_qualified_helper_call(&body, &module_path, &owner.name) @@ -1098,10 +1097,6 @@ fn parent_uniquely_delegates_to_owner( true } -/// #4681: tests may observe a public parent while the seam sits on the -/// private helper it delegates to. Fail closed unless the parent is a -/// same-file production function with one direct routed call to the owner -/// and the owner folds with no forwarded arguments. fn fold_through_unique_public_parent( actual: &str, owner: &FunctionSummary, diff --git a/fixtures/helper_chain_one_hop/expected/CHANGELOG.md b/fixtures/helper_chain_one_hop/expected/CHANGELOG.md index c2eaa4e6a9f..c1088f15929 100644 --- a/fixtures/helper_chain_one_hop/expected/CHANGELOG.md +++ b/fixtures/helper_chain_one_hop/expected/CHANGELOG.md @@ -481,3 +481,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — helper_chain_one_hop (38) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless helper_chain_one_hop --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/helper_chain_one_hop/expected/human.txt b/fixtures/helper_chain_one_hop/expected/human.txt index f9012c318ee..ceb5bbdc92d 100644 --- a/fixtures/helper_chain_one_hop/expected/human.txt +++ b/fixtures/helper_chain_one_hop/expected/human.txt @@ -45,7 +45,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/helper_chain_one_hop/input --diff /fixtures/helper_chain_one_hop/diff.patch --mode fast probe:src_lib.rs:predicate:ac178c7f ripr context --root /fixtures/helper_chain_one_hop/input --diff /fixtures/helper_chain_one_hop/diff.patch --mode fast --at probe:src_lib.rs:predicate:ac178c7f - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/helper_chain_one_hop/input --at src/lib.rs:2 --kind predicate diff --git a/fixtures/inherent_receiver_local_wrapper/expected/CHANGELOG.md b/fixtures/inherent_receiver_local_wrapper/expected/CHANGELOG.md index ac86e0b03ba..482289ae297 100644 --- a/fixtures/inherent_receiver_local_wrapper/expected/CHANGELOG.md +++ b/fixtures/inherent_receiver_local_wrapper/expected/CHANGELOG.md @@ -115,3 +115,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — inherent_receiver_local_wrapper (10) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless inherent_receiver_local_wrapper --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/inherent_receiver_local_wrapper/expected/human.txt b/fixtures/inherent_receiver_local_wrapper/expected/human.txt index ecc04a8f908..29ded6b5eee 100644 --- a/fixtures/inherent_receiver_local_wrapper/expected/human.txt +++ b/fixtures/inherent_receiver_local_wrapper/expected/human.txt @@ -38,7 +38,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/inherent_receiver_local_wrapper/input --diff /fixtures/inherent_receiver_local_wrapper/diff.patch --mode fast probe:src_lib.rs:match_arm:f9032269 ripr context --root /fixtures/inherent_receiver_local_wrapper/input --diff /fixtures/inherent_receiver_local_wrapper/diff.patch --mode fast --at probe:src_lib.rs:match_arm:f9032269 - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above + no repair start offered: ripr found 5 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/inherent_receiver_local_wrapper/input --at src/lib.rs:6 --kind match_arm diff --git a/fixtures/module_reach_control_qualified/expected/CHANGELOG.md b/fixtures/module_reach_control_qualified/expected/CHANGELOG.md index c471c149c9d..5386fd1b348 100644 --- a/fixtures/module_reach_control_qualified/expected/CHANGELOG.md +++ b/fixtures/module_reach_control_qualified/expected/CHANGELOG.md @@ -178,3 +178,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — module_reach_control_qualified (15) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless module_reach_control_qualified --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/module_reach_control_qualified/expected/human.txt b/fixtures/module_reach_control_qualified/expected/human.txt index 1f1806da0fc..51756e7311e 100644 --- a/fixtures/module_reach_control_qualified/expected/human.txt +++ b/fixtures/module_reach_control_qualified/expected/human.txt @@ -39,7 +39,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/module_reach_control_qualified/input --diff /fixtures/module_reach_control_qualified/diff.patch --mode fast probe:src_inner.rs:return_value:438cae72 ripr context --root /fixtures/module_reach_control_qualified/input --diff /fixtures/module_reach_control_qualified/diff.patch --mode fast --at probe:src_inner.rs:return_value:438cae72 - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/module_reach_control_qualified/input --at src/inner.rs:2 --kind return_value diff --git a/fixtures/owner_return_pin_json_alternate_return/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_alternate_return/expected/CHANGELOG.md index 262b72ef3ce..34645c99f92 100644 --- a/fixtures/owner_return_pin_json_alternate_return/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_alternate_return/expected/CHANGELOG.md @@ -253,3 +253,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_alternate_return (21) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_alternate_return --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_alternate_return/expected/check.json b/fixtures/owner_return_pin_json_alternate_return/expected/check.json index b0e7d21bd35..bf225b49929 100644 --- a/fixtures/owner_return_pin_json_alternate_return/expected/check.json +++ b/fixtures/owner_return_pin_json_alternate_return/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_alternate_return/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":3,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:ca644788298b182f827f4166f5420a040c688ba7de1e5fc80b04cbccdb2aad3c","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -38,15 +26,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 6)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 6)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":6} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No exact error variant discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -65,40 +53,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -111,15 +95,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches returned value: Ok(())"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches returned value: Ok(()) (line 6)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches returned value: Ok(()) (line 6)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":6} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches returned value: Ok(())", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -138,40 +122,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", - "recommended_next_step": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", - "suggested_next_action": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", + "recommended_next_step": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -184,15 +164,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 6)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 6)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":6} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -211,21 +191,29 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_alternate_return/expected/human.txt b/fixtures/owner_return_pin_json_alternate_return/expected/human.txt index 2ecf2908678..228598209a0 100644 --- a/fixtures/owner_return_pin_json_alternate_return/expected/human.txt +++ b/fixtures/owner_return_pin_json_alternate_return/expected/human.txt @@ -2,26 +2,30 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_alternate_return/input -Summary: 3 changed behaviors checked: 0 appear noticed by tests, 3 partly noticed, 0 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: a test gap to inspect or repair - Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:6 - Static exposure: weak (severity: warning, confidence 0.92) - Why weak: a related test reaches this change but does not observe the exact changed value - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from + `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; + declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Missing check: No strong assertion was detected - Related test: tests/save.rs:4 checks (ripr could not confirm that this assertion observes the changed behavior) - Next step: The related test `checks` already has an exact assertion; this does not establish - observation of the returned value. Check whether the change can affect the returned value. If it - can, add a separating input and assert the exact returned value. If it cannot, test the changed - effect separately; another input cannot distinguish unchanged returns - Evidence: reach yes · infection yes · propagation yes · observation yes · assertion weak + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim + Related test: tests/save.rs:4 checks (assertion not credited: ripr could not establish that this assertion counts here) + Next step: ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does + Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; assertion = a test assertion tells intended from wrong behavior @@ -39,15 +43,13 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_alternate_return/input --diff /fixtures/owner_return_pin_json_alternate_return/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_alternate_return/input --diff /fixtures/owner_return_pin_json_alternate_return/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above -Write a test for it: - ripr agent stub --root /fixtures/owner_return_pin_json_alternate_return/input --at src/lib.rs:6 --kind return_value + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:6 (weak); kind: error_path; reason: No exact error variant discriminator was detected - - ./src/lib.rs:6 (weak); kind: return_value; reason: No strong assertion was detected + - ./src/lib.rs:6 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:6 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - weak = tests reach it but check it only loosely + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/owner_return_pin_json_nested_literal/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_nested_literal/expected/CHANGELOG.md index 7d7857411b5..c432bf78386 100644 --- a/fixtures/owner_return_pin_json_nested_literal/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_nested_literal/expected/CHANGELOG.md @@ -265,3 +265,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_nested_literal (22) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_nested_literal --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_nested_literal/expected/check.json b/fixtures/owner_return_pin_json_nested_literal/expected/check.json index ed7b1177878..50baf08f49a 100644 --- a/fixtures/owner_return_pin_json_nested_literal/expected/check.json +++ b/fixtures/owner_return_pin_json_nested_literal/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_nested_literal/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":3,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:65ccba2dcd461e22aa991bab2e102b5fb7660ea8e7374a97ee2b2a70d66cd198","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -38,15 +26,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses strong whole object equality oracle: assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No exact error variant discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -65,40 +53,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "whole_object_equality", - "oracle": "assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "whole_object_equality", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -111,15 +95,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches returned value: Ok(())"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses strong whole object equality oracle: assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches returned value: Ok(())", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -138,40 +122,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "whole_object_equality", - "oracle": "assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "whole_object_equality", - "oracle_strength": "strong", - "recommended_next_step": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", - "suggested_next_action": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", + "recommended_next_step": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -184,15 +164,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses strong whole object equality oracle: assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -211,21 +191,29 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "whole_object_equality", - "oracle": "assert_eq!(did_save_params(METHOD, &json!({\"text\":null})), Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "whole_object_equality", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_nested_literal/expected/human.txt b/fixtures/owner_return_pin_json_nested_literal/expected/human.txt index 2e672320932..d339ac59e74 100644 --- a/fixtures/owner_return_pin_json_nested_literal/expected/human.txt +++ b/fixtures/owner_return_pin_json_nested_literal/expected/human.txt @@ -2,26 +2,30 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_nested_literal/input -Summary: 3 changed behaviors checked: 0 appear noticed by tests, 3 partly noticed, 0 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: a test gap to inspect or repair - Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:5 - Static exposure: weak (severity: warning, confidence 0.92) - Why weak: a related test reaches this change but does not observe the exact changed value - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from + `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; + declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Missing check: No strong assertion was detected - Related test: tests/save.rs:4 checks (ripr could not confirm that this assertion observes the changed behavior) - Next step: The related test `checks` already has an exact assertion; this does not establish - observation of the returned value. Check whether the change can affect the returned value. If it - can, add a separating input and assert the exact returned value. If it cannot, test the changed - effect separately; another input cannot distinguish unchanged returns - Evidence: reach yes · infection yes · propagation yes · observation yes · assertion weak + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim + Related test: tests/save.rs:4 checks (assertion not credited: ripr could not establish that this assertion counts here) + Next step: ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does + Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; assertion = a test assertion tells intended from wrong behavior @@ -39,15 +43,13 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_nested_literal/input --diff /fixtures/owner_return_pin_json_nested_literal/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_nested_literal/input --diff /fixtures/owner_return_pin_json_nested_literal/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above -Write a test for it: - ripr agent stub --root /fixtures/owner_return_pin_json_nested_literal/input --at src/lib.rs:5 --kind return_value + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:5 (weak); kind: error_path; reason: No exact error variant discriminator was detected - - ./src/lib.rs:5 (weak); kind: return_value; reason: No strong assertion was detected + - ./src/lib.rs:5 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:5 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - weak = tests reach it but check it only loosely + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/owner_return_pin_json_real_literal/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_real_literal/expected/CHANGELOG.md index bf7edb265aa..5dc47b7ec74 100644 --- a/fixtures/owner_return_pin_json_real_literal/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_real_literal/expected/CHANGELOG.md @@ -264,3 +264,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_real_literal (22) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_real_literal --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_real_literal/expected/check.json b/fixtures/owner_return_pin_json_real_literal/expected/check.json index 73e6bd65ef2..9c030ac2cce 100644 --- a/fixtures/owner_return_pin_json_real_literal/expected/check.json +++ b/fixtures/owner_return_pin_json_real_literal/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_real_literal/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":1,"weakly_exposed":1,"reachable_unrevealed":1,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"conflicting_expressions":1,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:65ccba2dcd461e22aa991bab2e102b5fb7660ea8e7374a97ee2b2a70d66cd198","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "reachable_unrevealed", - "severity": "warning", - "confidence": 0.79, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -38,15 +26,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"no","confidence":"medium","summary":"Related tests were found, but no assertion appears to observe the changed value, error, field, or effect"}, - "discriminate": {"state":"no","confidence":"medium","summary":"No assertion found on related tests"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: Related tests were found, but no assertion appears to observe the changed value, error, field, or effect", "discriminator no: No assertion found on related tests", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses no oracle: assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No assertion found on related tests", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "Related tests were found, but no assertion appears to observe the changed value, error, field, or effect"], - "missing": ["No detected assertion observes the changed value, error, field, or effect", "No exact error variant discriminator was detected", "No relevant oracle was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "assertion not credited: `assert_eq!` in save_success_is_observed_with_absent_empty_and_nonempty_text at tests/save.rs:7: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -67,38 +55,34 @@ "line": 5, "oracle_strength": "none", "oracle_kind": "unknown", - "oracle": "assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "assertion_not_observing", - "why": "asserts, but not on the changed value" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], + "stop_reasons": ["gap_evidence_unresolved"], "oracle_kind": "unknown", "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "exposed", - "severity": "info", - "confidence": 1.00, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -111,15 +95,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches returned value: Ok(())"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"yes","confidence":"medium","summary":"Strong oracle found: exact value or pattern assertion"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator yes: Strong oracle found: exact value or pattern assertion", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses strong exact value oracle: assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses strong exact value oracle: assert_eq!(did_save_params(METHOD, &with_text), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses no oracle"], "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches returned value: Ok(())", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "Strong oracle found: exact value or pattern assertion"], - "missing": [], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "assertion not credited: `assert_eq!` in save_success_is_observed_with_absent_empty_and_nonempty_text at tests/save.rs:7: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -132,54 +116,42 @@ ], "missing_discriminators": [ ], - "related_tests_total": 2, + "related_tests_total": 1, "related_tests": [ { "name": "save_success_is_observed_with_absent_empty_and_nonempty_text", "file": "tests/save.rs", "line": 5, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));", - "relation_reason": "direct_owner_call", - "relation_confidence": "high" - }, - { - "name": "save_success_is_observed_with_absent_empty_and_nonempty_text", - "file": "tests/save.rs", - "line": 5, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD, &with_text), Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", - "relation_confidence": "high" + "relation_confidence": "high", + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", - "recommended_next_step": "", - "suggested_next_action": "", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", + "recommended_next_step": "ripr could not read whether the assertions in `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -192,15 +164,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses strong exact value oracle: assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses strong exact value oracle: assert_eq!(did_save_params(METHOD, &with_text), Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text", "assertion not credited: `assert_eq!` in save_success_is_observed_with_absent_empty_and_nonempty_text at tests/save.rs:7: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -213,39 +185,35 @@ ], "missing_discriminators": [ ], - "related_tests_total": 2, + "related_tests_total": 1, "related_tests": [ { "name": "save_success_is_observed_with_absent_empty_and_nonempty_text", "file": "tests/save.rs", "line": 5, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD, ¶ms), Ok(()));", - "relation_reason": "direct_owner_call", - "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" - }, - { - "name": "save_success_is_observed_with_absent_empty_and_nonempty_text", - "file": "tests/save.rs", - "line": 5, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD, &with_text), Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_real_literal/expected/human.txt b/fixtures/owner_return_pin_json_real_literal/expected/human.txt index c3bd1260d3a..3f0dde3e794 100644 --- a/fixtures/owner_return_pin_json_real_literal/expected/human.txt +++ b/fixtures/owner_return_pin_json_real_literal/expected/human.txt @@ -2,20 +2,32 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_real_literal/input -Summary: 3 changed behaviors checked: 1 appear noticed by tests, 1 partly noticed, 1 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: no gap selected for repair - Safe next action: no non-exposed diff finding was selected. This is not runtime proof, coverage adequacy, or mutation confirmation + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:5 - Static exposure: exposed (severity: info, confidence 1.00) - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in save_success_is_observed_with_absent_empty_and_nonempty_text at + tests/save.rs:7: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read + declares `serde_json` as the plain registry package; declare it by version only (no `package`, + `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Related test (1 of 2 matched rows): tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text - Evidence: reach yes · infection yes · propagation yes · observation yes · assertion yes + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim + Related test: tests/save.rs:5 save_success_is_observed_with_absent_empty_and_nonempty_text (assertion not credited: ripr could not establish that this assertion counts here) + Next step: ripr could not read whether the assertions in + `save_success_is_observed_with_absent_empty_and_nonempty_text` (tests/save.rs:5) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does + Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; assertion = a test assertion tells intended from wrong behavior @@ -28,19 +40,18 @@ Start here: base-side = evidence from the old code, not an edit target; candidate line = changed line ripr considers - reach yes: Related tests appear to reach did_save_params: save_success_is_observed_with_absent_empty_and_nonempty_text - infection yes: Reachable tests can plausibly activate this changed behavior - - 6 more detail line(s) in --format human-full + - 5 more detail line(s) in --format human-full Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_real_literal/input --diff /fixtures/owner_return_pin_json_real_literal/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_real_literal/input --diff /fixtures/owner_return_pin_json_real_literal/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: nothing to repair here; the related tests already notice this change (exposed) + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:5 (unrevealed); kind: error_path; reason: No detected assertion observes the changed value, error, field, or effect - - ./src/lib.rs:5 (weak); kind: return_value; reason: No strong assertion was detected + - ./src/lib.rs:5 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:5 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - weak = tests reach it but check it only loosely - unrevealed = tests reach it but nothing appears to notice a change + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/owner_return_pin_json_shadowed_owner/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_shadowed_owner/expected/CHANGELOG.md index 59fc214399d..bfcb24da8da 100644 --- a/fixtures/owner_return_pin_json_shadowed_owner/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_shadowed_owner/expected/CHANGELOG.md @@ -253,3 +253,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_shadowed_owner (21) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_shadowed_owner --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_shadowed_owner/expected/check.json b/fixtures/owner_return_pin_json_shadowed_owner/expected/check.json index c29a2c792a8..13d6354945f 100644 --- a/fixtures/owner_return_pin_json_shadowed_owner/expected/check.json +++ b/fixtures/owner_return_pin_json_shadowed_owner/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_shadowed_owner/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":3,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:65ccba2dcd461e22aa991bab2e102b5fb7660ea8e7374a97ee2b2a70d66cd198","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -38,15 +26,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No exact error variant discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -65,40 +53,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -111,15 +95,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches returned value: Ok(())"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches returned value: Ok(())", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -138,40 +122,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", - "recommended_next_step": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", - "suggested_next_action": "The related test `checks` already has an exact assertion; this does not establish observation of the returned value. Check whether the change can affect the returned value. If it can, add a separating input and assert the exact returned value. If it cannot, test the changed effect separately; another input cannot distinguish unchanged returns.", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", + "recommended_next_step": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -184,15 +164,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses strong exact value oracle: assert_eq!(did_save_params(METHOD,¶ms),Ok(()));"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -211,21 +191,29 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "strong", - "oracle_kind": "exact_value", - "oracle": "assert_eq!(did_save_params(METHOD,¶ms),Ok(()));", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "observation_unconfirmed", - "why": "ripr could not confirm that this assertion observes the changed behavior" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "exact_value", - "oracle_strength": "strong", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_shadowed_owner/expected/human.txt b/fixtures/owner_return_pin_json_shadowed_owner/expected/human.txt index 7e943607478..c64824aab83 100644 --- a/fixtures/owner_return_pin_json_shadowed_owner/expected/human.txt +++ b/fixtures/owner_return_pin_json_shadowed_owner/expected/human.txt @@ -2,26 +2,30 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_shadowed_owner/input -Summary: 3 changed behaviors checked: 0 appear noticed by tests, 3 partly noticed, 0 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: a test gap to inspect or repair - Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:5 - Static exposure: weak (severity: warning, confidence 0.92) - Why weak: a related test reaches this change but does not observe the exact changed value - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from + `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; + declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Missing check: No strong assertion was detected - Related test: tests/save.rs:4 checks (ripr could not confirm that this assertion observes the changed behavior) - Next step: The related test `checks` already has an exact assertion; this does not establish - observation of the returned value. Check whether the change can affect the returned value. If it - can, add a separating input and assert the exact returned value. If it cannot, test the changed - effect separately; another input cannot distinguish unchanged returns - Evidence: reach yes · infection yes · propagation yes · observation yes · assertion weak + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim + Related test: tests/save.rs:4 checks (assertion not credited: ripr could not establish that this assertion counts here) + Next step: ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does + Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; assertion = a test assertion tells intended from wrong behavior @@ -39,15 +43,13 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_shadowed_owner/input --diff /fixtures/owner_return_pin_json_shadowed_owner/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_shadowed_owner/input --diff /fixtures/owner_return_pin_json_shadowed_owner/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above -Write a test for it: - ripr agent stub --root /fixtures/owner_return_pin_json_shadowed_owner/input --at src/lib.rs:5 --kind return_value + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:5 (weak); kind: error_path; reason: No exact error variant discriminator was detected - - ./src/lib.rs:5 (weak); kind: return_value; reason: No strong assertion was detected + - ./src/lib.rs:5 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:5 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - weak = tests reach it but check it only loosely + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/owner_return_pin_json_uncalled_closure/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_uncalled_closure/expected/CHANGELOG.md index 6efd0fd09d9..d5b89a2222c 100644 --- a/fixtures/owner_return_pin_json_uncalled_closure/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_uncalled_closure/expected/CHANGELOG.md @@ -240,3 +240,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_uncalled_closure (20) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_uncalled_closure --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_uncalled_closure/expected/check.json b/fixtures/owner_return_pin_json_uncalled_closure/expected/check.json index a4d36df5d87..670b205c448 100644 --- a/fixtures/owner_return_pin_json_uncalled_closure/expected/check.json +++ b/fixtures/owner_return_pin_json_uncalled_closure/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_uncalled_closure/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":3,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:65ccba2dcd461e22aa991bab2e102b5fb7660ea8e7374a97ee2b2a70d66cd198","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "reachable_unrevealed", - "severity": "warning", - "confidence": 0.79, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -45,8 +33,8 @@ "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: the assertion is inside a closure ripr cannot see invoked exactly once"], - "missing": ["No exact error variant discriminator was detected", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -74,31 +62,27 @@ "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], + "stop_reasons": ["gap_evidence_unresolved"], "oracle_kind": "unknown", "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "reachable_unrevealed", - "severity": "warning", - "confidence": 0.79, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -118,8 +102,8 @@ "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":5} ], - "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: the assertion is inside a closure ripr cannot see invoked exactly once"], - "missing": ["No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -147,31 +131,27 @@ "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], + "stop_reasons": ["gap_evidence_unresolved"], "oracle_kind": "unknown", "oracle_strength": "none", - "recommended_next_step": "ripr did not credit the `assert_eq!` in checks at tests/save.rs:4; the \"not credited\" note says why. That shape can keep the assertion from checking the change, so this is not a static limit: make the check run on every default test run, as the standard `assert_eq!`, in a test expected to pass.", - "suggested_next_action": "ripr did not credit the `assert_eq!` in checks at tests/save.rs:4; the \"not credited\" note says why. That shape can keep the assertion from checking the change, so this is not a static limit: make the check run on every default test run, as the standard `assert_eq!`, in a test expected to pass.", + "recommended_next_step": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "reachable_unrevealed", - "severity": "warning", - "confidence": 0.79, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -191,8 +171,8 @@ "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: the assertion is inside a closure ripr cannot see invoked exactly once"], - "missing": ["No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { }, "activation": { @@ -220,12 +200,20 @@ "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], + "stop_reasons": ["gap_evidence_unresolved"], "oracle_kind": "unknown", "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_uncalled_closure/expected/human.txt b/fixtures/owner_return_pin_json_uncalled_closure/expected/human.txt index e90270486ac..5bb8b478f1f 100644 --- a/fixtures/owner_return_pin_json_uncalled_closure/expected/human.txt +++ b/fixtures/owner_return_pin_json_uncalled_closure/expected/human.txt @@ -2,26 +2,29 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_uncalled_closure/input -Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 3 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: a test gap to inspect or repair - Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:5 - Static exposure: unrevealed (severity: warning, confidence 0.79) - Why unrevealed: a related test asserts here, but ripr could not establish that the assertion runs and is the standard `assert_eq!` - Not credited: `assert_eq!` in checks at tests/save.rs:4: the assertion is inside a closure ripr cannot see invoked exactly once - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from + `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; + declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Missing check (1 of 2): No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished) + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim Related test: tests/save.rs:4 checks (assertion not credited: ripr could not establish that this assertion counts here) - Next step: ripr did not credit the `assert_eq!` in checks at tests/save.rs:4; the "not credited" - note says why. That shape can keep the assertion from checking the change, so this is not a - static limit: make the check run on every default test run, as the standard `assert_eq!`, in a - test expected to pass + Next step: ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; @@ -40,15 +43,13 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_uncalled_closure/input --diff /fixtures/owner_return_pin_json_uncalled_closure/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_uncalled_closure/input --diff /fixtures/owner_return_pin_json_uncalled_closure/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: `ripr check` reads a gap or limit for this change, but `ripr repair` judges the surrounding code as a whole and finds its tests already notice changes there (exposed), so it has no gap to start from. The two read different evidence (your changed lines versus the surrounding code as a whole) and ripr does not start a repair on conflicting evidence; follow the Next step above -Write a test for it: - ripr agent stub --root /fixtures/owner_return_pin_json_uncalled_closure/input --at src/lib.rs:5 --kind return_value + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:5 (unrevealed); kind: error_path; reason: No exact error variant discriminator was detected - - ./src/lib.rs:5 (unrevealed); kind: return_value; reason: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished) + - ./src/lib.rs:5 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:5 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - unrevealed = tests reach it but nothing appears to notice a change + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/owner_return_pin_json_unrelated_equality/expected/CHANGELOG.md b/fixtures/owner_return_pin_json_unrelated_equality/expected/CHANGELOG.md index 7cf69b770d0..3f221fa3753 100644 --- a/fixtures/owner_return_pin_json_unrelated_equality/expected/CHANGELOG.md +++ b/fixtures/owner_return_pin_json_unrelated_equality/expected/CHANGELOG.md @@ -241,3 +241,15 @@ Command: Updated: - `expected/check.json` - `expected/human.txt` + +## Pending — owner_return_pin_json_unrelated_equality (20) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless owner_return_pin_json_unrelated_equality --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` diff --git a/fixtures/owner_return_pin_json_unrelated_equality/expected/check.json b/fixtures/owner_return_pin_json_unrelated_equality/expected/check.json index 44b26678fe5..3687dab3c1d 100644 --- a/fixtures/owner_return_pin_json_unrelated_equality/expected/check.json +++ b/fixtures/owner_return_pin_json_unrelated_equality/expected/check.json @@ -3,7 +3,7 @@ "tool": "ripr", "mode": "fast", "root": "fixtures/owner_return_pin_json_unrelated_equality/input", - "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":3,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":0,"changed_files_by_language":[{"language":"rust","files":1}]}, + "summary": {"changed_rust_files":1,"probes":3,"findings":3,"exposed":0,"weakly_exposed":0,"reachable_unrevealed":0,"no_static_path":0,"infection_unknown":0,"propagation_unknown":0,"static_unknown":3,"changed_files_by_language":[{"language":"rust","files":1}]}, "analysis_outcome": { "analysis_complete": true, "outcome": {"schema_version":"0.1","kind":"complete_with_findings","identity":{"repository_identity":null,"root_identity":null,"config_identity":null,"base_revision":null,"input_identity":"sha256:65ccba2dcd461e22aa991bab2e102b5fb7660ea8e7374a97ee2b2a70d66cd198","snapshot_identity":null,"git_candidate_subject":null},"counts":{"changed_file_count":1,"changed_line_count":2,"candidate_line_count":1,"probe_count":3,"finding_count":3},"limitations":[],"claim_boundary":"Static analysis outcome only; no correctness, test-adequacy, runtime-execution, or merge-readiness claim."} @@ -11,21 +11,9 @@ "findings": [ { "id": "probe:src_lib.rs:error_path:3c99e167", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:error_variant:error_path:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "error_variant", - "probe_kind": "error_path", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:error_path:3c99e167", "family": "error_path", @@ -38,15 +26,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses weak relational check oracle: assert_eq!(2,2);", "source assertion argument value 2 at line 4"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle", "source assertion argument value 2 at line 4"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No exact error variant discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { "4": "assert_eq!(2,2);" }, @@ -76,40 +64,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "weak", - "oracle_kind": "relational_check", - "oracle": "assert_eq!(2,2);", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "weak_assertion", - "why": "assertion too weak to tell the old behavior from the new" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "relational_check", - "oracle_strength": "weak", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" }, { "id": "probe:src_lib.rs:return_value:9659b9fa", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "ok" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:9659b9fa", "family": "return_value", @@ -122,15 +106,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches returned value: Ok(())"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses weak relational check oracle: assert_eq!(2,2);", "source assertion argument value 2 at line 4"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches returned value: Ok(())", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches returned value: Ok(()) (line 5)", "related test tests/save.rs:4 checks uses no oracle", "source assertion argument value 2 at line 4"], "flow_sinks": [ {"kind":"return_value","text":"Ok(())","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches returned value: Ok(())", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches returned value: Ok(())", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { "4": "assert_eq!(2,2);" }, @@ -160,40 +144,36 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "weak", - "oracle_kind": "relational_check", - "oracle": "assert_eq!(2,2);", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "weak_assertion", - "why": "assertion too weak to tell the old behavior from the new" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "relational_check", - "oracle_strength": "weak", - "recommended_next_step": "Replace broad assertions with exact equality or a property that constrains the changed returned value.", - "suggested_next_action": "Replace broad assertions with exact equality or a property that constrains the changed returned value.", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", + "recommended_next_step": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", + "suggested_next_action": "ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed value; add a test only if none does.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "candidate_current" }, { "id": "probe:src_lib.rs:return_value:94904a64", - "canonical_gap_id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "canonical_gap_group_size": 1, - "canonical_gap": { - "id": "gap:rust:src/lib.rs:did_save_params:return_value:return_value:err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new", - "language": "rust", - "file": "src/lib.rs", - "owner": "did_save_params", - "behavior_kind": "return_value", - "probe_kind": "return_value", - "normalized_discriminator": "err_schemaerror_method_none_path_string_new_expected_string_new_observed_string_new" - - }, - "classification": "weakly_exposed", - "severity": "warning", - "confidence": 0.92, + "classification": "static_unknown", + "severity": "note", + "confidence": 0.64, "probe": { "id": "probe:src_lib.rs:return_value:94904a64", "family": "return_value", @@ -206,15 +186,15 @@ "reach": {"state":"yes","confidence":"medium","summary":"Related tests appear to reach did_save_params: checks"}, "infect": {"state":"yes","confidence":"medium","summary":"Reachable tests can plausibly activate this changed behavior"}, "propagate": {"state":"yes","confidence":"high","summary":"Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})"}, - "observe": {"state":"yes","confidence":"medium","summary":"A related test observes a value or effect near the changed behavior"}, - "discriminate": {"state":"weak","confidence":"medium","summary":"Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)"} + "observe": {"state":"no","confidence":"medium","summary":"No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)"}, + "discriminate": {"state":"no","confidence":"medium","summary":"No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)"} }, - "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation yes: A related test observes a value or effect near the changed behavior", "discriminator weak: Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses weak relational check oracle: assert_eq!(2,2);", "source assertion argument value 2 at line 4"], + "evidence_path": ["reach yes: Related tests appear to reach did_save_params: checks", "infection yes: Reachable tests can plausibly activate this changed behavior", "propagation yes: Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "observation no: No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "discriminator no: No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "local flow reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()}) (line 5)", "related test tests/save.rs:4 checks uses no oracle", "source assertion argument value 2 at line 4"], "flow_sinks": [ {"kind":"error_variant","text":"Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})","line":5} ], - "evidence": ["A related test observes a value or effect near the changed behavior", "Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "Discriminator unconfirmed: no assertion text references this probe's changed expression (observation_unverified)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks"], - "missing": ["No strong discriminator was detected"], + "evidence": ["Complete propagation witness reaches error variant: Result::Err(SchemaError {method:None,path:String::new(),expected:String::new(),observed:String::new()})", "No statically established assertion can discriminate the changed behavior; execution or macro binding is unestablished (rust_assertion_context_unestablished)", "No statically established oracle: assertion execution or macro binding is unestablished (rust_assertion_context_unestablished)", "Reachable tests can plausibly activate this changed behavior", "Related tests appear to reach did_save_params: checks", "assertion not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`)", "gap_withheld: reachable_unrevealed is not claimed; whether the refused related assertions run as the standard `assert_eq!` (rust_assertion_context_unresolved)", "limitation_last_established_edge: related tests `checks` (tests/save.rs:4)", "limitation_first_unresolved_edge: whether the refused related assertions run as the standard `assert_eq!`", "limitation_analyzer_route: analysis/classify/gap-admission", "limitation_non_claim: no missing test, no weak oracle, and no test adequacy is established"], + "missing": ["A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse, the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a gap; this is a named limitation, not a coverage claim."], "assertion_texts": { "4": "assert_eq!(2,2);" }, @@ -244,21 +224,29 @@ "name": "checks", "file": "tests/save.rs", "line": 4, - "oracle_strength": "weak", - "oracle_kind": "relational_check", - "oracle": "assert_eq!(2,2);", + "oracle_strength": "none", + "oracle_kind": "unknown", + "oracle": "", "relation_reason": "direct_owner_call", "relation_confidence": "high", - "miss": "weak_assertion", - "why": "assertion too weak to tell the old behavior from the new" + "miss": "assertion_not_credited", + "why": "assertion not credited: ripr could not establish that this assertion counts here" } ], - "stop_reasons": [], - "oracle_kind": "relational_check", - "oracle_strength": "weak", + "stop_reasons": ["gap_evidence_unresolved"], + "oracle_kind": "unknown", + "oracle_strength": "none", "recommended_next_step": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "suggested_next_action": "Not a candidate edit target (base_deleted): the changed source is not current on the candidate side, so this finding recommends no test change.", "language": "rust", + "static_limit_kind": "rust_assertion_context_unresolved", + "static_limitation": { + "analyzer_route": "analysis/classify/gap-admission", + "first_unresolved_edge": "whether the refused related assertions run as the standard `assert_eq!`", + "kind": "rust_assertion_context_unresolved", + "last_established_edge": "related tests `checks` (tests/save.rs:4)", + "non_claim": "no missing test, no weak oracle, and no test adequacy is established" + }, "source_currentness": "base_deleted" } ] diff --git a/fixtures/owner_return_pin_json_unrelated_equality/expected/human.txt b/fixtures/owner_return_pin_json_unrelated_equality/expected/human.txt index 61532c6b245..9d09846d3fc 100644 --- a/fixtures/owner_return_pin_json_unrelated_equality/expected/human.txt +++ b/fixtures/owner_return_pin_json_unrelated_equality/expected/human.txt @@ -2,23 +2,30 @@ ripr static RIPR exposure analysis mode: fast root: fixtures/owner_return_pin_json_unrelated_equality/input -Summary: 3 changed behaviors checked: 0 appear noticed by tests, 3 partly noticed, 0 reached but not noticed, 0 no test path. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) +Summary: 3 changed behaviors checked: 0 appear noticed by tests, 0 partly noticed, 0 reached but not noticed, 0 no test path, 3 unclear. 3 found, 0 suppressed by your settings (2 base-side evidence, not candidate edit targets) Analysis outcome: findings below (analysis complete) Counts: 1 changed file(s), 2 changed line(s), 1 candidate line(s), 3 changed behavior(s) checked, 3 finding(s) Start here: - State: a test gap to inspect or repair - Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only + State: ripr cannot tell from reading the code whether tests would notice this + Safe next action: look at the reason below before adding a test File: ./src/lib.rs:5 - Static exposure: weak (severity: warning, confidence 0.92) - Why weak: a related test reaches this change but does not observe the exact changed value - Gap ID (for scripts): gap:rust:src/lib.rs:did_save_params:return_value:return_value:ok + Static exposure: unknown (severity: note, confidence 0.64) + Why unknown: the analysis could not determine a static exposure state + Not credited: `assert_eq!` in checks at tests/save.rs:4: tests/save.rs:2 imports `json` from + `serde_json`, and no Cargo.toml ripr read declares `serde_json` as the plain registry package; + declare it by version only (no `package`, `path`, `git`, `registry` or `[patch]`) Changed behavior: Ok(()) - Missing check: No strong assertion was detected - Related test: tests/save.rs:4 checks (assertion too weak to tell the old behavior from the new) - Next step: Replace broad assertions with exact equality or a property that constrains the changed returned value - Evidence: reach yes · infection yes · propagation yes · observation yes · assertion weak + Analyzer limit: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs + as the standard macro on the path that reaches this change (for example the file did not parse, + the test carries a feature `cfg`, or a glob import may rebind the macro). ripr does not claim a + gap; this is a named limitation, not a coverage claim + Related test: tests/save.rs:4 checks (assertion not credited: ripr could not establish that this assertion counts here) + Next step: ripr could not read whether the assertions in `checks` (tests/save.rs:4) run as the + standard `assert_eq!`, so it does not report a gap. Check that one of them compares the changed + value; add a test only if none does + Evidence: reach yes · infection yes · propagation yes · observation no · assertion no Stages (static evidence): reach = test path to changed owner; infection = inputs can activate change; propagation = changed effect reaches output; observation = related test/assertion evidence; assertion = a test assertion tells intended from wrong behavior @@ -36,15 +43,13 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/owner_return_pin_json_unrelated_equality/input --diff /fixtures/owner_return_pin_json_unrelated_equality/diff.patch --mode fast probe:src_lib.rs:return_value:9659b9fa ripr context --root /fixtures/owner_return_pin_json_unrelated_equality/input --diff /fixtures/owner_return_pin_json_unrelated_equality/diff.patch --mode fast --at probe:src_lib.rs:return_value:9659b9fa - no repair start offered: ripr found 1 spot in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above -Write a test for it: - ripr agent stub --root /fixtures/owner_return_pin_json_unrelated_equality/input --at src/lib.rs:5 --kind return_value + no repair start offered: this finding has no gap ID, so there is no gap to start a repair from; follow the Next step above Hidden: All 2 omitted finding(s) are base-side evidence, not candidate edit targets. - - ./src/lib.rs:5 (weak); kind: error_path; reason: No exact error variant discriminator was detected - - ./src/lib.rs:5 (weak); kind: return_value; reason: No strong assertion was detected + - ./src/lib.rs:5 (unknown: static analysis limited); kind: error_path; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… + - ./src/lib.rs:5 (unknown: static analysis limited); kind: return_value; reason: A related Rust test has an `assert_eq!`, but ripr could not read whether it runs as the standard macro on the path that reaches this change (for example the file did not parse,… Hidden classes: - weak = tests reach it but check it only loosely + unknown: static analysis limited = reading the code was not enough for ripr to judge (analysis limited, not a verdict) Full evidence: rerun with --format human-full Machine data: rerun with --format json diff --git a/fixtures/rust_wrapper_closure_shadowed_callee/expected/CHANGELOG.md b/fixtures/rust_wrapper_closure_shadowed_callee/expected/CHANGELOG.md index ec5007ee49d..b0d5a5faded 100644 --- a/fixtures/rust_wrapper_closure_shadowed_callee/expected/CHANGELOG.md +++ b/fixtures/rust_wrapper_closure_shadowed_callee/expected/CHANGELOG.md @@ -121,3 +121,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — rust_wrapper_closure_shadowed_callee (10) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless rust_wrapper_closure_shadowed_callee --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/rust_wrapper_closure_shadowed_callee/expected/human.txt b/fixtures/rust_wrapper_closure_shadowed_callee/expected/human.txt index af16569733d..fd86bfca8de 100644 --- a/fixtures/rust_wrapper_closure_shadowed_callee/expected/human.txt +++ b/fixtures/rust_wrapper_closure_shadowed_callee/expected/human.txt @@ -42,7 +42,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/rust_wrapper_closure_shadowed_callee/input --diff /fixtures/rust_wrapper_closure_shadowed_callee/diff.patch --mode fast probe:src_lib.rs:predicate:41e056ec ripr context --root /fixtures/rust_wrapper_closure_shadowed_callee/input --diff /fixtures/rust_wrapper_closure_shadowed_callee/diff.patch --mode fast --at probe:src_lib.rs:predicate:41e056ec - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 4 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/rust_wrapper_closure_shadowed_callee/input --at src/lib.rs:2 --kind predicate diff --git a/fixtures/rust_wrapper_crate_alias_logging_macro/expected/CHANGELOG.md b/fixtures/rust_wrapper_crate_alias_logging_macro/expected/CHANGELOG.md index 27e99f49338..b81d99ea534 100644 --- a/fixtures/rust_wrapper_crate_alias_logging_macro/expected/CHANGELOG.md +++ b/fixtures/rust_wrapper_crate_alias_logging_macro/expected/CHANGELOG.md @@ -121,3 +121,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — rust_wrapper_crate_alias_logging_macro (10) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless rust_wrapper_crate_alias_logging_macro --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/rust_wrapper_crate_alias_logging_macro/expected/human.txt b/fixtures/rust_wrapper_crate_alias_logging_macro/expected/human.txt index c293c4bdae0..0dfe9dad899 100644 --- a/fixtures/rust_wrapper_crate_alias_logging_macro/expected/human.txt +++ b/fixtures/rust_wrapper_crate_alias_logging_macro/expected/human.txt @@ -42,7 +42,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/rust_wrapper_crate_alias_logging_macro/input --diff /fixtures/rust_wrapper_crate_alias_logging_macro/diff.patch --mode fast probe:src_lib.rs:predicate:41e056ec ripr context --root /fixtures/rust_wrapper_crate_alias_logging_macro/input --diff /fixtures/rust_wrapper_crate_alias_logging_macro/diff.patch --mode fast --at probe:src_lib.rs:predicate:41e056ec - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/rust_wrapper_crate_alias_logging_macro/input --at src/lib.rs:2 --kind predicate diff --git a/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/CHANGELOG.md b/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/CHANGELOG.md index 68e27cf09ff..341ae8db64e 100644 --- a/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/CHANGELOG.md +++ b/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/CHANGELOG.md @@ -108,3 +108,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — rust_wrapper_macro_bang_bidi_whitespace (9) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless rust_wrapper_macro_bang_bidi_whitespace --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/human.txt b/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/human.txt index 4b7a885b330..48ade4ec366 100644 --- a/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/human.txt +++ b/fixtures/rust_wrapper_macro_bang_bidi_whitespace/expected/human.txt @@ -42,7 +42,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/rust_wrapper_macro_bang_bidi_whitespace/input --diff /fixtures/rust_wrapper_macro_bang_bidi_whitespace/diff.patch --mode fast probe:src_lib.rs:predicate:41e056ec ripr context --root /fixtures/rust_wrapper_macro_bang_bidi_whitespace/input --diff /fixtures/rust_wrapper_macro_bang_bidi_whitespace/diff.patch --mode fast --at probe:src_lib.rs:predicate:41e056ec - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/rust_wrapper_macro_bang_bidi_whitespace/input --at src/lib.rs:2 --kind predicate diff --git a/fixtures/rust_wrapper_unicode_macro_suffix/expected/CHANGELOG.md b/fixtures/rust_wrapper_unicode_macro_suffix/expected/CHANGELOG.md index b83689a8279..ec0e19b202d 100644 --- a/fixtures/rust_wrapper_unicode_macro_suffix/expected/CHANGELOG.md +++ b/fixtures/rust_wrapper_unicode_macro_suffix/expected/CHANGELOG.md @@ -121,3 +121,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — rust_wrapper_unicode_macro_suffix (10) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless rust_wrapper_unicode_macro_suffix --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/rust_wrapper_unicode_macro_suffix/expected/human.txt b/fixtures/rust_wrapper_unicode_macro_suffix/expected/human.txt index c2c96ab7e6c..87c03064c93 100644 --- a/fixtures/rust_wrapper_unicode_macro_suffix/expected/human.txt +++ b/fixtures/rust_wrapper_unicode_macro_suffix/expected/human.txt @@ -42,7 +42,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/rust_wrapper_unicode_macro_suffix/input --diff /fixtures/rust_wrapper_unicode_macro_suffix/diff.patch --mode fast probe:src_lib.rs:predicate:41e056ec ripr context --root /fixtures/rust_wrapper_unicode_macro_suffix/input --diff /fixtures/rust_wrapper_unicode_macro_suffix/diff.patch --mode fast --at probe:src_lib.rs:predicate:41e056ec - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/rust_wrapper_unicode_macro_suffix/input --at src/lib.rs:2 --kind predicate diff --git a/fixtures/rust_wrapper_user_macro_guard/expected/CHANGELOG.md b/fixtures/rust_wrapper_user_macro_guard/expected/CHANGELOG.md index 7f0f4864396..d53a66b5f85 100644 --- a/fixtures/rust_wrapper_user_macro_guard/expected/CHANGELOG.md +++ b/fixtures/rust_wrapper_user_macro_guard/expected/CHANGELOG.md @@ -133,3 +133,16 @@ Updated: - `expected/check.json` - `expected/human.txt` - `expected/human-full.txt` + +## Pending — rust_wrapper_user_macro_guard (11) + +Reason: +RIPR-SPEC-0005: #4681 public-parent helper delegation graph and index-aware value contradiction + +Command: +`cargo xtask goldens bless rust_wrapper_user_macro_guard --reason "..."` + +Updated: +- `expected/check.json` +- `expected/human.txt` +- `expected/human-full.txt` diff --git a/fixtures/rust_wrapper_user_macro_guard/expected/human.txt b/fixtures/rust_wrapper_user_macro_guard/expected/human.txt index e97ba036b0f..1afbc48dd65 100644 --- a/fixtures/rust_wrapper_user_macro_guard/expected/human.txt +++ b/fixtures/rust_wrapper_user_macro_guard/expected/human.txt @@ -42,7 +42,7 @@ Start here: Next: drill into the top finding: ripr explain --root /fixtures/rust_wrapper_user_macro_guard/input --diff /fixtures/rust_wrapper_user_macro_guard/diff.patch --mode fast probe:src_lib.rs:predicate:41e056ec ripr context --root /fixtures/rust_wrapper_user_macro_guard/input --diff /fixtures/rust_wrapper_user_macro_guard/diff.patch --mode fast --at probe:src_lib.rs:predicate:41e056ec - no repair start offered: ripr cannot build a repair packet for this finding yet because it is still missing: a test assertion that pins the changed boundary value exactly; a test input that reaches the changed code; follow the Next step above, then rerun `ripr check` + no repair start offered: ripr found 3 spots in this finding's file, but could not tie one to this finding's changed line, so it cannot pick one for you; `ripr pilot` lists them, or follow the Next step above Write a test for it: ripr agent stub --root /fixtures/rust_wrapper_user_macro_guard/input --at src/lib.rs:2 --kind predicate From c1c8bbb435682a35708e5feffc6ef343086e3356 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 14:29:27 +0000 Subject: [PATCH 3/3] fix(#4681): rebase onto main, resolve threads, unique parent fold - Rebase onto current main without carrying test_stub.rs call-site fix (#12496). - Merge main shadow/index wiring into exact_value_assertion_verdict_for_test. - Fail closed when multiple production functions share the public parent name. - Add same-named rival + entry() wrapper witness regression test. - Drop duplicate RustIndex import; fmt. Proof: cargo test -p ripr --lib module_extraction_public_parent; cargo xtask precommit. Co-authored-by: Steven Zimmerman, CPA --- .../tests/module_extraction_public_parent.rs | 4 ++-- .../src/analysis/test_grip_evidence/value_contradiction.rs | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs index 01e0000cd0b..0eac37bee65 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/tests/module_extraction_public_parent.rs @@ -156,8 +156,8 @@ fn semantic_projection_public_parent( } #[test] -fn module_extraction_public_parent_same_named_sibling_with_wrapper_call_stays_witness( -) -> Result<(), String> { +fn module_extraction_public_parent_same_named_sibling_with_wrapper_call_stays_witness() +-> Result<(), String> { for placement in HELPER_PLACEMENTS { let (_root, index, seam) = public_parent_fixture(placement, 9, true, true)?; let evidence = evidence_for_seam(&seam, &index); diff --git a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs index 17ab628a1c6..a5f38b87768 100644 --- a/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs +++ b/crates/ripr/src/analysis/test_grip_evidence/value_contradiction.rs @@ -29,10 +29,7 @@ use crate::analysis::classify::oracle_owner_call_is_shadowed; use crate::analysis::extract::{equality_assertion_arguments, outer_assertion_condition}; -use crate::analysis::facts::RustIndex; -use crate::analysis::facts::TestFact as TestSummary; -use crate::analysis::facts::{FunctionSummary, SourceText}; -use crate::analysis::rust_index::RustIndex; +use crate::analysis::facts::{FunctionSummary, RustIndex, SourceText, TestFact as TestSummary}; use crate::analysis::syntax::parse_clean_source_file; use ra_ap_syntax::{AstNode, ast, ast::HasAttrs, ast::HasName}; use std::collections::BTreeMap; @@ -1106,7 +1103,7 @@ fn fold_through_unique_public_parent( if parent_name == owner.name { return None; } - let mut matching = index.functions().filter(|function| { + let mut matching = index.functions().into_iter().filter(|function| { !function.source_role.is_evidence_role() && function.name == parent_name }); let parent = matching.next()?;