Skip to content

fix(ci): the semantic check finds the pull request a measured commit is on when its head has moved on (#1334) - #1433

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/semantic-check-moved-head
Nov 5, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/semantic-check-moved-head

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

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/pulls returns #1432, open, with its head at 00bd7dd3, which is f3c87e48 plus 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 of find_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.md and 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 on main, because the key is on main alone, 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

  • Apache-2.0. No Autodesk proprietary source, decompiled internals or NDA content.

Breaking changes

None.

Related issues

Refs #1334, #1427.

@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 09:41
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
…ver decides, and the check names the head it left behind (#1334)
@DrunkOnJava
DrunkOnJava merged commit ce0b239 into main Nov 5, 2026
34 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/semantic-check-moved-head branch November 5, 2026 09:57
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.

1 participant