GeezerVison is showing github.com — ci: Phase 2 — PR-tier slimming (basic validation on PRs, full suite on main) · Issue #1781 · developing-today/code
ci: Phase 2 — PR-tier slimming (basic validation on PRs, full suite on main) #1781DescriptionPhase 2 — PR-tier slimming: basic validation on PRs, full suite on main
Design: #1779 (doc §3). Cross-repo: one issue, per-repo PRs in
rollout order code → opencode → openchamber → nix. Depends on
Phase 1 landing first (separate issue).
Problem
PRs currently trigger the full check matrix on every push, and the
matrix is what floods the runner queue: code's id workflow alone
fans out to 27 flake-check jobs per run (104.8m wall for ≤13.8m of
execution per job on 2026-10-28); opencode test runs build + e2e
on every PR (e2e waited 65–76m for 0.1m of execution). Per Drew's
directive, regular PRs need only very basic validation — everything
else runs on merge to main, and all tests run against main before
any release anyway.
The policy surface
Implement the change-class table (design doc §3.3) as path-glob
data each repo's workflows consume:
| class |
examples |
PR tier |
| 0 prose |
**.md, docs/ |
nothing / markdown lint |
| 1 config/data |
json/yaml/toml, non-workflow .github/** |
syntax parse + lint |
| 2 package source (default) |
one package's src+tests |
lint/format + typecheck/syntax of affected + affected unit tests |
| 3 elevated |
lockfiles, module roots, flake.nix, build defs, .github/workflows/**, shared libs |
class 2 + compile of affected |
| 4 nix |
**.nix |
parse/eval of changed files only |
Highest class wins on mixed changes. Tuning = editing the table.
Per-repo scope
- code:
nix ci — treefmt stays on PRs, flake-check job →
main+nightly. id — PR keeps guard + affected-crate checks;
27-job flake-check matrix → main. mcpx conformance → main
(spec-parity leg may stay if <5m). id bench → main only.
Build workflows (go modules build, identity build, map build,
mcpx nix build) compile only for class-3 changes.
- opencode:
test — PR runs affected + affected unit only;
build + e2e → main. check (typecheck) unchanged — it is
the PR tier's core. nix-eval paths-gated on PRs.
- openchamber:
pr checks — PR keeps lint + type-check;
tests + build → main.
- dezren39/nix:
mcpx nix build — PR tier eval-only of
changed modules; full build → main.
Every workflow that leaves the PR trigger keeps (or gains) a
push-to-main trigger plus a nightly schedule backstop, so main-tier
coverage is total.
Acceptance criteria
- Per-repo PR merged implementing the class table + trigger
changes above; the policy table lives in-repo as data.
- A docs-only PR and a class-2 PR on each repo show only the
PR-tier checks running (evidence on the PRs).
- Main pushes run the full suite in every repo (first main run
after merge linked as evidence).
- No check that ran on main before this change is lost: the
union of main-tier + nightly jobs covers the old PR matrix.
Activityadded kind/ciCI/CD pipelines, workflows, and build automation task/triageQueue packet kind: verify, reproduce, and route this item effort/lLarge: multi-day or open-ended; expect staged check-ins on Oct 28, 2026developing-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 agent-note:v1
state: filed
Found via: filed this run — CI redesign pass executing Drew's 2026-10-28 directive (cancel-in-progress approved; PR tier = basic validation; full suite on main; Jules → issue → priority-90 Muse packet remediation chain). Design doc: files/designs/ci-fast-pr-full-main.md (repo-health goal workspace). Capacity evidence: #1599.
Agent: ci-redesign-filing dezren39 commented on Oct 29, 2026 dezren39/nix slice — Phase 2: DONE via dezren39/darwin-nix#1078 (merged, merge commit b18968c).
mcpx-nixbuild.yml split into tiers:
- PR job
nix-eval (eval-only, class 4): nix-instantiate --parse of the changed .nix files (diff vs PR base; flake.nix fallback for lockfile-only changes) + the existing darwin mcpx skip-guard eval. PR trigger paths: **.nix, flake.nix, flake.lock, the workflow itself.
- Main job
nix-build: the existing full nix build, gated to non-PR events — push to main (branches: [main] only, so no push + pull_request double-fire for one commit), nightly schedule backstop (23 6 * * *), workflow_dispatch. Nothing the old PR build covered vanishes: main + nightly run it.
.github/ci-policy.md added: the design §3.3 change-class table + how each nix workflow applies it; a header comment in mcpx-nixbuild.yml points at it.
opencode.yml deliberately unchanged: it is a /oc comment-triggered bot, not a build check.
buffer-backup-lock-sync.yml deliberately unchanged: already a light python3/node gate, no build to slim.
Live evidence:
dezren39 commented on Oct 29, 2026 opencode slice — Phase 2 landed
PR: developing-today-forks/opencode#827 (merged 2026-10-29T05:42Z, merge commit; shared with the Phase 1 slice). Merged on local-validation strength (own checks queued >20 min in the backlog; none failed).
Changes:
test.yml: PR tier = affected + unit for affected packages only. build and e2e jobs gated to push-to-main + nightly schedule (0 3 * * *, new) + workflow_dispatch; schedule runs the full non-affected suite like a dispatch. The e2e aggregator still reports the branch-required e2e (<os>) checks on PRs (tier-skipped suite = expected result). pull_request restricted to branches: [main] (push was already main-only) — push + pull_request can no longer fire the same suite twice for one commit. Bonus fix: e2e previously never ran on push-to-main at all (affected output suppressed it there); it now runs on main when the app is affected.
nix-eval.yml: PR trigger paths-gated to nix inputs (**.nix, flake.lock, nix/**, the workflow itself); push-to-main unfiltered = full evaluation.
check.yml unchanged — typecheck IS the PR tier's core.
.github/ci-policy.md added: the §3.3 change-class table as in-repo data + opencode's tier mapping; every touched workflow carries a header comment pointing at it.
Live before/after evidence (the two PRs' own runs):
- Before (opencode#828's checks, old workflows): per PR push — typecheck + affected + unit×2 + build×2 + e2e suite + nix-eval.
- After (opencode#827's checks, new workflows): typecheck + affected + unit×2, build reported
skipping, no e2e jobs; nix-eval fired only because the PR touched nix-eval.yml itself (a gated path).
Per merge to main after this lands: check + full test (affected/unit/build/e2e) + full nix-eval; nightly re-runs the full test suite. Nothing removed from PRs vanishes — main + nightly cover the old PR matrix.
Not closing this issue — other repos' slices remain. dezren39 commented on Oct 29, 2026 Code slice landed: PR #2122 (merged ea31e75) + docs fix-up PR #2127 (merged).
Per-file tier changes:
- nix-ci.yml: treefmt stays on PRs; flake-check job gated to non-PR events (push to main + new nightly schedule 08:17 UTC + dispatch).
- id-check.yml: PRs keep guard + affected-crate matrix (id-pr-checks.txt); new full-flake-check job runs the complete nix flake check ./pkgs/id on push to main + nightly schedule (08:41 UTC) + dispatch. Union with id-e2e-nightly (nightly full check) covers the old PR matrix — nothing removed from PRs has vanished.
- mcpx-conformance.yml: leg + records jobs gated to non-PR events (main); spec-parity stays on PRs — measured exec 28s on run 40801660942 (2026-10-29), under the 5m fast-leg limit.
- id-bench.yml: pull_request trigger removed; main only.
- go-modules-build / identity-build / map-build / mcpx-nixbuild: PR triggers now class-3 paths only (go.mod/go.sum, package.nix, flake.nix/flake.lock, .github/workflows/**); push to main fires unconditionally (path filters removed).
- Policy shipped as in-repo data: .github/ci-policy.md (§3.3 class table + per-workflow tier map + coverage/dedup/concurrency rules); every touched workflow carries the header comment CI tier policy: see .github/ci-policy.md.
- Dedup audit: every check workflow already pairs pull_request with push restricted to branches:[main] — no suite can fire twice for one commit.
Before/after (observed live on PR #2122 itself):
- Before: a PR push fired nix-ci treefmt+flake-check, the id guard+matrix, 9 conformance legs + records + spec-parity, id bench, and (on any pkgs/** change) full build matrices.
- After: PR ci: Phase 1+2 — cancel-in-progress + fast PR tier / full main tier #2122's check list showed Nix flake evaluation: SKIPPING, conformance legs/records: SKIPPING, id full-flake-check: SKIPPING, id-bench: not fired at all; treefmt, spec-parity, id guard+matrix and the class-3 build workflows (the PR touches .github/workflows/**, which is class-3) fired — exactly the intended PR tier.
Incident note (transparency): ci-policy.md initially landed with its backticked spans stripped — a shell heredoc quoting accident during authoring executed the backticks as command substitutions on the laptop (the stray commands were read-only or failed; trees verified clean, no stray GitHub objects). PR #2127 restored the file byte-identical (sha256-verified). The workflow files were never affected: they were edited via a separate mechanism and validated by parsing all 20 workflow files with yaml.safe_load on an independent machine, plus the live skip behaviour above.
Not closing: cross-repo phase; opencode/openchamber/nix slices are other workers'. dezren39 commented on Oct 29, 2026 openchamber slice — Phase 2 done.
PR: developing-today-forks/openchamber#752 (Phases 1+2 combined) — merged with a merge commit (checks sat queued >20 min in the backlog this redesign fixes; merged on local validation strength, see the PR).
What changed in oc-review.yml (workflow name pr checks):
- PR tier:
lint + type-check only. tests and build jobs now carry if: github.event_name != 'pull_request' — on the Phase PR itself they reported SKIPPED while lint/type-check queued, which is the tier split working as designed.
- Main tier: unchanged
push: branches: [main] trigger now runs all four jobs; a nightly schedule backstop (37 5 * * *) and workflow_dispatch were added, so the full suite re-runs even on no-merge days. Nothing removed from PRs vanishes: the union of main + nightly + dispatch covers the old PR matrix exactly (same job definitions, only gated).
- Dedup: push was already restricted to
branches: [main], so a PR-branch push fires pull_request only — no commit runs the same suite twice. Verified in the workflow audit; kept as-is.
- Policy as data:
.github/ci-policy.md added with the §3.3 change-class table, this repo's tier map (which jobs run on PR / main / nightly / dispatch), the concurrency rules, and the chore(deps): bump prettier-plugin-toml from 1.0.0 to 2.0.1 #84 warning. Every workflow touched by Phases 1–3 carries a header comment pointing at it.
Before/after runs fired per PR push (for pr checks): before = 4 jobs (lint, type-check, tests ~6m exec, build ~4m exec) per push per PR; after = 2 jobs (lint, type-check, sub-minute exec), with tests/build reported skipped. Per merge to main: before = 4 jobs once; after = 4 jobs once, plus one full nightly run.
Not closing this issue — the other repos' slices are still open. dezren39 commented on Oct 29, 2026 opencode — expanded directives landed (Drew, 2026-10-29 00:41 CDT)
PRs: developing-today-forks/opencode#832 (merged 05:56Z, merge commit 906db93e8f) + hardening follow-up #834 (merged 05:57Z).
Merge-requirement naming (Phase 2 addition):
.github/ci-policy.md states explicitly: "Merge requirement: the basic-validation (PR) tier only. The full suite runs on main and is NOT a merge gate."
- The basic tier's name in opencode is basic validation; its checks are renamed in display:
basic typecheck (check), basic affected packages + basic unit (<os>) (test) — confirmed live in id(web): parseWorldSeed still silently reinterprets non-decimal forms — '0x10' installs seed 16, '1e3' seed 1000 (#707 residual) #832's own check list. Workflow names test/check/nix-eval unchanged (main-broken.yml references them via workflow_run); e2e (<os>) aggregator names unchanged for branch-rule stability. No branch-protection settings touched (not authorized) — naming + docs only; the policy doc records that required-by-name rules should name the basic checks.
Event-bot consolidation: see the comment on #1780 — management bots deleted in favour of repo-sweeper every 15 minutes; pr-standards judged a validation workflow and kept in the tier system. dezren39 commented on Oct 29, 2026 Openchamber slice landed: developing-today/openchamber PR #752 (merged), PR #754 (merged 6e83f7241, expanded directives), PR #755 (merged 357d7ec9a, sweeper startup fix).
Phase 2 core (#752): pr checks (oc-review.yml) — PRs keep lint + type-check only; tests + build gated to push-to-main + nightly schedule (05:37 UTC) + dispatch. Push restricted to branches:[main] — a commit never runs the same suite twice (Drew re-emphasis). Change-class policy shipped as .github/ci-policy.md; nix-eval stays paths-gated on PRs (class 4).
Expanded directives (Drew 2026-10-29 00:41 CDT, landed via #754 after #752 was merged at its first commit while the directive commit was in flight — see #754 body):
- MERGE-REQUIREMENT NAMING: ci-policy.md states explicitly: "Merge requirement: the basic-validation (PR) tier only. The full suite runs on main and is NOT a merge gate." The basic tier in this repo is named basic: pr checks jobs display-named "basic: lint" / "basic: type-check"; main tier: "full (main tier): tests" / "full (main tier): build". Workflow name stays "pr checks" (the Phase 3 watcher references it). Branch-protection settings NOT changed (not authorized) — naming + documentation only.
- EVENT-BOT CONSOLIDATION: pr-intake.yml, issue-intake.yml, label-merge-conflict.yml DELETED, replaced by ONE scheduled workflow repo-sweeper.yml, every 15 minutes (cron */15), single concurrency group "repo-sweeper" with cancel-in-progress: true. One pass: PR size/parking labels over all open PRs (pr-intake logic incl. parking comment), merge-conflict labels (same action), issue intake for un-intaked open issues (max 5/sweep, oldest first; same agent + label logic; still inert when the bot app is unconfigured). Dropped commands: /recheck-intake and @openchamber-bot triage/reproduce (superseded by the sweep; documented in the workflow header).
- KEPT EVENT-BASED: pr-review.yml — judged from contents: it posts the review verdict a PR author waits on ("Verify and enforce review verdict") and answers /oc-review synchronously; it does no labeling/assignment management, so there was no management part to move. bot-help.yml / bot-summarize.yml — a human mentions the bot and waits synchronously; concurrency audited: per-issue groups, cancel-in-progress: false + queue: max — never queue:max with a true-evaluating cancel expression (chore(deps): bump prettier-plugin-toml from 1.0.0 to 2.0.1 #84-safe); unchanged.
Startup bug found + fixed (#755): the sweeper's issue-intake job initially carried duplicate needs:/if: keys (stale pair inherited from issue-intake.yml) — PyYAML tolerates duplicates, GitHub rejects the workflow at startup (merge-push run failed with zero jobs; dispatch returned 422 naming the lines). Fixed in #755; afterwards ALL 23 workflows on main were re-validated with a duplicate-key-strict YAML loader (all pass) and the sweeper dispatched successfully (run 40826288774, queued in the backlog at last check). The first scheduled ticks will exercise it fully. dezren39 commented on Oct 29, 2026 agent-note:v1
state: slice landed (naming + merge requirement + sweeper), PR #2148 merged 2026-10-29 (merge commit 24901e7)
The expanded-directive slice that had landed in opencode/openchamber but not code is now in:
- Merge requirement stated:
.github/ci-policy.md has a "## Merge requirement" section — the basic-validation (PR) tier only is the merge requirement; the full suite runs on main and is NOT a merge gate.
basic naming applied to PR-tier job display names (basic: spec parity, basic: go build (...), basic: test, basic: nix flake check (<check>), basic: guard PR check list, basic: Go module tidy, basic: workflow-contract (...), basic: proxy port fallbacks); main/nightly-only jobs carry full (main tier): . Workflow names unchanged (main-broken.yml and jules.yml reference them in workflow_run triggers); the id aggregator keeps its historical nix flake check status name (the opencode aggregator exception). Main runs remain run_id-keyed, never cancelled.
- Sweeper:
auto-assign.yml deleted; .github/workflows/repo-sweeper.yml runs every 15 min (single live run, group repo-sweeper, cancel-in-progress — schedule/dispatch-only, no issues/pull_request_target triggers) and assigns the maintainer to every open issue/PR in one deterministic pass. Audit: no other event-based issue management existed in code. Kept event-based with justification: jules.yml (a human applies the jules label and waits for Jules; its workflow_run leg is the CI: Jules workflow_run subscribes to every workflow completion — 44 of the last 100 repo runs are skipped no-ops, and they share the concurrency group that can drop a real ci-failure-fix run #304 ci-failure-fix chain) and main-broken.yml (Phase 3 workflow_run watcher, not issue management).
- Formatting left the merge tier (Drew, 2026-10-29): the nix-ci treefmt job is gone; its proxy-port-fallbacks validation survives as
basic: proxy port fallbacks. New .github/workflows/auto-format.yml runs treefmt on push to main (+ nightly) via a new write-mode nix run .#format app (lib/default.nix) and commits fixes as the github-actions bot (style(treefmt): auto-format on main), loop-safe via GITHUB_TOKEN push suppression + a head-commit guard. ci-policy.md states the rule.
Merge-time caveat: four id matrix jobs (rustfmt/cargo-fmt/clippy/treefmt inside pkgs/id) and their aggregator were red at merge with the FlakeHub auth failure (#2120, repo-wide, pre-execution); the rest of the basic tier was green, including the other 22 id matrix jobs in attempt 1. Detail is recorded on PR #2148.
Follow-ons landing immediately after this comment: branch protection on main requiring the every-PR basic context, a merge_group trigger for nix-ci, and the merge-queue pilot ruleset (noted on tracker #1599).
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|