|
1 | 1 | use crate::support::*; |
| 2 | +#[cfg(feature = "test-transport")] |
2 | 3 | use tracedecay_agent_hosts::ports::session_evidence::{LcmGrepSort, LcmScope}; |
3 | 4 |
|
4 | 5 | #[test] |
@@ -235,6 +236,7 @@ async fn project_reflector_and_skill_writer_terminal_evidence_matrix_has_zero_wr |
235 | 236 | assert!(!profile_root.exists()); |
236 | 237 | } |
237 | 238 |
|
| 239 | +#[cfg(feature = "test-transport")] |
238 | 240 | #[tokio::test] |
239 | 241 | async fn session_reflector_runner_auto_applies_valid_fact_proposals_by_default() { |
240 | 242 | let temp = tempdir().unwrap(); |
@@ -556,6 +558,7 @@ async fn session_reflector_runner_auto_applies_valid_fact_proposals_by_default() |
556 | 558 | assert!(records[0].applied_ops.is_some()); |
557 | 559 | } |
558 | 560 |
|
| 561 | +#[cfg(feature = "test-transport")] |
559 | 562 | #[tokio::test] |
560 | 563 | async fn session_reflector_runner_auto_apply_ignores_dashboard_approval_gate() { |
561 | 564 | const HIGH_ENTROPY_RUN_ID: &str = |
@@ -722,6 +725,7 @@ async fn session_reflector_runner_auto_apply_ignores_dashboard_approval_gate() { |
722 | 725 | ); |
723 | 726 | } |
724 | 727 |
|
| 728 | +#[cfg(feature = "test-transport")] |
725 | 729 | #[tokio::test] |
726 | 730 | async fn session_reflector_runner_self_manages_partial_noops_without_review_gate() { |
727 | 731 | let temp = tempdir().unwrap(); |
@@ -884,6 +888,7 @@ async fn session_fact_proposals_replay_same_run_idempotently() { |
884 | 888 | assert_eq!(proposals.proposals()[0].automation_run_id(), Some("run-a")); |
885 | 889 | } |
886 | 890 |
|
| 891 | +#[cfg(feature = "test-transport")] |
887 | 892 | #[tokio::test] |
888 | 893 | async fn session_reflector_rejects_unsupported_source_role_and_time_filters_without_writes() { |
889 | 894 | let _env_lock = ENV_LOCK.lock().await; |
@@ -978,6 +983,7 @@ async fn session_reflector_rejects_unsupported_source_role_and_time_filters_with |
978 | 983 | ); |
979 | 984 | } |
980 | 985 |
|
| 986 | +#[cfg(feature = "test-transport")] |
981 | 987 | #[tokio::test] |
982 | 988 | async fn session_reflector_replays_recent_sessions_without_keyword_matches() { |
983 | 989 | let temp = tempdir().unwrap(); |
@@ -1058,6 +1064,7 @@ async fn session_reflector_replays_recent_sessions_without_keyword_matches() { |
1058 | 1064 | assert_eq!(run.ledger_record.rejected_count, 0); |
1059 | 1065 | } |
1060 | 1066 |
|
| 1067 | +#[cfg(feature = "test-transport")] |
1061 | 1068 | #[tokio::test] |
1062 | 1069 | async fn session_reflector_suppresses_replay_for_filtered_runs() { |
1063 | 1070 | let temp = tempdir().unwrap(); |
@@ -1155,8 +1162,10 @@ async fn session_reflector_skips_when_replay_disabled_and_no_grep_hits() { |
1155 | 1162 | ); |
1156 | 1163 | } |
1157 | 1164 |
|
| 1165 | +#[cfg(feature = "test-transport")] |
1158 | 1166 | struct NoSummaryReplayBackend; |
1159 | 1167 |
|
| 1168 | +#[cfg(feature = "test-transport")] |
1160 | 1169 | impl AgentTaskBackend for NoSummaryReplayBackend { |
1161 | 1170 | fn run_task( |
1162 | 1171 | &self, |
@@ -1189,6 +1198,7 @@ impl AgentTaskBackend for NoSummaryReplayBackend { |
1189 | 1198 | } |
1190 | 1199 | } |
1191 | 1200 |
|
| 1201 | +#[cfg(feature = "test-transport")] |
1192 | 1202 | #[tokio::test] |
1193 | 1203 | async fn session_reflector_replay_respects_include_summaries_false() { |
1194 | 1204 | let temp = tempdir().unwrap(); |
@@ -1263,6 +1273,7 @@ async fn session_reflector_replay_respects_include_summaries_false() { |
1263 | 1273 | assert_eq!(run.ledger_record.status, AutomationRunStatus::Succeeded); |
1264 | 1274 | } |
1265 | 1275 |
|
| 1276 | +#[cfg(feature = "test-transport")] |
1266 | 1277 | #[tokio::test] |
1267 | 1278 | async fn session_reflector_runner_ledgers_malformed_backend_output() { |
1268 | 1279 | let temp = tempdir().unwrap(); |
@@ -1326,6 +1337,7 @@ async fn session_reflector_runner_ledgers_malformed_backend_output() { |
1326 | 1337 | assert_eq!(records[0].error_retryable, Some(false)); |
1327 | 1338 | } |
1328 | 1339 |
|
| 1340 | +#[cfg(feature = "test-transport")] |
1329 | 1341 | #[tokio::test] |
1330 | 1342 | async fn session_reflector_runner_ledgers_missing_facts_array() { |
1331 | 1343 | let temp = tempdir().unwrap(); |
@@ -1389,6 +1401,7 @@ async fn session_reflector_runner_ledgers_missing_facts_array() { |
1389 | 1401 | assert_eq!(records[0].error_retryable, Some(false)); |
1390 | 1402 | } |
1391 | 1403 |
|
| 1404 | +#[cfg(feature = "test-transport")] |
1392 | 1405 | #[tokio::test] |
1393 | 1406 | async fn session_reflector_runner_records_noop_fallback_when_backend_run_task_fails() { |
1394 | 1407 | let temp = tempdir().unwrap(); |
|
0 commit comments