docs(ai): reflect PR consolidation — #151/#152 merged into #150
Some checks failed
Mirror to GitHub / mirror (push) Successful in 12s
CI / e2e (pull_request) Has been cancelled
CI / backend (pull_request) Has been cancelled
CI / frontend (pull_request) Has been cancelled

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 15:55:08 -04:00
parent 69f2a37591
commit 6656ebdead

View File

@@ -4,64 +4,37 @@
**Last updated:** 2026-04-25 (America/New_York)
**Active task:** Land three open CI PRs (#150 + #151 + #152), then enable backend + e2e gates on `main`. See [CURRENT_TASK.md](CURRENT_TASK.md).
**Active task:** Land PR #150 (the consolidated CI-recovery PR), then enable backend + e2e gates on `main`. See [CURRENT_TASK.md](CURRENT_TASK.md).
**Branches:** Three open PRs, all independent of each other for correctness:
- `fix/ci-workflow-config` → PR #150
- `fix/ci-pytest-xdist` → PR #151 (stacked on #150 for context but mergeable on its own)
- `fix/e2e-test-selectors` → PR #152
**Branch:** `fix/ci-workflow-config` → PR #150. PRs #151 and #152 were closed and consolidated into this branch — one PR is easier to land than three stacked ones, and the user got tired of waiting on serial CI runs of intermediate states.
**Runner setup:** Three Gitea Actions agents are now registered on the homelab box, so `backend` / `frontend` / `e2e` jobs run truly in parallel instead of serializing on a single agent. Combined with PR #151's xdist parallelization, the previous 1h 14m wall-clock should drop to ~610 min.
**Runner setup:** Three Gitea Actions agents are registered on the homelab box, so `backend` / `frontend` / `e2e` jobs run in parallel instead of serializing on a single agent. Combined with the xdist parallelization in this PR, the previous 1h 14m wall-clock should drop to ~912 min.
## Three open PRs
## What's on PR #150's branch (consolidated)
### PR #150 — `fix/ci-workflow-config` → main
Eight commits, all CI-recovery work that landed together because they were inter-dependent:
Carries:
- The Codex commit (`49f8856 wip(handoff): restore backend suite to green`) — fixes 54 backend test failures.
- Workflow fixes: `DATABASE_TEST_URL` env, `actions/upload-artifact` v3 pin.
- Most-recent commit (`e976fb4`):
- Mocks `_extract_template_parameters` in `test_record_decision_persists_and_bumps_state_version` (last test failing on CI; needed an AI provider key the runner doesn't have). Verified locally — passes.
- pip + npm caches in all three jobs.
- Drops `--cov-report=term-missing` (the custom "Display coverage summary" step prints the same info from JSON).
- Adds `--maxfail=10` so structural breakage fails fast.
**Expected CI on this PR:** all three jobs green for the first time in months.
### PR #151 — `fix/ci-pytest-xdist` → main (stacked on #150)
Carries (on top of #150):
- `pytest-xdist==3.6.1` in `requirements-dev.txt`.
- `conftest.py` adds `_worker_db_url` + `_ensure_worker_db_exists`. Each xdist worker gets its own DB (`resolutionflow_test_gw0`, `gw1`, …) so the per-test `DROP SCHEMA public CASCADE` doesn't race across workers.
- Workflow's pytest invocation gains `-n auto`.
**Measured locally:** backend suite goes from `22m 27s` (serial, 1076 passed) → `4m 28s` (8 workers, 1076 passed). Same exit code, same test count.
### PR #152 — `fix/e2e-test-selectors` → main
Carries: five Playwright e2e selector updates against the current UI. The drift was inherited from the FlowPilot/PSA migration:
- `Sessions``Session History` (page heading)
- `Account Settings``Account Management` (page heading)
- `/assistant``/pilot` (Phase 1 route rename; redirect still works)
- Flow-session filtering and the Resume button moved behind the "Flow Sessions" tab on `/sessions` (default tab is "AI Sessions")
- `resume.spec.ts` no longer starts at `/trees` — Resume button rendering moved to the session card on `/sessions`
No product-code changes. Pure test updates.
1. **Codex's `49f8856 wip(handoff): restore backend suite to green`** — fixes the 54 real backend test failures left after #149.
2. **Workflow correctness:** `DATABASE_TEST_URL` env, `actions/upload-artifact` v3 pin (Gitea Actions doesn't support v4+).
3. **Test-fix + cheap CI wins (`e976fb4`):** mocks `_extract_template_parameters` in `test_record_decision_persists_and_bumps_state_version` so it doesn't need an AI provider key; pip + npm caches; `--cov-report=term-missing` dropped (the custom display step parses JSON); `--maxfail=10` so structural breakage exits fast.
4. **Postgres port-collision fix (`1bd43ab`):** dropped `ports: 5432:5432` host mapping. With three Gitea runner agents now active, two parallel jobs would race on `0.0.0.0:5432`. Tests connect via the `postgres` service-DNS hostname, not the host, so the mapping wasn't actually needed.
5. **pytest-xdist with per-worker DBs (`7f71436`):** `pytest-xdist==3.6.1` added; `conftest.py` derives a per-worker DB URL from `PYTEST_XDIST_WORKER` and creates it synchronously on first import. Verified on PR #151's CI run before consolidation: 22m serial → 9m37s on the 4-core runner.
6. **Five e2e selector updates (`69f2a37`):** drift from the FlowPilot/PSA migration. `Sessions``Session History`, `Account Settings``Account Management`, `/assistant` accepts `/pilot`, "Flow Sessions" tab clicks for ticket/client filtering and Resume on `/sessions`.
## Immediate next steps
1. **Merge PR #152 first.** Smallest, lowest risk, no shared file with the other two PRs.
2. **Merge PR #150 next.** Backend test suite should be fully green (1076 passed, 0 failed, 0 errors).
3. **Merge PR #151 last.** Backend job time drops to ~46 min on the runner.
4. **Enable backend gate** on `main` branch protection — append `"CI / backend (pull_request)"` to `status_check_contexts`:
1. **Watch PR #150's CI** on its latest sha (`69f2a37`). Backend should run ~9 min via xdist; frontend ~6 min; e2e ~5 min with the selector fixes.
2. **Merge PR #150** when all three jobs are green.
3. **Enable backend gate** on `main` branch protection — append `"CI / backend (pull_request)"` to `status_check_contexts`:
```bash
curl -X PATCH -H "Authorization: token $GITEA_TOKEN" \
"https://gitea.resolutionflow.com/api/v1/repos/chihlasm/resolutionflow/branch_protections/main" \
-H "Content-Type: application/json" \
-d '{"status_check_contexts": ["CI / frontend (pull_request)", "CI / backend (pull_request)"]}'
```
5. **Then enable `CI / e2e (pull_request)`** — same PATCH, append to the list. Verify e2e is reliably green for at least one PR run before locking it in.
4. **Then enable `CI / e2e (pull_request)`** — same PATCH, append to the list. Verify e2e is reliably green for at least one PR run before locking it in.
PRs #151 (`fix/ci-pytest-xdist`) and #152 (`fix/e2e-test-selectors`) were closed as superseded by this PR.
## Uncommitted state