Skip to content

ci: fewer-redundant-runs - #903

Merged
fizzy-pm[bot] merged 2 commits into
mainfrom
ci/fewer-redundant-runs
Oct 27, 2026
Merged

fizzy-pm[bot] merged 2 commits into
mainfrom
ci/fewer-redundant-runs

Conversation

@fizzy-linux

@fizzy-linux fizzy-linux Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of fizzyedit/work#103
Rework: work#493

Goal

Part of fizzyedit/work#103: draft pushes run only Changes; ready PRs retain required CI.

What changed and why

main already has the draft short-circuit in changes, the ready_for_review trigger and the compiler-cache comment. This PR adds two things: ci-ok is skipped on drafts (one runner fewer per draft push), and outside a draft every job selected by the code or SDL filter must report success, so an unexpected skip, failure or cancellation fails the required check. It also clarifies compiler caching in web.yml and the local gates, cross-review, CI-at-ready order in the worker docs.

How it was verified

Formatting, lint, native build, check-web and test-sdk-version passed (gate output below). Hosted draft and ready behaviour is only visible in CI.

Before, measured from gh run list and the jobs API (actions/runs/<id>/jobs) for the last 10 merged PRs (#887 #888 #889 #890 #893 #895 #899 #901 #906 #913), CI workflow only, counting jobs that ran (not skipped) and Zig setup steps that ran:

Metric across the 10 PRs Before (total) Before (per PR)
CI workflow runs 28 (17 full, 11 draft-only) 2.8
Jobs run 192 19.2
Zig setup steps run 135 13.5
Draft-push runs (changes + ci-ok, 2 jobs each) 11 1.1

Per PR (runs/jobs/zig): #887 1/10/8; #888 7/62/48; #889 5/34/23; #890 2/12/8; #893 2/12/8; #895 2/12/8; #899 3/14/8; #901 2/12/8; #906 2/12/8; #913 2/12/8. A full run costs 8 Zig setups and a draft run none, so main already avoids Zig on drafts.

After: this PR removes ci-ok from each draft-push run (11 jobs of 192 in this sample, about 6%); Zig setups do not change by themselves. Measure it the same way over the first 10 PRs merged after it lands: draft-push runs should show 1 job, and full runs 8 Zig setups, fewer where the compiler cache hits. The largest cost in the sample is #888's 6 full runs for 6 pushes, which this PR does not touch.

Not done / follow-ups

Hosted draft to ready behaviour and cache hits need a real CI run. The maintainer's explicit yes is required before merging: this changes how ci-ok, a required check, behaves on drafts. The wrap-width nits and the ci-ok comment finding were not in the ruling and are left.

Changes (4 files, +30/-23)
 .github/workflows/ci.yml  | 39 ++++++++++++++++++++++-----------------
 .github/workflows/web.yml |  3 ++-
 CONTRIBUTING.md           |  5 +++--
 docs/AGENT_WORK.md        |  6 +++---
 4 files changed, 30 insertions(+), 23 deletions(-)
Gates: 6 of 6 passed

scripts/check-fmt.sh (exit 0)

check-fmt: listing tracked files
check-fmt: checking 539 files

scripts/zb build --summary all (exit 0)

... (earlier output omitted)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- options (reused)
|     +- translate-c dvui-c cached
|     |  +- compile exe translate-c debug native (+21 more reused dependencies)
|     +- options cached
|     +- options cached
+- install text cached
|  +- compile lib text debug native cached 12ms MaxRSS:37M
|     +- WriteFile plugin_root.zig cached
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- install markdown cached
|  +- compile lib markdown debug native cached 12ms MaxRSS:37M
|     +- WriteFile plugin_root.zig cached
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
|     +- translate-c (reused)
+- install image cached
   +- compile lib image debug native cached 13ms MaxRSS:37M
      +- WriteFile plugin_root.zig cached
      +- WriteFile freetype (reused)
      +- compile lib freetype debug native (reused)
      +- WriteFile . (reused)
      +- compile lib tree-sitter debug native (reused)
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- options (reused)
      +- translate-c dvui-c (+1 more reused dependencies)
      +- options (reused)
      +- options (reused)


scripts/zb build test --summary all (exit 0)

... (earlier output omitted)
      +- WriteFile freetype cached
      +- compile lib freetype debug native cached 15ms MaxRSS:36M
      +- WriteFile . cached
      +- compile lib tree-sitter debug native cached 11ms MaxRSS:36M
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- translate-c dvui-c cached
      |  +- compile exe translate-c debug native cached 10ms MaxRSS:37M
      |     +- options cached
      |     +- options cached
      |     +- options cached
      |     +- run exe generate-def (aarch64.zig) cached
      |     |  +- compile exe generate-def debug native cached 7ms MaxRSS:37M
      |     +- run exe generate-def (amdgcn.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (arm.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (bpf.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (common.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (hexagon.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (loongarch.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (mips.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (neon.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (nvptx.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (powerpc.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (riscv.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (s390x.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (ve.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (wasm.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (x86_64.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (x86.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (xcore.zig) cached
      |        +- compile exe generate-def debug native (reused)
      +- options cached
      +- options cached


scripts/zb build test-integration --summary all (exit 0)

... (earlier output omitted)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-glass-tests cached
|  +- compile test fizzy-glass-tests debug native cached 13ms MaxRSS:36M
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-plugin-loader-tests cached
|  +- compile test fizzy-plugin-loader-tests debug native cached 12ms MaxRSS:36M
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-text-plugin-tests cached
|  +- compile test fizzy-text-plugin-tests debug native cached 11ms MaxRSS:37M
|     +- options (reused)
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-workbench-plugin-tests cached
   +- compile test fizzy-workbench-plugin-tests debug native cached 11ms MaxRSS:36M
      +- options (reused)
      +- options (reused)
      +- WriteFile freetype (reused)
      +- compile lib freetype debug native (reused)
      +- WriteFile . (reused)
      +- compile lib tree-sitter debug native (reused)
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- translate-c dvui-c (+1 more reused dependencies)
      +- options (reused)
      +- options (reused)


scripts/zb build check-web --summary all (exit 0)

... (earlier output omitted)
|  |     +- run exe generate-def (amdgcn.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (arm.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (bpf.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (common.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (hexagon.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (loongarch.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (mips.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (neon.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (nvptx.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (powerpc.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (riscv.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (s390x.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (ve.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (wasm.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (x86_64.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (x86.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (xcore.zig) cached
|  |        +- compile exe generate-def debug native (reused)
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- translate-c cached 3ms MaxRSS:33M
+- compile obj rehome-fixture-web debug wasm32-freestanding cached 6ms MaxRSS:37M
   +- translate-c dvui-c (+1 more reused dependencies)
   +- options (reused)
   +- options (reused)


scripts/zb build test-sdk-version --summary all (exit 0)

... (earlier output omitted)
   +- WriteFile . cached
   +- compile lib tree-sitter debug native cached 9ms MaxRSS:37M
   +- compile lib freetype debug native (reused)
   +- compile lib tree-sitter debug native (reused)
   +- options cached
   +- options cached
   +- translate-c dvui-c cached
   |  +- compile exe translate-c debug native cached 5ms MaxRSS:37M
   |     +- options cached
   |     +- options cached
   |     +- options cached
   |     +- run exe generate-def (aarch64.zig) cached
   |     |  +- compile exe generate-def debug native cached 6ms MaxRSS:33M
   |     +- run exe generate-def (amdgcn.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (arm.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (bpf.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (common.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (hexagon.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (loongarch.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (mips.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (neon.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (nvptx.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (powerpc.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (riscv.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (s390x.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (ve.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (wasm.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (x86_64.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (x86.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (xcore.zig) cached
   |        +- compile exe generate-def debug native (reused)
   +- options cached
   +- options cached


Agent-Team: linux

Worker: codex
@fizzy-pm

fizzy-pm Bot commented Oct 27, 2026

Copy link
Copy Markdown

PM note: how this PR will be handled

What it is for: ci: fewer-redundant-runs
Issue #103: ci: run the full matrix only when it can decide something (ready PRs), not on every draft push
Done when (from the issue): a draft push runs only changes; a ready PR runs the full matrix once per push; the compiler cache key is documented in the workflow; the PR body has a before/after table (CI runs and Zig installs per PR over the last 10 merged PRs, from gh run list); docs/AGENT_WORK.md says where verification ha

Rules that apply: touches CI or workflows; changes agent rules or guides.
Reviews needed: 2, from two different kinds.
Needs the maintainer's explicit yes before merge: yes

Things to watch (checked by rule):

  • the body names its work issue (Part of fizzyedit/work#N)
  • size within 800 lines outside tests and docs (42)
  • a gates section with what was run

What happens next:

  1. Reviewers from other teams or kinds comment, with findings numbered F1, F2, ...
  2. The author answers every finding in one FIXES @<commit> comment (fixed in a commit, or declined with a reason) and pushes.
  3. Reviewers re-review the new commit on their own.
  4. When every finding is answered and the re-reviews are clean, the PM marks it ready and the full CI runs (a few times at most: run the failing job locally before you push again). Only when CI passes does the PM look, and the PM gives the final okay after asking the maintainer.

A living status comment below is kept current. Nothing here is a merge decision.

@fizzy-pm

fizzy-pm Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Where this PR stands

Stage: Waiting for the maintainer
Next: Maintainer should say yes or no when the PM asks

What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):

  • The body names its basis (Part of fizzyedit/work#N or a plan step)
  • Within the size limit: 45 of 800 lines outside tests and docs
  • The body shows which gates the author ran
  • No open findings at this commit
  • Every earlier finding was answered in a FIXES comment (6 answered)
  • Clean reviews at this commit from 2 different kinds: linux/codex, macos/agy (has 2)
  • Marked ready, which starts the full CI (the PM does this the moment the items above are met)
  • The full CI passes at this commit (CI is green)
  • The maintainer's explicit yes (ci, rules)
  • The PM's final okay (pm-approval)

Rules that apply: touches CI or workflows; changes agent rules or guides.

Reviews at the current commit (7e43ec8):

Reviewer Verdict Findings
linux/codex clean none
macos/agy clean 1
windows/agy inconclusive none

2 earlier reviews are for older commits and will be redone.

Latest fixes comment: https://github.com/fizzyedit/work/issues/460#issuecomment-6444628978 (6 findings answered)

Updated 2026-10-27 16:28 UTC by the PM. This comment is edited in place.

@fizzy-macos fizzy-macos Bot added reviewing:macos-agy a macos/agy review is running reviewing:macos-claude a macos/claude review is running and removed reviewing:macos-agy a macos/agy review is running reviewing:macos-claude a macos/claude review is running labels Oct 27, 2026
@fizzy-pm fizzy-pm Bot added the pm:fixes author fixes the must-fix items label Oct 27, 2026
Agent-Team: linux
Worker: claude
@fizzy-windows fizzy-windows Bot added the reviewing:windows-agy a windows/agy review is running label Oct 27, 2026
@fizzy-linux fizzy-linux Bot added reviewing:linux-codex a linux/codex review is running and removed reviewing:linux-codex a linux/codex review is running labels Oct 27, 2026
@fizzy-windows fizzy-windows Bot removed the reviewing:windows-agy a windows/agy review is running label Oct 27, 2026
@fizzy-macos fizzy-macos Bot added reviewing:macos-agy a macos/agy review is running and removed reviewing:macos-agy a macos/agy review is running labels Oct 27, 2026
@fizzy-pm
fizzy-pm Bot marked this pull request as ready for review October 27, 2026 15:33
@fizzy-pm fizzy-pm Bot removed the pm:fixes author fixes the must-fix items label Oct 27, 2026
@fizzy-pm
fizzy-pm Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit e2bd82c Oct 27, 2026
30 checks passed
@fizzy-pm
fizzy-pm Bot deleted the ci/fewer-redundant-runs branch October 27, 2026 17:03
fizzy-linux Bot added a commit that referenced this pull request Oct 27, 2026
Merge origin/main (the draft/ready change landed in #903), taking its
docs/AGENT_WORK.md wording. test-ci-ok.py no longer splits the workflow on
fixed indents and blank lines, and drops the unused RESULTS variable.

Agent-Team: linux
Worker: claude
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fizzy-linux fizzy-linux Bot mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants