From ee44f8c16b736c36075eaadfe4bee6551194951a Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Sun, 8 Nov 2026 16:26:19 -0800 Subject: [PATCH] test(daemon): isolate failed-mount cleanup from graph readiness Preserve the failed-mount fixture repair from 4984a54 byte-for-byte in its own reviewable change above the shared scheduler repair #4821. The rollback journey uses the existing session-retrieval opener, checks the authoritative session path, and verifies both reopened projects bind their own session stores. No deadline or assertion is removed, and the malformed graph must still refuse admission. This separates CI fixture work from the retention-specific #4798 review without reverting fixes, rewriting history, or editing #4813. It is not evidence that the affected-host retention CPU incident is resolved. Refs #4787. --- .../drop_shutdown_journey_test.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/crates/tracedecay/src/daemon/production_harness/drop_shutdown_journey_test.rs b/crates/tracedecay/src/daemon/production_harness/drop_shutdown_journey_test.rs index 7b159cbcf6a..51efc83f65c 100644 --- a/crates/tracedecay/src/daemon/production_harness/drop_shutdown_journey_test.rs +++ b/crates/tracedecay/src/daemon/production_harness/drop_shutdown_journey_test.rs @@ -185,7 +185,7 @@ async fn a_failed_later_mount_releases_the_whole_composition_before_returning() .expect("refused store root"); std::fs::write(&refused_graph, b"not a project graph database").expect("refused graph"); - let error = match ProductionProjectCompositionHarnessV1::open( + let error = match ProductionProjectCompositionHarnessV1::open_for_session_retrieval( isolation.path(), [first.clone(), refused.clone()], ) @@ -207,7 +207,7 @@ async fn a_failed_later_mount_releases_the_whole_composition_before_returning() let stores = [ profile.join("global.db"), profile.join("user-sessions.db"), - first_layout.data_root.join("sessions.db"), + first_layout.sessions_db_path, first_layout.graph_db_path, ]; for store in &stores { @@ -229,14 +229,23 @@ async fn a_failed_later_mount_releases_the_whole_composition_before_returning() } std::fs::remove_file(&refused_graph).expect("remove the fixture refusal"); - let harness = ProductionProjectCompositionHarnessV1::open( + let harness = ProductionProjectCompositionHarnessV1::open_for_session_retrieval( isolation.path(), [first.clone(), refused.clone()], ) .await .expect("both exact projects reopen after failed-open rollback"); - assert!(harness.server(&first).is_ok()); - assert!(harness.server(&refused).is_ok()); + for project in [&first, &refused] { + let server = harness.server(project).expect("reopened project server"); + let store = server + .project_session_db() + .expect("mounted project sessions"); + let layout = default_profile_sharded_layout(project, &profile).unwrap(); + assert_eq!( + store.db_path().canonicalize().unwrap(), + layout.sessions_db_path.canonicalize().unwrap() + ); + } harness.shutdown().await; }