fix shrinking

This commit is contained in:
pedrocarlo
2025-09-18 11:51:26 -03:00
parent d69cdd92d2
commit c072b0314b
2 changed files with 5 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ use super::property::{Property, remaining};
pub(crate) type ResultSet = Result<Vec<Vec<SimValue>>>;
#[derive(Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub(crate) struct InteractionPlan {
pub(crate) plan: Vec<Interactions>,
}

View File

@@ -1,5 +1,3 @@
use indexmap::IndexSet;
use crate::{
SandboxedResult, SimulatorEnv,
generation::{
@@ -19,13 +17,14 @@ impl InteractionPlan {
// - Shrink to multiple values by removing random interactions
// - Shrink properties by removing their extensions, or shrinking their values
let mut plan = self.clone();
// let failing_property = &self.plan[failing_execution.interaction_index];
let mut depending_tables = IndexSet::new();
let all_interactions = self.interactions_list_with_secondary_index();
// Index of the parent property where the interaction originated from
let secondary_interactions_index = all_interactions[failing_execution.interaction_index].0;
// Index of the parent property where the interaction originated from
let failing_property = &self.plan[secondary_interactions_index];
let mut depending_tables = failing_property.dependencies();
{
let mut idx = failing_execution.interaction_index;
loop {