Repository navigation
fix(ci): the semantic check finds the pull request a measured commit is on when its head has moved on (#1334) - #1433
Merged
Conversation
…is on when its head has moved on (#1334)
DrunkOnJava
marked this pull request as ready for review
November 5, 2026 09:41
…ver decides, and the check names the head it left behind (#1334)
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.
Summary
The semantic check wrote a verdict only when the measured commit was still a pull request's head. A head moves on after Measure starts: the MCP contract sync moves it within minutes on any PR that changes a tool description, and the docs commit that records a run's figures moves it again. So the check read NOT MEASURED on most of the PRs it exists for, which nobody would notice, since NOT MEASURED does not block. It now also takes the one open pull request that holds the commit.
Motivation
Found on real data right after #1419 landed:
commits/f3c87e48/pullsreturns #1432, open, with its head at00bd7dd3, which isf3c87e48plus the watcher's contract sync. The delta read of #1419 objected to a verdict landing on a live head that was not measured. This keeps that: the verdict stays on the measured commit, and only the lookup of whose commit it is changes.Changes
tools/ci/jev_check.py:pull_of_commit, a pure function split out offind_pull_request. An open same-repository PR comes first: the one whose head it is, or else the only one holding it. Several holding it: NOT MEASURED. With none open, the closed one whose head or merge commit it is, so a run on a commit of main still finds the PR that landed it. A fork's PR is never taken and never makes the choice ambiguous, since anyone can open one holding any commit. The check's summary now names the PR and the head it had when scored, and says when that is not the measured commit and that the verdict says nothing about what changed after it.tools/ci/test_jev_check.py: 12 failure-first tests of it (51 in all), run by the PII guard job.docs/maintaining.mdand the module's own text: what the lookup does.Testing
python3 tools/ci/test_jev_check.py: 51 pass. A real scored run reads this path only onmain, because the key is onmainalone, so the first real proof comes after this lands:gh workflow run semantic-check.yml --ref main -f run_id=<a complete Measure of a head that has moved>, which I will run on #1432's run 42002548557 and report.Not measured: which PRs hold a shared commit in practice. Measure's head is normally a commit only one PR has; two open PRs holding it fail closed.
Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Related issues
Refs #1334, #1427.