From 3bc35147561ee9ce20ff22e6922bb6a686fb38fe Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 20 Oct 2026 08:31:12 +0800 Subject: [PATCH] test: keep test_fanout_stats' orphan workers inside the report day in every timezone The orphan fixture used 2020-01-02T18:05Z, which is 02:05 on the next local day in Hong Kong, Tokyo and Sydney. The report day is local midnight to local midnight, so the window correctly dropped both workers and 5 assertions failed on any machine at UTC+8 or later (0 failures from UTC-8 to UTC+0). Moved to 09:05Z, which is 2020-01-02 from UTC-5 to UTC+11 and still hours from the other fixture sessions. Verified red before (5 failures each in Asia/Hong_Kong, Asia/Tokyo, Australia/Sydney) and 0 failures after in all seven of New York, Los Angeles, UTC, London, Hong Kong, Tokyo and Sydney. --- tests/run-all.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/run-all.sh b/tests/run-all.sh index 5ef49c3..f9cf527 100755 --- a/tests/run-all.sh +++ b/tests/run-all.sh @@ -3180,11 +3180,14 @@ mk_fanout_fixture(){ # $1=root touch -t "$STAMP" "$f" done # A fanout whose parent file is gone still groups, under the path that file would have had. + # 09:05Z is still 2020-01-02 in local time from UTC-5 to UTC+11, which a report day needs: the day + # is local midnight to local midnight, and 18:05Z was already the next day in Hong Kong, Tokyo and + # Sydney, so the window dropped these workers there. It stays hours away from the other sessions. mkdir -p "$b/orphan1/subagents" for f in "$b/orphan1/subagents/agent-x.jsonl" "$b/orphan1/subagents/agent-y.jsonl"; do printf '%s\n' \ - '{"type":"user","isSidechain":true,"timestamp":"2020-01-02T18:05:00Z","message":{"content":"worker task"}}' \ - '{"type":"assistant","isSidechain":true,"timestamp":"2020-01-02T18:05:05Z","message":{"content":[{"type":"tool_use","name":"Read"}]}}' > "$f" + '{"type":"user","isSidechain":true,"timestamp":"2020-01-02T09:05:00Z","message":{"content":"worker task"}}' \ + '{"type":"assistant","isSidechain":true,"timestamp":"2020-01-02T09:05:05Z","message":{"content":[{"type":"tool_use","name":"Read"}]}}' > "$f" touch -t "$STAMP" "$f" done }