Skip to content

build: CI runs the lanes a change can affect, behind a CI gate; the release runs every lane - #123

Merged
CaffeinatedCoder merged 5 commits into
release/2.3.0from
build/ci-lanes
Oct 29, 2026
Merged

CaffeinatedCoder merged 5 commits into
release/2.3.0from
build/ci-lanes

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #118, closes #70, closes #71, closes #73, closes #74

Problem

Every PR into release/2.3.0 ran the whole matrix whatever it changed. The 11 runs since the prober left CI took 15.0 min median wall clock (12.6 to 21.4) and 33 runner-minutes. The changes job skipped Pack and Consumer only when no path on its hand-written list changed, and that list was unreliable:

Nothing told a deliberate skip from an accidental one. The release never ran the Windows and macOS legs or the smoke test's own-feed mode (#70, #71, #73, #74).

Change

Decision 113 picks which parts of CI ("lanes") a change runs:

Changed path Linux Windows macOS Pack + smoke tests
prose: docs/, design/, issue templates, *.md outside src/ ✓ prose suite only, if every path is prose
CHANGELOG.md ✓ ✓
src/CodoMetis.TypeKit.Analyzers/, src/CodoMetis.TypeKit.Generators/ ✓ ✓ ✓
other src/ packages ✓ ✓
test/, spikes/, the other tools ✓ ✓
the smoke test, tools/Shared, tools/Directory.Build.*, tools/CiLanes, build files, workflows, anything unlisted ✓ ✓ ✓

