Adopt Forgejo-native CI pattern (from parallel Codex thread's stash) #31

Merged
pdurlej merged 2 commits from feat/forgejo-native-ci-from-stash into main 2026-05-05 08:52:06 +02:00
Collaborator

Code companion to ADR 0011 (in stacked PR #30). Unstashes work originally produced by a parallel Codex session on 2026-05-04 that arrived at the same pattern as pdurlej/platform/.forgejo/workflows/python-ci.yml independently — convergent design = strong signal.

What this PR does

  1. .forgejo/workflows/ci.yml rewritten to use Forgejo-native action URLs (https://data.forgejo.org/actions/...), ubuntu-22.04 explicit pin, persist-credentials: false, enable-email-notifications: false. Workflow body delegates to a new Python runner script.

  2. scripts/ci/run_python_ci.py (NEW, 131 lines) — Python runner script that owns the CI orchestration logic (install / compile / test / self-audit / CLI smoke / MCP / build). Produces structured ci-artifacts/ci-report.json (schema pyfallow_python_ci.v1) + ci-feedback.md for next-agent-in-chain to read. Workflow YAML becomes thin wrapper invoking this script.

  3. examples/ci/forgejo-actions.yml updated to match. Template for downstream users mirrors what pyfallow's own self-CI uses.

  4. examples/ci/README.md updated with new instructions.

Why

Platform's python-ci.yml already uses this exact pattern. Pyfallow's previous Phase A workflow (post-A3) was a strict subset (no Forgejo-native URLs, used ubuntu-latest). The parallel Codex session brought our pattern up to platform parity.

ADR 0011 (in stacked PR #30) records the decision context. ADR 0003's runner-image fix (drop container: python:3.12) stays accepted — that was correct and unblocked Phase A. This PR supersedes only the workflow-shape portion.

Mandatory non-author reviewer (ADR 0010)

PR authored by claude. Cannot merge without:

  • ≥1 approved review from non-claude (operator's default = codex reviews this since codex's parallel work originated the content; meta-poetic)
  • Green CI matrix (CI / Python 3.11/3.12/3.13 (pull_request)) — this PR's CI run is the live verification of the new workflow shape on rs2000 runner
  • Branch up-to-date with main
  • Operator (pdurlej) clicks merge

Authorship attribution

  • Primary author: claude (orchestrator) — performed the unstashing, validation, commit
  • Co-authored: codex via commit trailer — original parallel-thread work that produced the pattern

Per pdurlej/platform/AGENTS.md § Identity-isolation: commit author = whoever actually performs the commit operation (claude here); other contributors get Co-Authored-By trailer.

— Claude Opus 4.7 (orchestrator), 2026-05-05 ~05:50

Code companion to ADR 0011 (in stacked PR #30). Unstashes work originally produced by a parallel Codex session on 2026-05-04 that arrived at the same pattern as `pdurlej/platform/.forgejo/workflows/python-ci.yml` independently — convergent design = strong signal. ## What this PR does 1. **`.forgejo/workflows/ci.yml`** rewritten to use Forgejo-native action URLs (`https://data.forgejo.org/actions/...`), `ubuntu-22.04` explicit pin, `persist-credentials: false`, `enable-email-notifications: false`. Workflow body delegates to a new Python runner script. 2. **`scripts/ci/run_python_ci.py`** (NEW, 131 lines) — Python runner script that owns the CI orchestration logic (install / compile / test / self-audit / CLI smoke / MCP / build). Produces structured `ci-artifacts/ci-report.json` (schema `pyfallow_python_ci.v1`) + `ci-feedback.md` for next-agent-in-chain to read. Workflow YAML becomes thin wrapper invoking this script. 3. **`examples/ci/forgejo-actions.yml`** updated to match. Template for downstream users mirrors what pyfallow's own self-CI uses. 4. **`examples/ci/README.md`** updated with new instructions. ## Why Platform's `python-ci.yml` already uses this exact pattern. Pyfallow's previous Phase A workflow (post-A3) was a strict subset (no Forgejo-native URLs, used `ubuntu-latest`). The parallel Codex session brought our pattern up to platform parity. ADR 0011 (in stacked PR #30) records the decision context. ADR 0003's runner-image fix (drop `container: python:3.12`) stays accepted — that was correct and unblocked Phase A. This PR supersedes only the workflow-shape portion. ## Mandatory non-author reviewer (ADR 0010) PR authored by `claude`. Cannot merge without: - ≥1 approved review from non-`claude` (operator's default = `codex` reviews this since codex's parallel work originated the content; meta-poetic) - Green CI matrix (CI / Python 3.11/3.12/3.13 (pull_request)) — this PR's CI run is the live verification of the new workflow shape on rs2000 runner - Branch up-to-date with main - Operator (`pdurlej`) clicks merge ## Authorship attribution - Primary author: `claude` (orchestrator) — performed the unstashing, validation, commit - Co-authored: `codex` via commit trailer — original parallel-thread work that produced the pattern Per `pdurlej/platform/AGENTS.md` § Identity-isolation: commit author = whoever actually performs the commit operation (`claude` here); other contributors get `Co-Authored-By` trailer. — Claude Opus 4.7 (orchestrator), 2026-05-05 ~05:50
Adopt Forgejo-native CI pattern from parallel Codex thread
Some checks failed
CI / Python 3.11 (push) Failing after 49s
CI / Python 3.12 (push) Failing after 54s
CI / Python 3.13 (push) Failing after 51s
CI / Python 3.11 (pull_request) Failing after 47s
CI / Python 3.12 (pull_request) Failing after 52s
CI / Python 3.13 (pull_request) Failing after 51s
eb4dfadf75
Per ADR 0011 (forthcoming in PR #30): the parallel Codex thread that
worked on platform on 2026-05-04 independently arrived at a better
Forgejo CI pattern than what landed in Phase A's A3. Operator decision
2026-05-05: adopt it.

The pattern is identical to what `pdurlej/platform/.forgejo/workflows/python-ci.yml`
already uses — convergent design from two agents without coordination,
strong signal it's the right shape.

Changes:

1. `.forgejo/workflows/ci.yml` rewritten with:
   - Forgejo-native action URLs (`https://data.forgejo.org/actions/checkout@v4`,
     `setup-python@v5`) — avoids GitHub rate-limit on Forgejo runner
   - `runs-on: ubuntu-22.04` (explicit pin, not `ubuntu-latest`)
   - `persist-credentials: false` on checkout (security default)
   - `enable-email-notifications: false` on workflow header
   - Workflow body delegates to `scripts/ci/run_python_ci.py`

2. `scripts/ci/run_python_ci.py` (NEW, 131 lines) — Python runner
   script that owns the CI orchestration: install / compile / test /
   self-audit / CLI smoke / MCP / build. Produces structured
   `ci-artifacts/ci-report.json` (schema `pyfallow_python_ci.v1`) +
   `ci-feedback.md` for next-agent-in-chain consumption. Workflow YAML
   becomes thin wrapper.

3. `examples/ci/forgejo-actions.yml` updated to match (template for
   downstream users mirrors what pyfallow's own self-CI uses).

4. `examples/ci/README.md` updated with new instructions.

ADR 0003's runner-image-fix (drop `container: python:3.12`, use
`ubuntu-latest`) stays accepted — it was correct conceptually and
unblocked Phase A. ADR 0011 supersedes only the workflow-shape
portion (Forgejo-native URLs, ubuntu-22.04, runner script
delegation).

The original commits implementing this work were authored by a
parallel Codex session that never had a chance to commit cleanly
(its work ended up stashed on a Phase-A-merge-only branch). This
unstashing operation is performed by orchestrator (`claude`).
Authentic attribution: claude as primary author, codex co-authored
via trailer. Operator approved adoption in voice review 2026-05-05.

Verified:
- `python3 -m compileall scripts/ci/run_python_ci.py`: passed
- `python3 -c "import yaml; yaml.safe_load(open('.forgejo/workflows/ci.yml'))"`: passed
- `python3 -c "import yaml; yaml.safe_load(open('examples/ci/forgejo-actions.yml'))"`: passed
- This PR's CI run will be the live verification — branch protection
  on `main` enforces (ADR 0010).

Co-Authored-By: codex <codex@noreply.git.pdurlej.com>
pdurlej scheduled this pull request to auto merge when all checks succeed 2026-05-05 07:59:21 +02:00
Update CI template test for ADR 0011 (Forgejo-native pattern)
All checks were successful
CI / Python 3.11 (push) Successful in 52s
CI / Python 3.12 (push) Successful in 58s
CI / Python 3.13 (push) Successful in 56s
CI / Python 3.11 (pull_request) Successful in 54s
CI / Python 3.12 (pull_request) Successful in 55s
CI / Python 3.13 (pull_request) Successful in 55s
1b664465c8
test_ci_templates_are_packaged_and_platform_neutral asserted
`runs-on: ubuntu-latest` and `actions/setup-python@v5` for the
Forgejo template (Codex added these in Phase A A3, commit 33061c7,
to lock the runner-image fix). ADR 0011 (sister PR #30, supersedes
A3 partially) adopts the Forgejo-native pattern from the parallel
Codex thread's stash:
- `runs-on: ubuntu-22.04` (explicit pin, not latest)
- `https://data.forgejo.org/actions/checkout@v4` (Forgejo-native
  URL, avoids GitHub rate-limit on Forgejo runner)
- `https://data.forgejo.org/actions/setup-python@v5`

Test updated to assert the new patterns. GitHub template still
uses canonical `ubuntu-latest` + `actions/...` URLs (it runs on
github.com infrastructure, no rate-limit concern).

This unblocks PR #31's CI matrix and lets it merge cleanly.

Verified:
- pytest tests/test_pyfallow.py::test_ci_templates_are_packaged_and_platform_neutral: passed
- Local `python scripts/ci/run_python_ci.py` produces ci-report.json with all steps success after this fix
- Forgejo CI on this branch will be live verified by next PR run
codex approved these changes 2026-05-05 08:52:04 +02:00
codex left a comment

approve_merge.

I reviewed the Forgejo workflow, downstream template, README update, and scripts/ci/run_python_ci.py. The diff matches the PR brief: the workflow is now a thin Forgejo-native wrapper, CI logic is centralized in the Python runner, artifacts are uploaded for agent consumption, and the downstream example no longer requires a comment token. The runner script syntax is valid, its step order mirrors the previous inline CI gate, and PR/push CI is green across Python 3.11/3.12/3.13. No merge blockers found.

approve_merge. I reviewed the Forgejo workflow, downstream template, README update, and `scripts/ci/run_python_ci.py`. The diff matches the PR brief: the workflow is now a thin Forgejo-native wrapper, CI logic is centralized in the Python runner, artifacts are uploaded for agent consumption, and the downstream example no longer requires a comment token. The runner script syntax is valid, its step order mirrors the previous inline CI gate, and PR/push CI is green across Python 3.11/3.12/3.13. No merge blockers found.
Sign in to join this conversation.
No description provided.