Repository navigation
fix(ci-inference): plan a purpose from a job that runs its step - #185
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Merged
Conversation
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
commented
Nov 17, 2026
FredApps
left a comment
Contributor
Author
There was a problem hiding this comment.
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
marked this pull request as ready for review
November 18, 2026 00:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #184
Changed behavior
planForPurposeused 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.
jobProvidesis unchanged, soprovidesstill records what a job declares.Validation
tests/ci-inference/jobs.test.tsis new and added torelease-files.json. Its matrix test fails onmain, picking the skipped windows instance; the output is in CI inference: planForPurpose picks a matrix instance whose test step is skipped and refuses TEST #184. The second test pins the all-skipped refusal.npm run typecheck,npm test(1169 pass, 0 fail),npm run build,npm run audit:boundary.Unsupported cases
willExecute: undefined) still counts as possibly running, so that instance stays a candidate and keeps its refusal reasons, as before.