diff --git a/.repository-projection.json b/.repository-projection.json index 7e6fb8001..5665506fa 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "deixic-code", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "373dd517beb6babba8f831ede8501edef7cd0520", + "sourceSha": "f85ea3e433c29ca965a8940cefa8efbb7f46c2d8", "destinationRepository": "dx-corp/code", - "priorProjectedBase": "d30b1b01dee74cc2a51d546423e51e80ed66f31f", + "priorProjectedBase": "f273f9064fc052632b76f0a74be6fbdd1ad11f57", "definitionDigest": "82936441c776e3e8edb5d215a75007ec9714a233f489d460075d79d5ef5ba32f", "toolDigest": "c244d99199a7ae3eb8ff644a99462163c23b0bb6a83ef50af01efbdca0b81d04", - "contentDigest": "67278d7f71d18a40a13eb757faff25c35ae2c1e05c6f963b74ac7d6da00953b9", + "contentDigest": "489cfe5065a3880db2d45cf3cf981f2a55c119abf49fefedc69410f30176ce7b", "publicationEligible": true } diff --git a/packages/local-host-rs/src/agent/native_codex_tests.rs b/packages/local-host-rs/src/agent/native_codex_tests.rs index 096bc7a67..515edeea0 100644 --- a/packages/local-host-rs/src/agent/native_codex_tests.rs +++ b/packages/local-host-rs/src/agent/native_codex_tests.rs @@ -29,6 +29,20 @@ fn fixture_event_kind(event: &FromAgent) -> &'static str { } } +fn codex_fixture_startup_failure( + boundary: &str, + elapsed: tokio::time::error::Elapsed, + events: &mut tokio::sync::mpsc::UnboundedReceiver, +) -> ! { + let mut startup_errors = Vec::new(); + while let Ok(event) = events.try_recv() { + if let FromAgent::Error { message, .. } | FromAgent::ProviderError { message, .. } = event { + startup_errors.push(message); + } + } + panic!("{boundary}: {elapsed}; startup errors: {startup_errors:?}"); +} + fn configure_codex_fixture_identity() { crate::credential_mode::install_test_identity_env(); } @@ -906,7 +920,13 @@ async fn codex_cancel_lifecycle_fixture() { } }) .await - .expect("fixture peer should accept the turn during startup"); + .unwrap_or_else(|elapsed| { + codex_fixture_startup_failure( + "fixture peer should accept the turn during startup", + elapsed, + &mut events, + ) + }); tokio::time::timeout(std::time::Duration::from_secs(3), async { loop { match events.recv().await { @@ -1607,6 +1627,9 @@ send({{method:'turn/completed',params:{{turnId:'turn-usage'}}}});}},10)}} #[test] fn codex_cancel_after_turn_acceptance_emits_one_terminal_lifecycle_event() { + if crate::config::test_reexec_for_process_isolation() { + return; + } let root = tempfile::tempdir().expect("fixture root"); let current = std::env::current_exe().expect("current test binary"); let script = root.path().join("app-server.js"); @@ -1646,6 +1669,15 @@ else if(x.method==='turn/interrupt'){ .env("MAESTRO_CODEX_CANCEL_SCENARIO", scenario) .env("MAESTRO_CODEX_CANCEL_LOG", &log) .env("MAESTRO_HOME", dir.join("maestro-home")) + // This standalone child owns its policy fixture. Module-local + // managed-policy writers do not share the process snapshot lock. + .env_remove("MAESTRO_MANAGED_POLICY_PATH") + .env_remove("MAESTRO_MANAGED_POLICY_STATE_PATH") + .env_remove("MAESTRO_MANAGED_POLICY_PUBLIC_KEY") + .env_remove("MAESTRO_MANAGED_POLICY_KEY_ID") + .env_remove("MAESTRO_MANAGED_POLICY_AUDIT_PATH") + .env_remove("MAESTRO_ENTERPRISE_POLICY_PATH") + .env_remove("MAESTRO_POLICY_PATH") .env("MAESTRO_CODEX_APP_SERVER_COMMAND", "node") .env("OPENAI_CODEX_TOKEN", "fixture-token") .env("RUST_BACKTRACE", "1") @@ -1789,7 +1821,13 @@ async fn codex_pre_turn_failure_fixture() { } }) .await - .expect("turn/start observation barrier"); + .unwrap_or_else(|elapsed| { + codex_fixture_startup_failure( + "turn/start observation barrier", + elapsed, + &mut events, + ) + }); agent.cancel(); } let (snapshot, errors, statuses) = receive_codex_fixture_snapshot(&mut events).await; @@ -1843,6 +1881,9 @@ async fn codex_pre_turn_failure_fixture() { #[test] fn codex_pre_turn_failures_preserve_retry_prompt_and_discard_terminal_give_up() { + if crate::config::test_reexec_for_process_isolation() { + return; + } let root = tempfile::tempdir().expect("fixture root"); let maestro_home = root.path().join("maestro-home"); let codex_home = root.path().join("codex-home");