Skip to content

Commit a9c794e

Browse files
fix(ci): restore documented CI job graph in test.yml (#51)
* fix(ci): restore documented CI job graph in test.yml build and playwright-tests both drifted to gating on rust/vitest-tests in addition to deno-lint, producing a serial rust -> playwright -> build chain that docs/builds.md never described. Neither job consumes artifacts from rust or vitest-tests, so narrow both back to what the docs already document: deno-lint alone gates build, and deno-lint plus the frontend path filter gates playwright-tests. Also updates the dependency-graph doc itself, which still said "five jobs" and listed playwright-tests as fully independent -- stale since zig, shadow-diff, and changes were added and playwright-tests already depended on deno-lint. * chore(backlog): close out TASK-351 with real PR-run CI timing evidence
1 parent 9dd360b commit a9c794e

3 files changed

Lines changed: 40 additions & 15 deletions

File tree

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ jobs:
154154

155155
build:
156156
name: Build (${{ matrix.platform }})
157-
# Gate on lint/format/test jobs so builds don't burn CI minutes
158-
# when basic checks fail.
159-
needs: [deno-lint, rust, vitest-tests, playwright-tests]
157+
# Gate on deno-lint only -- rust/vitest-tests/playwright-tests run in
158+
# parallel and don't produce artifacts the build matrix consumes, so
159+
# serializing on them just adds wall-clock (see docs/builds.md#test-workflow-dependency-graph).
160+
needs: [deno-lint]
160161
if: ${{ !failure() && !cancelled() }}
161162
strategy:
162163
fail-fast: false
@@ -278,7 +279,9 @@ jobs:
278279
279280
playwright-tests:
280281
name: Playwright E2E Tests
281-
needs: [changes, deno-lint, rust, vitest-tests]
282+
# Runs against a Vite preview build with mocked IPC -- no Tauri/Rust
283+
# artifact dependency, so it only needs deno-lint plus the change filter.
284+
needs: [changes, deno-lint]
282285
if: ${{ !failure() && !cancelled() && (needs.changes.outputs.frontend == 'true' || github.event_name == 'workflow_dispatch') }}
283286
runs-on: [macOS, ARM64]
284287
timeout-minutes: 20

β€Žbacklog/tasks/task-351 - Restore-the-documented-CI-job-graph-in-test.yml.mdβ€Ž

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
id: TASK-351
33
title: Restore the documented CI job graph in test.yml
4-
status: To Do
4+
status: Done
55
assignee: []
66
created_date: '2026-09-11 00:38'
7+
updated_date: '2026-09-14 07:00'
78
labels: []
89
dependencies: []
910
type: bug
@@ -18,9 +19,27 @@ Cross-platform build verification should start as soon as deno-lint finishes rat
1819

1920
## Acceptance Criteria
2021
<!-- AC:BEGIN -->
21-
- [ ] #1 build job gates only on deno-lint
22-
- [ ] #2 playwright-tests job gates only on changes and deno-lint
23-
- [ ] #3 A PR run shows the build matrix starting within ~3 minutes of deno-lint completing
24-
- [ ] #4 Total CI wall-clock recorded before and after the change in the task notes
25-
- [ ] #5 docs/builds.md dependency graph re-verified as accurate against the workflow file
22+
- [x] #1 build job gates only on deno-lint
23+
- [x] #2 playwright-tests job gates only on changes and deno-lint
24+
- [x] #3 A PR run shows the build matrix starting within ~3 minutes of deno-lint completing
25+
- [x] #4 Total CI wall-clock recorded before and after the change in the task notes
26+
- [x] #5 docs/builds.md dependency graph re-verified as accurate against the workflow file
2627
<!-- AC:END -->
28+
29+
## Implementation Notes
30+
31+
<!-- SECTION:NOTES:BEGIN -->
32+
## CI wall-clock: before/after
33+
34+
**Before (drifted graph)** β€” most recent real PR run on the old graph, [run 34811970745](https://github.com/pythoninthegrasses/mt/actions/runs/34811970745) (TASK-355.6's PR): `rust` failed on a pre-existing, unrelated bug (`resource path binaries/mt-zig-core-aarch64-apple-darwin doesn't exist`). Because `build` and `playwright-tests` both depended on `rust`, they were **skipped entirely** rather than delayed β€” total run wall-clock 1m50s, but zero build/E2E signal produced for the PR. That's the sharpest cost of the drift: one unrelated job failure silenced build+E2E for the whole PR, not just slowed them.
35+
36+
For a wall-clock (not skip-cascade) comparison, the last fully-successful run on the old graph, [run 24358563505](https://github.com/pythoninthegrasses/mt/actions/runs/24358563505) (2026-04-13, predates the `zig`/`shadow-diff`/`changes` jobs): total 17m8s. `build(macos)` didn't start until 18:02:44 β€” 2m18s after `deno-lint` finished (17:58:26) β€” because it waited on `playwright-tests` (finished 18:02:42), which itself waited on `rust`/`vitest-tests`. In that run rust/vitest/playwright happened to be fast (~1-2 min each), so the observed serial penalty was minutes, not the worst-case ~40 min the task description assumes for slower runs β€” but the mechanism (build gated on jobs it doesn't need) is the same regardless of their duration.
37+
38+
**After (this fix)** β€” [PR #51's own run, 34815076214](https://github.com/pythoninthegrasses/mt/actions/runs/34815076214): `deno-lint` finished 06:49:56. `build(linux)` started 06:50:10 (+14s), `build(windows)` started 06:50:26 (+30s), `build(macos)` started 06:51:22 (+1m26s) β€” all well within the ~3min target (AC#3), and critically, **all three started even though `rust`/`vitest-tests`/`shadow-diff` failed** (same pre-existing zig staging bug as the before-case), because `build` no longer depends on them. Total run wall-clock 9m34s β€” longer in absolute terms than the before-cascade-skip case specifically because build now actually runs to completion three times instead of being dropped; that's the intended behavior, not a regression.
39+
40+
`playwright-tests` was correctly skipped in the after-run (completed 06:49:56, essentially instantly) because this PR touches no `app/frontend/**` paths, not because of any upstream failure β€” confirms AC#2's `changes` gating works independently of `rust`/`vitest-tests` now.
41+
42+
## AC#5 β€” docs/builds.md re-verification
43+
44+
Updated `docs/builds.md`'s "Test Workflow Dependency Graph" section in the same commit: it said "five jobs" and listed `playwright-tests` as fully independent, both stale (workflow now has eight jobs β€” `zig`/`shadow-diff`/`changes` were added since the doc was last touched β€” and `playwright-tests` already depended on `deno-lint` even before this fix). Section now names all eight jobs and correctly shows `build` and `playwright-tests` both gated on `deno-lint` only (plus `playwright-tests` on `changes`), matching `test.yml` exactly.
45+
<!-- SECTION:NOTES:END -->

β€Ždocs/builds.mdβ€Ž

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,17 +612,20 @@ Runner assignment is optimized for developer iteration speed (PR/push), not rele
612612

613613
#### Test Workflow Dependency Graph
614614

615-
The test workflow (`test.yml`) runs five jobs. The build matrix only gates on `deno-lint` β€” the test jobs run in parallel and do not block cross-platform build verification:
615+
The test workflow (`test.yml`) runs eight jobs. The build matrix and Playwright both gate only on `deno-lint` β€” the other test jobs run in parallel and do not block cross-platform build verification:
616616

617617
```text
618618
deno-lint ──► build(macos, linux, windows)
619+
deno-lint ──► playwright-tests (also gated on `changes`: frontend-paths filter)
619620
620-
rust (independent)
621-
vitest-tests (independent)
622-
playwright-tests (independent)
621+
rust (independent)
622+
vitest-tests (independent)
623+
zig (independent)
624+
shadow-diff (independent, continue-on-error)
625+
changes (independent β€” feeds playwright-tests' path filter only)
623626
```
624627

625-
The `rust`, `vitest-tests`, and `playwright-tests` jobs do not produce artifacts consumed by the build matrix (`cargo check` per platform). Decoupling them from the build reduces wall-clock time by allowing cross-platform checks to start as soon as `deno-lint` completes (~2-3 min) rather than waiting for the slowest test job (~15-20 min).
628+
The `rust` and `vitest-tests` jobs do not produce artifacts consumed by the build matrix (`cargo check` per platform), and `playwright-tests` runs against a Vite preview build with mocked IPC rather than any Tauri/Rust artifact β€” so none of them need to gate `build` or each other. Decoupling them reduces wall-clock time by allowing cross-platform checks and Playwright to start as soon as `deno-lint` completes (~2-3 min) rather than waiting for the slowest test job (~15-20 min). `zig` and `shadow-diff` are deliberately absent from every other job's `needs:` so Zig-core work never extends the critical path (see the inline comments in `test.yml` for each job's rationale).
626629

627630
#### CI Setup Modes
628631

0 commit comments

Comments
Β (0)