Skip to content

ci: path-filter a leaf module to a fast lane (hq#14) - #53

Merged
w4ffl35 merged 1 commit into
mainfrom
ci/path-filter-leaf
Sep 19, 2026
Merged

w4ffl35 merged 1 commit into
mainfrom
ci/path-filter-leaf

Conversation

@w4ffl35

@w4ffl35 w4ffl35 commented Sep 19, 2026

Copy link
Copy Markdown
Member

Implements option 1 of Capsize-Games/hq#14 (owner-approved, alongside the recorded one-off bypass that landed #52/#280).

What this does

A changes job classifies the PR diff. When every changed file is a leaf path (spikeforge/observability/** or tests/test_observability_*.py), the twelve heavy jobs skip and a new torch-free leaf job runs instead:

Lane Jobs
leaf (GitHub-hosted, ~minutes) leaf: ruff, mypy spikeforge/, pytest tests/test_observability_logging.py, torch-free-import proof
non-leaf (unchanged) the full matrix on the self-hosted pool

push to main or any non-leaf file always takes the full path.

Why skipped jobs are safe

The ruleset requires lint, test (3.12), core-boundary, published-surfaces, packaging-guards. A job skipped via if: reports success, so those checks stay satisfied on the leaf lane. This is deliberately job-level if: rather than workflow-level paths:, because a workflow-level filter would leave required checks unreported and block every leaf PR. Recommendation: add leaf to the ruleset's required checks once this lands, so a failing leaf change cannot merge.

What is not run on the leaf lane, and why that is safe

  • The torch/matrix jobs (test 3.10–3.13, extras, test-deploy, hub, blocked-deps, headless, published-surfaces, packaging-guards): the leaf paths cannot reach torch, the server stack or the satellite distributions, so none of those surfaces change.
  • client, docs, core-boundary: unaffected by an observability-module edit.
    The leaf lane still runs the module's own tests plus a ruff + mypy pass, so the touched code is covered.

Verification

  • YAML parses; job list = changes, lint, test, test-deploy, hub, extras, blocked-deps, docs, published-surfaces, client, core-boundary, headless, packaging-guards, leaf.
  • The classifier logic is unit-checked locally against six cases (observability-only → leaf; observability + spikeforge/__init__.py → full; empty → full; etc.).

Known gaps

  • This PR's own CI is a non-leaf change, so it runs the full matrix and will queue behind the same pool. Measuring the after-median time-to-green requires it to land first.
  • Before/after timing: last full successful run 2h17m; the leaf lane is expected in single-digit minutes on ubuntu-latest (torch-free, no matrix) — to be confirmed after merge, per hq#14 criterion 3.
  • leaf is not yet a required check; that ruleset edit is proposed above and should follow the merge.

Refs Capsize-Games/hq#14

Add a `changes` classifier and a torch-free `leaf` lane so a change confined to
`spikeforge/observability/**` (or its tests) runs a small deterministic check
set — ruff, mypy on the core package, the observability tests, and a
torch-free-import proof — instead of the seventeen-job matrix on the
self-hosted pool. A `push` to main, or any non-leaf file, still takes the full
path.

Skipped jobs report success, so the required checks the ruleset enforces stay
satisfied on the leaf lane. `leaf` should be added to the ruleset's required
checks once this lands so a failing leaf PR cannot merge.

Refs Capsize-Games/hq#14
@w4ffl35
w4ffl35 force-pushed the ci/path-filter-leaf branch from 97ddfc5 to 0e72313 Compare September 19, 2026 18:28
@w4ffl35

w4ffl35 commented Sep 19, 2026

Copy link
Copy Markdown
Member Author

§12.7 clause 8 record — temporary governance mutation to unblock this merge

(a) Owner approval: approved by the owner in the continuation brief for this wave ("If it needs a bypass, apply §12.7 clause 8 in full").

(b) Recorded on the PR: this comment. The blocker is the ruleset (id 23571105, bypass_actors: []), not a failing check — this PR is 0-failed; it is queued (10 pending) because it is a non-leaf change touching .github/workflows/ci.yml.

(c) Reverted immediately after the merge and (d) verified: the ruleset is restored to bypass_actors: [], enforcement: active, with the required checks lint, test (3.12), core-boundary, published-surfaces, packaging-guards intact. The verification output is posted below.

Compensating local run (this worktree, base 3594387): ruff check . → all checks passed; mypy spikeforge/ → no issues in 247 files; pytest tests/test_observability_logging.py → 5 passed; torch-free import proof → OK.

@w4ffl35
w4ffl35 merged commit b79b807 into main Sep 19, 2026
2 of 21 checks passed
@w4ffl35
w4ffl35 deleted the ci/path-filter-leaf branch September 19, 2026 18:36
w4ffl35 added a commit that referenced this pull request Sep 19, 2026
The leaf lane added in #53 made the twelve heavy jobs *skip* on a leaf change,
assuming a skipped job satisfies a required check. A ruleset does not treat a
skipped job as satisfied, so #54 (a leaf-only PR) came back BLOCKED even though
`changes` and `leaf` passed.

Fix: the five required jobs (`lint`, `test (3.12)`, `core-boundary`,
`published-surfaces`, `packaging-guards`) now always run; only the seven
non-required heavy jobs (`test-deploy`, `hub`, `extras`, `blocked-deps`,
`docs`, `client`, `headless`) skip on a leaf change. `test` keeps `needs:
changes` and narrows its matrix to `3.12` when leaf, so the required
`test (3.12)` still reports while three cells are cut.

The `leaf` job stays as a fast extra signal; it is not a required check (the
ruleset was reverted to its original five).

Refs Capsize-Games/hq#14
w4ffl35 added a commit that referenced this pull request Sep 19, 2026
Guards the capsize_commons.logging adoption: the three correlation keys are
carried and an unrelated extra= key cannot leak into the payload.

Leaf-only change (tests/test_observability_*.py), used to exercise the CI fast
lane added in #53. Refs Capsize-Games/hq#14
w4ffl35 added a commit that referenced this pull request Sep 19, 2026
Guards the capsize_commons.logging adoption: the three correlation keys are
carried and an unrelated extra= key cannot leak into the payload.

Leaf-only change (tests/test_observability_*.py), used to exercise the CI fast
lane added in #53. Refs Capsize-Games/hq#14
w4ffl35 added a commit that referenced this pull request Sep 19, 2026
Guards the capsize_commons.logging adoption: the three correlation keys are
carried and an unrelated extra= key cannot leak into the payload.

Leaf-only change (tests/test_observability_*.py), used to exercise the CI fast
lane added in #53. Refs Capsize-Games/hq#14
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.

1 participant