ci: path-filter a leaf module to a fast lane (hq#14) - #53
Conversation
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
97ddfc5 to
0e72313
Compare
§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 (c) Reverted immediately after the merge and (d) verified: the ruleset is restored to Compensating local run (this worktree, base |
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
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
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
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
Implements option 1 of Capsize-Games/hq#14 (owner-approved, alongside the recorded one-off bypass that landed #52/#280).
What this does
A
changesjob classifies the PR diff. When every changed file is a leaf path (spikeforge/observability/**ortests/test_observability_*.py), the twelve heavy jobs skip and a new torch-freeleafjob runs instead:leaf: ruff,mypy spikeforge/,pytest tests/test_observability_logging.py, torch-free-import proofpushtomainor 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 viaif:reports success, so those checks stay satisfied on the leaf lane. This is deliberately job-levelif:rather than workflow-levelpaths:, because a workflow-level filter would leave required checks unreported and block every leaf PR. Recommendation: addleafto 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
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
changes, lint, test, test-deploy, hub, extras, blocked-deps, docs, published-surfaces, client, core-boundary, headless, packaging-guards, leaf.spikeforge/__init__.py→ full; empty → full; etc.).Known gaps
ubuntu-latest(torch-free, no matrix) — to be confirmed after merge, per hq#14 criterion 3.leafis not yet a required check; that ruleset edit is proposed above and should follow the merge.Refs Capsize-Games/hq#14