Skip to content

Commit d157bea

Browse files
ci: diagnose exact idle code-cell cancellation
1 parent ae00bbd commit d157bea

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Diagnose the exact idle code-cell cancellation
2+
on:
3+
push:
4+
branches: [codex/mac-idle-code-cell-probe-20261111-a]
5+
permissions:
6+
contents: read
7+
actions: read
8+
jobs:
9+
probe:
10+
runs-on: macos-15
11+
timeout-minutes: 8
12+
env:
13+
UV_FROZEN: "1"
14+
UV_PYTHON: "3.14"
15+
RUST_MIN_STACK: "16777216"
16+
steps:
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
18+
with:
19+
ref: ae00bbd880ad2bfb98a1989c92d18fecd9f33609
20+
persist-credentials: false
21+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
22+
with:
23+
python-version: "3.14"
24+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
25+
with:
26+
name: native-macOS-ARM64
27+
run-id: 43032865251
28+
github-token: ${{ github.token }}
29+
path: ${{ runner.temp }}/agents-native
30+
- name: Select the existing qualified native products
31+
run: |
32+
python - <<'PYTHON'
33+
import os
34+
from pathlib import Path
35+
products = Path(os.environ["RUNNER_TEMP"]) / "agents-native"
36+
wheel, = products.glob("openai_agents-*.whl")
37+
fixture = products / "exec-server-fixture"
38+
assert fixture.is_file()
39+
fixture.chmod(fixture.stat().st_mode | 0o111)
40+
with open(os.environ["GITHUB_ENV"], "a") as out:
41+
out.write(f"OPENAI_AGENTS_NATIVE_WHEEL={wheel.resolve()}\n")
42+
out.write(f"CODEX_EXEC_SERVER_TEST_BINARY={fixture.resolve()}\n")
43+
PYTHON
44+
uv sync --all-extras --dev
45+
- name: Run only the failing node with phase-only diagnostics
46+
env:
47+
PYTEST_ADDOPTS: "-q -s --tb=short"
48+
run: |
49+
cat > "$RUNNER_TEMP/idle_probe.py" <<'PYTHON'
50+
import sys
51+
import pytest
52+
names = {
53+
"test_idle_root_cells_stop_and_other_same_agent_session_keeps_running",
54+
"inspect_and_reuse",
55+
}
56+
def phase(frame, event, _argument):
57+
selected = (
58+
frame.f_code.co_filename.endswith("/test_review_ii_code_cell_interrupt.py")
59+
and frame.f_code.co_name in names
60+
)
61+
if selected and event == "line":
62+
print(f"PHASE {frame.f_code.co_name}:{frame.f_lineno}", flush=True)
63+
return phase if selected else None
64+
sys.settrace(phase)
65+
raise SystemExit(pytest.main([
66+
"packages/codex/tests/test_review_ii_code_cell_interrupt.py::test_idle_root_cells_stop_and_other_same_agent_session_keeps_running[graceful-root]",
67+
"-q", "-s", "--tb=short",
68+
]))
69+
PYTHON
70+
uv run --no-sync python - <<'PYTHON'
71+
import os, subprocess, sys
72+
subprocess.run([
73+
sys.executable, "packages/codex/scripts/test_native.py", "--sdk",
74+
os.environ["RUNNER_TEMP"] + "/idle_probe.py",
75+
], timeout=90, check=True)
76+
PYTHON

0 commit comments

Comments
 (0)