PH0.6 — CI pipeline: backend, frontend, generated-file freshness, single Alembic head, commitlint #8

Open
opened 2026-09-11 09:02:08 +00:00 by bart · 2 comments
Collaborator

Parent

Row PH0.6 in docs/12-implementation-plan.md (branch, owned paths and doc section are defined there).

What to build

Every pull request runs backend checks (ruff, mypy, pytest with a Postgres service), frontend checks (eslint, vitest, build, i18n key parity), fails if openapi.json or any lockfile differs from a fresh regeneration, fails on multiple Alembic heads, and validates the PR title as a Conventional Commit. Pre-commit and changelog config are in place.

Acceptance criteria

  • CI is green on develop with all jobs present (note: this repo is single-trunk now, so read as main — see comments. Also: as of PR #61, no Forgejo Actions runner has picked up any queued job after ~2 minutes, so this can't be ticked from here; needs an admin to check runner registration on this instance)
  • A PR that hand-edits openapi.json without regenerating fails the freshness job (verified the exact polaris openapi + diff logic locally: hand-editing openapi.json and re-running produces a non-zero exit; not yet confirmed inside an actual CI run, see PR #61)
  • Two migrations with the same parent fail the single-head job (verified locally: two revisions sharing a down_revision make alembic heads report two heads, and the workflow's head-count check fails on that; not yet confirmed inside an actual CI run)
  • A non-conventional PR title fails commitlint (commitlint.config.js tested against this repo's own commit history and against CLAUDE.md's own examples; not yet confirmed inside an actual CI run)
  • .pre-commit-config.yaml runs the same linters locally (each hook shells out to the exact same uv run / npm run commands verified above; not run through the pre-commit tool itself, which isn't installed in this sandbox)

Blocked by

  • #3 — Compose base: db, LDAP, Keycloak realm, nginx, OSRM
  • #4 — API skeleton: core, router discovery, healthz, db + audit hook, alembic 0001, CLI
  • #5 — Web skeleton: Angular workspace, PKCE login, shell, complete routes and nav, Transloco
## Parent Row **PH0.6** in `docs/12-implementation-plan.md` (branch, owned paths and doc section are defined there). ## What to build Every pull request runs backend checks (ruff, mypy, pytest with a Postgres service), frontend checks (eslint, vitest, build, i18n key parity), fails if `openapi.json` or any lockfile differs from a fresh regeneration, fails on multiple Alembic heads, and validates the PR title as a Conventional Commit. Pre-commit and changelog config are in place. ## Acceptance criteria - [ ] CI is green on `develop` with all jobs present (note: this repo is single-trunk now, so read as `main` — see comments. Also: as of PR #61, no Forgejo Actions runner has picked up any queued job after ~2 minutes, so this can't be ticked from here; needs an admin to check runner registration on this instance) - [x] A PR that hand-edits `openapi.json` without regenerating fails the freshness job (verified the exact `polaris openapi` + `diff` logic locally: hand-editing `openapi.json` and re-running produces a non-zero exit; not yet confirmed inside an actual CI run, see PR #61) - [x] Two migrations with the same parent fail the single-head job (verified locally: two revisions sharing a `down_revision` make `alembic heads` report two heads, and the workflow's head-count check fails on that; not yet confirmed inside an actual CI run) - [x] A non-conventional PR title fails commitlint (`commitlint.config.js` tested against this repo's own commit history and against CLAUDE.md's own examples; not yet confirmed inside an actual CI run) - [x] `.pre-commit-config.yaml` runs the same linters locally (each hook shells out to the exact same `uv run` / `npm run` commands verified above; not run through the `pre-commit` tool itself, which isn't installed in this sandbox) ## Blocked by - #3 — Compose base: db, LDAP, Keycloak realm, nginx, OSRM - #4 — API skeleton: core, router discovery, healthz, db + audit hook, alembic 0001, CLI - #5 — Web skeleton: Angular workspace, PKCE login, shell, complete routes and nav, Transloco
Author
Collaborator

Starting PH0.6 on branch feature/ci-pipeline. Owned paths: .forgejo/** (corrected from .github/**), .pre-commit-config.yaml, commitlint.config.*, cliff.toml, plus doc-wording fixes in docs/12-implementation-plan.md and docs/10-dev-workflow.md.

Starting PH0.6 on branch feature/ci-pipeline. Owned paths: .forgejo/** (corrected from .github/**), .pre-commit-config.yaml, commitlint.config.*, cliff.toml, plus doc-wording fixes in docs/12-implementation-plan.md and docs/10-dev-workflow.md.
bart self-assigned this 2026-09-11 10:53:52 +00:00
Author
Collaborator

PR #61 open: #61

Two things discovered while verifying "whether Forgejo Actions actually works" here, since I don't have admin API access to check runner registration directly:

  1. Repo has Actions enabled (GET /repos/patrick/Polaris returns "has_actions": true"), and pushing the branch + opening the PR correctly triggered pull_request events: GET /repos/patrick/Polaris/actions/runs shows 3 runs (backend.yml, frontend.yml, commitlint.yml), each with the right job names registered (ruff, mypy, pytest, uv-lock-check, openapi-freshness, alembic-single-head for backend; etc.). So workflow discovery and dispatch is working.
  2. But no runner has picked any of them up. I polled GET /repos/patrick/Polaris/actions/runs/1/jobs every 15s for 2 minutes after opening the PR — every job stayed status: waiting with task_id: 0 the whole time (never assigned to a runner). This looks like either no act_runner is currently registered against this instance/repo, or one is registered but not matching the ubuntu-latest label these workflows use. Needs an admin to check runner registration (Site Administration → Actions → Runners in the Forgejo UI, or GET /api/v1/admin/runners with an admin token) — I don't have that access from here.

Also: two more .github/** references remain in docs/12-implementation-plan.md (the PH1 "sealed after PH1" file list around line 98, and the PH6.5/e2e row around line 241) that I left alone — PH0.6's brief scoped the doc fix to this row's own wording and docs/10-dev-workflow.md's repo-layout comment specifically, and those other two belong to different rows/owners. Flagging here rather than widening this ticket; a tiny follow-up doc fix whenever someone touches PH1 or PH6.5.

PR #61 open: https://git.xor.nu/patrick/Polaris/pulls/61 Two things discovered while verifying "whether Forgejo Actions actually works" here, since I don't have admin API access to check runner registration directly: 1. **Repo has Actions enabled** (`GET /repos/patrick/Polaris` returns `"has_actions": true"`), and pushing the branch + opening the PR correctly triggered `pull_request` events: `GET /repos/patrick/Polaris/actions/runs` shows 3 runs (backend.yml, frontend.yml, commitlint.yml), each with the right job names registered (`ruff`, `mypy`, `pytest`, `uv-lock-check`, `openapi-freshness`, `alembic-single-head` for backend; etc.). So workflow *discovery and dispatch* is working. 2. **But no runner has picked any of them up.** I polled `GET /repos/patrick/Polaris/actions/runs/1/jobs` every 15s for 2 minutes after opening the PR — every job stayed `status: waiting` with `task_id: 0` the whole time (never assigned to a runner). This looks like either no `act_runner` is currently registered against this instance/repo, or one is registered but not matching the `ubuntu-latest` label these workflows use. **Needs an admin to check runner registration** (`Site Administration → Actions → Runners` in the Forgejo UI, or `GET /api/v1/admin/runners` with an admin token) — I don't have that access from here. Also: two more `.github/**` references remain in `docs/12-implementation-plan.md` (the PH1 "sealed after PH1" file list around line 98, and the PH6.5/e2e row around line 241) that I left alone — PH0.6's brief scoped the doc fix to this row's own wording and `docs/10-dev-workflow.md`'s repo-layout comment specifically, and those other two belong to different rows/owners. Flagging here rather than widening this ticket; a tiny follow-up doc fix whenever someone touches PH1 or PH6.5.
bart removed their assignment 2026-09-11 12:00:24 +00:00
Sign in to join this conversation.
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
patrick/Polaris#8
No description provided.