Skip to content

fix(ci-inference): expand matrix include the way GitHub does - #165

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/ci-inference-matrix-include
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/ci-inference-matrix-include

Conversation

@FredApps

@FredApps FredApps commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #164

Changed behavior

expandMatrix now follows GitHub's documented include rules:

  • An include extends every original combination whose original values it does not overwrite. Values an earlier include added can be overwritten.
  • An include that fits no original combination is appended as its own cell. Later includes never extend appended cells.
  • A matrix with no axes, only include, has one cell per entry instead of a single merged cell.

exclude is unchanged and still runs before include.

Validation

  • tests/ci-inference/matrix.test.ts is new and added to release-files.json. It covers GitHub's documented example, overwriting an added value, include-only matrices, and exclude-then-include. Three of the four tests fail on main; the output is in CI inference: matrix include does not follow GitHub's expansion rules #164.
  • npm run typecheck, npm test (1171 tests pass), npm run build, npm run audit:boundary.

Unsupported cases

These are unchanged: matrices built by an expression, non-scalar axis values, and non-scalar include or exclude values are still reported as unsupported.

An include entry now extends every original combination whose original
values it does not overwrite, may overwrite values an earlier include
added, and otherwise becomes a new cell that later includes leave alone.
A matrix with only include entries gets one cell per entry.

GitHub's own documented example now expands to its documented six cells.

Fixes DiffCI#164

Signed-off-by: FredApps <[email protected]>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-review (Yandere-san). Head 1e58aea.

Checked: expandMatrix against GitHub's documented include example; later includes can overwrite values an earlier include added, but not original axis values; an include that fits no remaining original cell is appended, and later includes do not extend appended cells; a matrix of only include entries is one cell per entry; exclude still runs first. The new tests fail on main (3 of 4) and pass here (4/4). tests/ci-inference/*.test.ts also pass locally. Hosted CI is green (12 success, change-impact neutral on the fork). No overlap with #167 #171 #176 #179 #182 #186.

No code changes from me. Nothing open.

@FredApps
FredApps marked this pull request as ready for review November 18, 2026 00:56
@adityankale190895
adityankale190895 merged commit 01dc689 into DiffCI:main Nov 18, 2026
13 checks passed
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.

CI inference: matrix include does not follow GitHub's expansion rules

2 participants