Skip to content

CI: select lanes from a derived lane map #345

Open

Description

@CaffeinatedCoder

Problem

Every PR runs every lane. In the last 50 merged PRs (2026-10-18 to 19), 18 changed no product code but still ran both integration legs, the consumer smoke test and Pack. Replayed through a fail-closed selection, those lanes account for 161 of 818 runner-minutes (20%), and about 2 minutes of a 4.0-minute median wall-clock run on 36% of PRs.

The minutes are free for a public repository, and job queue waits measured 2 s at the median. Waiting time is the only gain, so this is optional and comes after #341 to #344.

Change

  • A Scope job outputs true or false per lane:
    • On any event other than pull_request, it selects every lane.
    • On a PR, it takes git diff --name-only --no-renames against the merge base and matches each path against .github/ci-lanes.json. The first match decides: a global file selects every lane; a path a lane claims selects that lane; an inert path selects nothing extra; anything else selects every lane.
    • Any error exits non-zero, and the gate (CI: one gate job as the only required build check #341) then fails.
  • CiLaneMapTests derives the map from MSBuild, so it is never hand-kept. Each lane gets its test projects' ProjectReference closure, project directories, items outside those directories (the Conventions.Tests and test/oracles sources linked into the integration projects), MSBuildAllProjects, and declared run-time inputs (Integration tests read docs/efcore.md and candidates.json as declared inputs, not through the repository root #344). The test also checks that every lane has a job whose if: reads it.
  • Pack needs Integration, so it gets an explicit !cancelled() condition. Otherwise it is skipped whenever Integration is, and the skip counts as passing.
  • The push run replays the merged PR's selection. If a lane fails that the PR would have skipped, it reports a selection escape.
  • Amend AGENTS.md's "runs on every PR in both modes" to "on every PR that can change a package; always on main, release branches, tags and nightly".

Done when

Each of these seeds fails CI:

  • a file renamed out of src/
  • a linked file missing from the map
  • a failing Scope
  • a misspelled lane output
  • Pack skipped behind an unselected Integration

Activity

  1. added
    chore
    area/release
    on Oct 20, 2026
  2. CaffeinatedCoder commented on Oct 25, 2026

    @CaffeinatedCoder
    OwnerAuthor

    #409 removes Pack's needs: [ test, integration ] (PR #410), so the bullet about giving Pack an explicit !cancelled() condition no longer applies: an unselected Integration lane can't skip Pack any more. #409 also records why no docs-only rule should come before #344.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releasechore

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions