Add managed multi-task loop layout #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |