Repository navigation
tree-tested: the pull request's job must have run on the same runner labels - #211
Merged
Merged
Conversation
sprayberry-redline
approved these changes
Nov 12, 2026
sprayberry-redline
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: approve. The job matching path now rejects a pull request job whose normalized runner-label set differs from the current job, including absent labels, before accepting its checkout log. The added unit and decision-level coverage exercises ordering and case normalization, hosted versus self-hosted labels, and missing labels.
This was referenced Nov 12, 2026
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.
actions/tree-testednow also requires the pull request's job to have asked for the same runner labels as the job asking.Why
Some workflows pick the runner by who opened the pull request. A caller's CI runs its own branches on a self-hosted row, and a Dependabot or fork pull request on
ubuntu-latest. The push after merging that pull request runs on the self-hosted row. The same tree was tested, but on another machine, and a suite can differ between them: one of that caller's tests skips itself where a binary is not on PATH, which is the hosted runner's case. The pull request's run proves the tree on the hosted runner, not on the row the push would use. The rule had no way to see this, andsame-on-pull-requestcannot say it either: on a push, the workflow cannot tell who opened the pull request.The change
Rule 5 gains a check. The job of the same name in the pull request's run must have the same
labels(itsruns-on) as the job asking, compared as a set, ignoring case, as GitHub matches them. Different labels, or labels not listed for either job, answertested=false, and the job runs in full.scripts/tree-tested/check.mjs:runnerProblem(me, twin), called indecideright after the job is matched by name. The header's rule 5 says so.scripts/tree-tested/check.test.mjs: the fixtures carry labels. Four new checks cover the same labels in another order or case, a hosted runner against a self-hosted one, a job with no labels listed, and the decision when the pull request's job ran onubuntu-latest. 61 pass.