frontend-e2e: Playwright job has never passed in PR CI — container Python 3.10 vs backend 3.12 requirement (PEP 695) #110

Closed
opened 2026-08-24 05:56:28 +00:00 by Mark · 3 comments
Owner

Problem

The frontend-e2e job in .forgejo/workflows/ci.yml has never passed in a PR run on this repo. Historical job status across all runs: 49 skipped (deps red), 32 cancelled, and on the first run where its deps (backend-test, frontend-test) were green, it failed entirely.

Root cause

The job uses container: mcr.microsoft.com/playwright:v1.40.0-jammy (Ubuntu jammy → Python 3.10). The backend requires Python 3.12: backend/app/services/llm/parsing.py uses PEP 695 generics def safe_parse_llm_json[T: BaseModel](...) (introduced in commit 6a0ee5b). When the job starts the backend with python3 -m uvicorn app.main:app, the import fails with:

ImportError: cannot import name UTC from datetime (/usr/lib/python3.10/datetime.py)

(with the PEP 695 SyntaxError also present on a pre-3.12 interpreter). The Start backend server step swallows this via || echo "Backend not ready yet", so every Playwright spec then fails in 2-3ms (backend down → frontend can't render), producing ~120 failing specs across chromium/firefox/webkit.

Why this matters

all-checks-pass gates on needs.frontend-e2e.result; until this job can actually pass, no PR can merge with a genuinely-green full gate. It was scoped non-gating (continue-on-error) on PR #107 (commit pending) so the ruff-lint PR and issue #100 can land, mirroring the mypy#109 convention.

Scope (proposed)

  1. Give the e2e job a Python 3.12 runtime (e.g. install python3.12 in the playwright container, or switch to a newer playwright image that bundles 3.12) AND use it consistently for the backend dependency install + uvicorn launch.
  2. Re-enable gating (drop continue-on-error) once the suite runs and any test debt introduced by the sandbox/backend shape is cleared.
  3. Consider whether the || echo on backend start should be removed so a dead backend fails the job loudly instead of producing 120 meaningless green-then-fail specs.
## Problem The `frontend-e2e` job in `.forgejo/workflows/ci.yml` has **never passed** in a PR run on this repo. Historical job status across all runs: 49 skipped (deps red), 32 cancelled, and on the first run where its deps (backend-test, frontend-test) were green, it failed entirely. ## Root cause The job uses `container: mcr.microsoft.com/playwright:v1.40.0-jammy` (Ubuntu jammy → Python 3.10). The backend requires Python 3.12: `backend/app/services/llm/parsing.py` uses PEP 695 generics `def safe_parse_llm_json[T: BaseModel](...)` (introduced in commit 6a0ee5b). When the job starts the backend with `python3 -m uvicorn app.main:app`, the import fails with: ``` ImportError: cannot import name UTC from datetime (/usr/lib/python3.10/datetime.py) ``` (with the PEP 695 SyntaxError also present on a pre-3.12 interpreter). The `Start backend server` step swallows this via `|| echo "Backend not ready yet"`, so every Playwright spec then fails in 2-3ms (backend down → frontend can't render), producing ~120 failing specs across chromium/firefox/webkit. ## Why this matters `all-checks-pass` gates on `needs.frontend-e2e.result`; until this job can actually pass, no PR can merge with a genuinely-green full gate. It was scoped non-gating (continue-on-error) on PR #107 (commit pending) so the ruff-lint PR and issue #100 can land, mirroring the mypy#109 convention. ## Scope (proposed) 1. Give the e2e job a Python 3.12 runtime (e.g. install python3.12 in the playwright container, or switch to a newer playwright image that bundles 3.12) AND use it consistently for the backend dependency install + uvicorn launch. 2. Re-enable gating (drop continue-on-error) once the suite runs and any test debt introduced by the sandbox/backend shape is cleared. 3. Consider whether the `|| echo` on backend start should be removed so a dead backend fails the job loudly instead of producing 120 meaningless green-then-fail specs.
Author
Owner

launcher-failure (t_a819e607): pre-dispatch gate blocked on dirty worktree (?? .worktrees/t_5df1a1a4 — sibling worktree from prior task with branch fix/annotation-tidy-t_5df1a1a4 and uncommitted changes). The gate script (.gsd/gates/pre-dispatch.sh) only excludes .gsd/, .venv/, .kilo/. Not blocking issue-side — does not need a label change; awaiting janitor triage on whether to extend the gate exclusion or clean up the sibling worktree.

launcher-failure (t_a819e607): pre-dispatch gate blocked on dirty worktree (?? .worktrees/t_5df1a1a4 — sibling worktree from prior task with branch fix/annotation-tidy-t_5df1a1a4 and uncommitted changes). The gate script (.gsd/gates/pre-dispatch.sh) only excludes .gsd/, .venv/, .kilo/. Not blocking issue-side — does not need a label change; awaiting janitor triage on whether to extend the gate exclusion or clean up the sibling worktree.
Author
Owner

kilo-gsd launch blocked twice on this repo: (1) prior run on ?? .worktrees/ (now stale), (2) current run on tracked-file dirt from t_fc47564c (issue-70-case-membership-ui leftovers) plus an untracked alembic migration file f101c4scd0a1_add_ondelete_cascade_case_membership_fk.py that triggers ruff S608. Both gate and kilo-gsd.py preflight refuse. Operator intervention needed: discard or commit the orphan modifications, or extend the pre-dispatch gate to ignore the alembic untracked file. kanban card t_a819e607 holds the queue position.

kilo-gsd launch blocked twice on this repo: (1) prior run on `?? .worktrees/` (now stale), (2) current run on tracked-file dirt from t_fc47564c (issue-70-case-membership-ui leftovers) plus an untracked alembic migration file `f101c4scd0a1_add_ondelete_cascade_case_membership_fk.py` that triggers ruff S608. Both gate and kilo-gsd.py preflight refuse. Operator intervention needed: discard or commit the orphan modifications, or extend the pre-dispatch gate to ignore the alembic untracked file. kanban card t_a819e607 holds the queue position.
Author
Owner

PR opened: #123

Direct-fix landed on branch fix/110-frontend-e2e-python312 (commit 3620da5). Changes to .forgejo/workflows/ci.yml:

  1. Container: mcr.microsoft.com/playwright:v1.40.0-jammy (jammy, Python 3.10) → mcr.microsoft.com/playwright:v1.49.0-noble (noble, Python 3.12.3). Backend requires 3.12 due to PEP 695 generic def safe_parse_llm_json[T: BaseModel](...) at backend/app/services/llm/parsing.py:17.
  2. Dropped apt-get install python3 python3-pip (no longer needed on noble); replaced with python3 --version + sys.version_info >= (3,12) assertion so future regressions fail loudly at runtime check.
  3. Rewrote Start backend server step: setsid+disown so uvicorn survives past the step boundary, 60s readiness loop on /healthz, ::error:: + tail of /tmp/uvicorn.log + exit 1 on timeout or uvicorn crash. Replaced the || echo "Backend not ready yet" swallow.

Verification:

  • YAML parses cleanly, all 9 jobs intact.
  • setsid+disown detach tested locally — server survives parent exit and serves HTTP.
  • Probe loop tested both paths (healthy: succeeds; dead: fails with log tail).

Leaving the issue open until a green Playwright run is observed in CI. Per task scope, continue-on-error: true on the security/full-suite jobs is left in place for a separate follow-up.

PR opened: https://forgejo.tail018ac4.ts.net/Mark/osint-hub/pulls/123 Direct-fix landed on branch `fix/110-frontend-e2e-python312` (commit 3620da5). Changes to `.forgejo/workflows/ci.yml`: 1. Container: `mcr.microsoft.com/playwright:v1.40.0-jammy` (jammy, Python 3.10) → `mcr.microsoft.com/playwright:v1.49.0-noble` (noble, Python 3.12.3). Backend requires 3.12 due to PEP 695 generic `def safe_parse_llm_json[T: BaseModel](...)` at `backend/app/services/llm/parsing.py:17`. 2. Dropped `apt-get install python3 python3-pip` (no longer needed on noble); replaced with `python3 --version` + `sys.version_info >= (3,12)` assertion so future regressions fail loudly at runtime check. 3. Rewrote `Start backend server` step: `setsid+disown` so uvicorn survives past the step boundary, 60s readiness loop on `/healthz`, `::error::` + tail of `/tmp/uvicorn.log` + `exit 1` on timeout or uvicorn crash. Replaced the `|| echo "Backend not ready yet"` swallow. Verification: - YAML parses cleanly, all 9 jobs intact. - `setsid+disown` detach tested locally — server survives parent exit and serves HTTP. - Probe loop tested both paths (healthy: succeeds; dead: fails with log tail). Leaving the issue open until a green Playwright run is observed in CI. Per task scope, `continue-on-error: true` on the security/full-suite jobs is left in place for a separate follow-up.
Mark closed this issue 2026-09-11 17:54:43 +00:00
Sign in to join this conversation.
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.

Dependencies

No dependencies set.

Reference
Mark/osint-hub#110
No description provided.