Skip to content

fix(ci-inference): plan a purpose from a job that runs its step - #185

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

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/ci-inference-skipped-provider

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #184

Changed behavior

planForPurpose used to pick the provider with the fewest blocked operations. It now first prefers a provider that runs a step of the purpose in this instance (willExecute !== false) over one whose every such step is skipped by its condition. Blocked count and declaration order still break ties.

When every provider skips the step, the result is unchanged: one of them is chosen and TEST is refused as before.

jobProvides is unchanged, so provides still records what a job declares.

Validation

Unsupported cases

  • An UNRESOLVED condition (willExecute: undefined) still counts as possibly running, so that instance stays a candidate and keeps its refusal reasons, as before.

A matrix instance whose every step of the purpose is skipped by its if:
condition no longer wins the provider choice over an instance that runs the
step, so a test step gated to one OS is planned from that OS's instance
instead of refused.

Fixes DiffCI#184

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 af02078.

Checked: planForPurpose now prefers a job that runs a step of the purpose (willExecute !== false) over one whose every such step is skipped, then fewest blocked operations, then declaration order (stable sort). The matrix test fails on main (it picks the skipped windows instance) and passes here; when every instance skips, TEST is still refused. An UNRESOLVED condition still counts as possibly running. Required hosted checks are green. DiffCI change impact is still in progress, the usual fork skip. No overlap with our PRs.

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 ff340f1 into DiffCI:main Nov 18, 2026
12 of 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: planForPurpose picks a matrix instance whose test step is skipped and refuses TEST

2 participants