Skip to content

Commit cf567df

Browse files
committed
test: select primary execution deterministically
1 parent a845d3f commit cf567df

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_orchestrator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,11 +658,11 @@ def test_completed_codex_input_overrun_is_recorded_and_kept(self) -> None:
658658
)
659659
self.assertTrue(agent_step.data["usage_budget_exceeded"])
660660
self.assertEqual(agent_step.data["role_usage"]["input_tokens"], 120)
661-
execution = json.loads(
662-
next((directory / "agent-executions").glob("*.json")).read_text(
663-
encoding="utf-8"
664-
)
665-
)
661+
executions = [
662+
json.loads(path.read_text(encoding="utf-8"))
663+
for path in (directory / "agent-executions").glob("*.json")
664+
]
665+
execution = next(row for row in executions if row["role"] == "primary")
666666
self.assertEqual(execution["usage"]["cached_input_tokens"], 90)
667667

668668
self.assertEqual(len(primary.calls), 1)

0 commit comments

Comments
 (0)