File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
app-server/tests/suite/v2 Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,10 @@ async fn turn_start_notify_payload_includes_initialize_client_name() -> Result<(
197197 r#"from pathlib import Path
198198import sys
199199
200- Path(__file__).with_name("notify.json").write_text(sys.argv[-1], encoding="utf-8")
200+ payload_path = Path(__file__).with_name("notify.json")
201+ tmp_path = payload_path.with_suffix(".json.tmp")
202+ tmp_path.write_text(sys.argv[-1], encoding="utf-8")
203+ tmp_path.replace(payload_path)
201204"# ,
202205 ) ?;
203206 let notify_file = codex_home. path ( ) . join ( "notify.json" ) ;
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ use responses::start_mock_server;
2323use std:: time:: Duration ;
2424
2525#[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
26- #[ ignore = "flaky on ubuntu-24.04-arm - aarch64-unknown-linux-gnu" ]
27- // The notify script gets far enough to create (and therefore surface) the file,
28- // but hasn’t flushed the JSON yet. Reading an empty file produces EOF while parsing
29- // a value at line 1 column 0. May be caused by a slow runner.
3026async fn summarize_context_three_requests_and_instructions ( ) -> anyhow:: Result < ( ) > {
3127 skip_if_no_network ! ( Ok ( ( ) ) ) ;
3228
@@ -43,7 +39,10 @@ async fn summarize_context_three_requests_and_instructions() -> anyhow::Result<(
4339 & notify_script,
4440 r#"#!/bin/bash
4541set -e
46- echo -n "${@: -1}" > $(dirname "${0}")/notify.txt"# ,
42+ payload_path="$(dirname "${0}")/notify.txt"
43+ tmp_path="${payload_path}.tmp"
44+ echo -n "${@: -1}" > "${tmp_path}"
45+ mv "${tmp_path}" "${payload_path}""# ,
4746 ) ?;
4847 std:: fs:: set_permissions ( & notify_script, std:: fs:: Permissions :: from_mode ( 0o755 ) ) ?;
4948
You can’t perform that action at this time.
0 commit comments