PRs into and pushes to release/** select by diff, and never run macOS. A PR into main, a push to main, a dispatch, the nightly run and the release run every lane, macOS included. Over 150 runs, the only src/ defect a Windows leg caught alone was the code fix's CRLF (f9f64e5), and macOS caught nothing alone. The prose suite is test/Prose.slnf: the four test projects that read prose, and the woven probes that Conventions reads.

  • tools/CiLanes is a new BCL tool (decision 92):
    • select diffs with --no-renames and writes the test matrix, the pack answer and the suite (prose or full). A diff that fails fails the job.
    • classify prints a path's class.
    • gate judges toJSON(needs).
  • dotnet.yml:
    • The test matrix is the selection's legs, and the Linux leg builds test/Prose.slnf when the suite is prose.
    • Pack and Consumer need only changes, so they start beside the tests (folds in build: Pack and Consumer start alongside the test legs #117).
    • A new CI job under always() runs the gate.
    • The workflow also triggers on workflow_call, and its concurrency group is ci-…, since under the call it would otherwise equal the release's (KB-043).
  • release.yml: a new ci job calls dotnet.yml, and verify needs it.
  • nightly.yml dispatches dotnet.yml on main and every release/* branch. It starts once 2.3.0 is on main.
  • Tests:
    • PortableFileNameTests refuses names Windows or macOS cannot check out.
    • CiLaneTests classifies every file MSBuild evaluates for the packages and the smoke test.
    • ProseReaderTests fails a test project outside test/Prose.slnf whose sources name a prose path.
    • ReleaseWiringTests holds the new structure.
  • Docs: ADR 0113, KB-043, the ADR index row for 0109, CONTRIBUTING's release step, and AGENTS.md's command list.

After the merge, outside this PR and only on approval: main's required checks become CI and Labels and issue link, and the release-branch ruleset adds CI.

Tests

  • Whole solution: 18,905 tests (18,434 pass, 471 skipped).
  • CodoMetis.TypeKit.CiLanes.Tests: 89 tests over a catalogue of 24 paths, the events, and the gate's failure cases: a failed or cancelled selection, a cancelled leg, a malformed answer, a selected job that was skipped, and an unselected job that ran.
  • Seeded and caught, then undone by inverse edit:
    • without --no-renames, a move out of src/ selects Linux alone (SelectionTests);
    • a gate that accepts an unselected job that ran (GateTests);
    • tools/Shared/** dropped from the smoke-test class (CiLaneTests, ConsumerSmokeTest row);
    • the ci- prefix removed from the concurrency group (ReleaseWiringTests);
    • consumer dropped from the gate's needs (ReleaseWiringTests);
    • docs/a:b.md and Docs/seed.md staged in the index (PortableFileNameTests);
    • the source-text class dropped, and macOS let into unlisted paths (SelectionTests);
    • a docs/json.md read added to an EF test (ProseReaderTests);
    • the solution choice hard-wired to the filter (ReleaseWiringTests);
    • the prose suite chosen when any path is prose (SelectionTests).
  • Before/after, from throwaway draft PRs (details in the comment below):
    • docs-only: 8.7 → 2.4 min wall, 22.0 → 2.4 runner-minutes;
    • src/: 16.5 → 7.3 min, 38.4 → 17.7.

🤖 Generated with Claude Code

CaffeinatedCoder and others added 4 commits October 29, 2026 09:59
Each changed path selects the Linux leg, the Windows and macOS legs and the pack
by its class, and a path no class names selects everything. A pull request into
main, a push to main, a dispatch, the nightly run and the release run every lane.
A gate job, CI, over every job becomes the required build check, and release.yml
calls the build workflow before it verifies. The evidence is the 11 runs since the
prober left: 15.0 min median wall clock and 33 runner-minutes, whatever changed.

KB-043 records the GitHub Actions facts it turned on: a skipped job passes a
required check, concurrency groups ignore case and a called workflow takes its
caller's name, and the GITHUB_TOKEN can dispatch a workflow.

Refs #118

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…indows or macOS

A prose-only change will run the Linux leg alone, so a name Windows refuses or two
names a case-insensitive file system takes for one would first fail on the
release's pull request. The test reads git's index, which holds names this file
system cannot, and refuses Windows' reserved characters and device names, a
segment ending in a dot or a space, paths equal under case folding and NFC
(directories too) and a path over 160 characters. Seeded: docs/a:b.md and
Docs/seed.md staged beside docs/ both fail it.

Refs #73

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…judges the run

select diffs a pull request into release/** against its base and a push to one
against the commit it replaced, with --no-renames, and answers the test matrix
and whether to pack; every other run gets every lane, and a diff that fails
fails. classify prints a path's class. gate reads the workflow's toJSON(needs)
and passes only when the selection succeeded with answers it writes, every
selected job succeeded and every other was skipped.

Tested over a catalogue of 24 paths, one per class and the unlisted ones, the
events, and the gate's failures. Seeded: without --no-renames a move out of
src/ selects Linux alone, and a gate that accepts an unselected job that ran
passes it; both fail the tests.

Refs #118

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… gate judges the run

The changes job decided in a shell case: it failed open (a failed job skipped
Pack and Consumer, which read as passing), listed a rename's new path only, and
missed tools/Shared, .config/dotnet-tools.json and CHANGELOG.md, whose section
the packages' release notes are since #107 (#113's run skipped Pack for it).

Now it runs ci-lanes select. The test matrix is its legs, Pack and Consumer
need only changes and start beside the test legs (#117), and a CI job under
always() runs ci-lanes gate over every job. CiLaneTests classifies every file
MSBuild evaluates for the packages and the smoke test, items and imports, and
fails one that skips the pack. release.yml's ci job calls dotnet.yml (now also
workflow_call) and verify needs it; dotnet.yml's concurrency group is prefixed,
since under the call it would otherwise equal the release's. nightly.yml
dispatches dotnet.yml on main and every release branch.

Seeded, each failing its test: tools/Shared dropped from the smoke test class
(CiLaneTests), the concurrency prefix removed and consumer dropped from the
gate's needs (ReleaseWiringTests).

Closes #70.

Defect-Class: TOOL
Found-By: RS
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 2.3.0 milestone Oct 29, 2026
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, tooling, packaging, refactoring with no behaviour change area/release Versioning, changelogs, packaging and release wiring area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test labels Oct 29, 2026
…ease runs, and a prose suite

The lanes are now linux, windows, macos and pack. Over the 150 runs before decision
113 a Windows or macOS leg failed beside a passing Linux leg three times: twice for
prober tooling and once for the analyzer's code fix, which wrote CRLF beside LF in a
Windows checkout (f9f64e5); macOS never failed alone. So the analyzers, the
generators, tests and tools select Windows, the other run-time packages Linux and the
pack, and macOS runs only where nothing is selected: the release's pull request,
main, a dispatch, the nightly run and the release.

A prose-only change builds and tests test/Prose.slnf, the four test projects that
read prose and the woven probes the conventions read; the first docs-only run spent
3.6 min testing EF Core, the analyzers and ASP.NET Core, which read none.
ProseReaderTests fails a test project outside the filter whose sources name a prose
path, with waivers for literals that read nothing. The gate refuses a suite answer
the selection does not write, and the prose suite beside another leg or the pack.

Seeded, each failing its test: the source-text class dropped and macOS let into
unlisted paths (SelectionTests); a docs/json.md read added to an EF test
(ProseReaderTests); the solution choice hard-wired to the filter
(ReleaseWiringTests); the prose suite chosen when any path is prose
(SelectionTests).

Refs #118

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder

Copy link
Copy Markdown
Owner Author

Before and after

The same one-line change, in throwaway draft PRs. "Before" PRs went into release/2.3.0 (the old workflow), and "after" PRs into release/ci-lanes-demo, cut from this branch at fce2663. Wall clock runs from the first job's start to the last job's end. Runner-minutes add up every job that ran.

Change Before: jobs Before: wall Before: runner-min After: jobs After: wall After: runner-min
docs-only (docs/closed-sets.md) #124: Linux, Windows, macOS 8.7 min 22.0 #126: Linux with the prose suite, gate 2.4 min 2.4
src/ (src/CodoMetis.TypeKit/Fault.cs) #125: Linux, Windows, macOS, then Pack and Consumer 16.5 min 38.4 #127: Linux, Pack and Consumer side by side, gate 7.3 min 17.7
  • Docs-only: the prose suite's Linux leg is restore 0.2, build 0.9 and test 0.7 min (1,884 tests: Conventions, Samples, DocsQuery, Oracles).
  • src/: a core package change runs neither Windows nor macOS. The pack now starts beside the tests, not after them.
  • Changes and the gate: together they add 0.4 to 0.8 min to every run.
  • This PR's own run (40853425202): it touches workflows and tools/CiLanes, so Linux, Windows and the pack ran, without macOS. It took 9.3 min and 27.6 runner-minutes.
  • The demo base's push (40853528584): the same selection, 9.7 min.

An Analyzers or Generators change adds the Windows leg (about 8.5 min). A PR into main, a push to main, the nightly run and the release run every leg, macOS included.

CaffeinatedCoder added a commit that referenced this pull request Oct 29, 2026
release/2.3.0 took KB-043 for the GitHub Actions facts (#123), so this branch's three facts
move up by one: SuperStrong.Types is KB-044, the compared libraries' first releases KB-045,
and C# 15's union types KB-046. The knowledge index keeps both sides' rows, and the
comparison's links follow the new numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, packaging and release wiring area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test chore Build, CI, tooling, packaging, refactoring with no behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant