-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (94 loc) · 4.4 KB
/
python-compat.yml
File metadata and controls
108 lines (94 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Python Compatibility
on:
push:
pull_request:
jobs:
smoke:
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.7"
runner: ubuntu-22.04
- python-version: "3.8"
runner: ubuntu-latest
- python-version: "3.9"
runner: ubuntu-latest
- python-version: "3.10"
runner: ubuntu-latest
- python-version: "3.11"
runner: ubuntu-latest
- python-version: "3.12"
runner: ubuntu-latest
- python-version: "3.13"
runner: ubuntu-latest
- python-version: "3.14"
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Compile scripts
run: python -m py_compile scripts/*.py
- name: Smoke test state lifecycle
shell: bash
run: |
set -euo pipefail
tmpdir="$(mktemp -d)"
task_id="compat-smoke"
state_path="$tmpdir/.codex-loop/tasks/$task_id/state.json"
marker_path="$tmpdir/done.txt"
python scripts/init_state.py \
--goal "Verify compatibility smoke test" \
--global-stop-condition "Stop only when the lifecycle scripts run cleanly and done.txt contains done." \
--workspace-root "$tmpdir" \
--task-id "$task_id" \
--success-evidence "check_stop.py returns success" \
--require-path done.txt \
--require-text "done.txt::done"
python scripts/list_tasks.py --workspace-root "$tmpdir"
python scripts/show_task.py --workspace-root "$tmpdir" --task-id "$task_id"
python scripts/append_event.py \
--state "$state_path" \
--kind round.started \
--message "Compatibility smoke iteration 1 announced" \
--data iteration=1 \
--data task="record first lifecycle iteration" \
--data local_done_condition="first verified round is persisted" \
--data global_stop_condition="lifecycle scripts run and done.txt contains done" \
--data stop_after_this_round="machine stop checks pass"
python scripts/update_state.py \
--state "$state_path" \
--task "Record the first smoke-test iteration" \
--local-done-condition "A verified iteration is appended" \
--result-summary "The first iteration was written successfully" \
--verification-summary "Validated by reading the updated state file" \
--announcement "Iteration 1: record the first smoke-test iteration" \
--next-task "Create the success marker and finalize the loop" \
--agent-id "compat-smoke-executor" \
--executor-inherited-context
printf 'done\n' > "$marker_path"
python scripts/update_state.py \
--state "$state_path" \
--task "Create the success marker and finalize the loop" \
--local-done-condition "done.txt exists and contains done" \
--result-summary "The lifecycle smoke marker was created and the loop was marked completed" \
--verification-summary "Validated by reading done.txt and re-running check_stop.py" \
--announcement "Iteration 2: create the success marker and finalize the loop" \
--artifact "$marker_path" \
--evidence "$marker_path" \
--stop-met
python scripts/check_stop.py --state "$state_path"
python scripts/report_status.py --state "$state_path" --label compat.smoke
python scripts/compact_state.py --state "$state_path" --keep-last 1
test -f "$tmpdir/.codex-loop/registry.json"
test -f "$tmpdir/.codex-loop/tasks/$task_id/events.jsonl"
test -f "$tmpdir/.codex-loop/tasks/$task_id/iterations.jsonl"
test -f "$tmpdir/.codex-loop/tasks/$task_id/status-history.jsonl"
test -f "$tmpdir/.codex-loop/tasks/$task_id/latest-status.txt"
test -f "$tmpdir/.codex-loop/tasks/$task_id/latest-stop-report.json"
test -f "$tmpdir/.codex-loop/tasks/$task_id/run-summary.md"
test -f "$tmpdir/.codex-loop/tasks/$task_id/rounds/iteration-0001.md"
test -f "$tmpdir/.codex-loop/tasks/$task_id/rounds/iteration-0002.md"