From 72b1bb7aa723128f57b407f4dc55e55c3bc34818 Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Wed, 23 Sep 2026 22:30:11 -0700 Subject: [PATCH] Fix regression module path and isolate live drawing context admission --- crates/oa-desktop/src/app/allocation_drag_tests/group.rs | 1 + .../allocation_drag_tests/group/connection_lifetime.rs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/crates/oa-desktop/src/app/allocation_drag_tests/group.rs b/crates/oa-desktop/src/app/allocation_drag_tests/group.rs index 467b928b..b39272c6 100644 --- a/crates/oa-desktop/src/app/allocation_drag_tests/group.rs +++ b/crates/oa-desktop/src/app/allocation_drag_tests/group.rs @@ -2,6 +2,7 @@ use super::*; use crate::app::multiselect::{self, Choice}; use crate::diagram_usage::Target as SelectionTarget; +#[path = "group/connection_lifetime.rs"] mod connection_lifetime; struct Group { diff --git a/crates/oa-desktop/src/app/allocation_drag_tests/group/connection_lifetime.rs b/crates/oa-desktop/src/app/allocation_drag_tests/group/connection_lifetime.rs index eda21144..46164257 100644 --- a/crates/oa-desktop/src/app/allocation_drag_tests/group/connection_lifetime.rs +++ b/crates/oa-desktop/src/app/allocation_drag_tests/group/connection_lifetime.rs @@ -198,6 +198,14 @@ fn captured_connection_context_mismatches_preserve_the_current_session() { assert_eq!(g.f.app.connection.as_ref().unwrap().context, current); assert_captured_noop(&mut g.f.app, captured, g.y); } + // Captured/session contexts agree, but the rendered view has advanced. + // This isolates the live-route predicate from session ownership. + g.f.app.canvas_epoch += 1; + assert_ne!(g.f.app.route_context(), Some(current)); + assert_eq!(g.f.app.connection.as_ref().unwrap().context, current); + assert_captured_noop(&mut g.f.app, current, g.y); + g.f.app.canvas_epoch = current.epoch; + // Conversely, incoming/current contexts agree. Retain obsolete session // metadata explicitly to isolate the session-context admission branch. g.f.app.connection.as_mut().unwrap().context.epoch += 1;