Repository navigation
🐛 PR Verifier: record PR Type and PR Issue with one completed create, and fail visibly when it can't - #18796
Conversation
The pinned kubebuilder-release-tools v0.4.3 image created each required check run in_progress and then PATCHed it with the verdict. When GitHub answered the PATCH with 404 (hivecommons#18667, run 44069761061) the runs stayed in_progress for ever, Tide blocked the PR, and the continue-on-error wrapper job still went green. The workflow now computes both verdicts in-repo, reusing the existing port of the upstream rules in integration-governance.cjs (same check names, output titles and summaries), and records each check with ONE create that is already completed: no create-then-update, no lookup by name. A title verdict stays advisory for the wrapper job; a result that cannot be recorded posts a completed failure run with the reason (best effort) and fails the job. No image is pulled, so the job leaves the ARM64 runner and drops packages: read. Refs hivecommons#18764 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
GitHub runs the default branch's copy of a pull_request_target workflow (verified on the fork: a PR based on a branch carrying this change ran the default branch's old workflow). Correct the checkout comment. Refs hivecommons#18764 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. ℹ️ Sentinel: informational, author is trusted (owner), merge is not blocked. Head
No merged by Hive trusted-author auto-merge: author |
|
Needs a decision, not a merge:
Head: verdict requires_human @d12c9ec, 75/75 checks green, DCO yes, soak 0s of 10m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
No conflicts. A new head so the PR Verifier from hivecommons#18796 records PR Type and PR Issue: the runs on ac459c3 came from the earlier verifier and have sat in_progress since 11:23 AM. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
The required
PR TypeandPR Issuechecks could hangin_progressfor ever whileverify PR contentswent green. That is what blocks #18667. This PR makes the verifier record each check in one step, already finished, so the checks always reach a result. If the verifier can't record a result, the job now goes red and says why.Refs #18764. This is the v6 copy. The v5 copy is #18795. Note: GitHub runs
pull_request_targetworkflows from the default branch (v5). The v5 copy, opened alongside, is the copy that matters for #18667 once merged. This v6 copy keeps v6 the same and coversworkflow_dispatchruns on v6 branches, which use the branch's own copy.Why it happened
The pinned verifier image (upstream kubebuilder-release-tools v0.4.3, deprecated upstream) worked in two steps. First it created each check as "in progress". Then it updated the check with the verdict. Sometimes GitHub answers that update with 404 Not Found (run 44069761061 on #18667). When that happens the check stays "in progress" for ever. Edits, pushes and reopens all start by updating the existing check, so the stuck check never recovers. The image step was
continue-on-error, so the job reported success anyway.What this changes for operators
integration-governance.cjs. Check names, output titles and summaries are the same as the image's. The job runs on the normal runner pool instead of a native ARM64 runner, and dropspackages: read.status: completed, the conclusion and the output. There's no "in progress" step and no update that could fail.failurecheck that gives the reason (best effort). Thenverify PR contentsfails with an error saying the verifier could not record its result.PR Type/PR Issueitself. The wrapper job stays green, as before.labeled,unlabeledandready_for_reviewevents. These checks only read the title, so the extra runs agree with each other.Example: an
editedevent on #18667 would recordPR Type: success (Found 🐛 PR (bugfix))andPR Issue: success, one call each.After merge: un-sticking a PR
The fix only applies to events after it merges. Re-running an old run re-runs the old workflow. For a PR whose checks are already stuck, do one of these on its current head:
github.tokenflip fires nothing), orgh workflow run pr-verifier.yml --ref <branch> -f pr_number=<N>.Either one records a fresh, completed pair.
Open question (unverified): the old stuck
in_progressruns stay on the commit. I expect GitHub and Tide to use the newest run of each name, but I have not verified it. If they still count the stuck ones, the PR stays blocked. I'll check this on #18667 after merge.Files
.github/workflows/pr-verifier.yml: replaces the login, pull anddocker runsteps with a sparse checkout of.github/scripts(pinnedactions/checkout, no credentials kept) and a pinnedactions/github-scriptstep. Keeps the dispatch payload rebuild, the stale-head bailout, the concurrency block and the check names. Updates the comments..github/scripts/pr-verifier.cjs(new):record..github/scripts/integration-governance.cjs:prTypeVerdictandprIssueVerdict(the upstream check text).verifyContentsnow uses them.src/deploy/test_pr_verifier_advisory.sh: checks the new setup. Nothing touches a registry, no step iscontinue-on-error, and a stale dispatch records nothing..github/scripts/test-native-queue-workflows.py: contract tests for the new step..github/workflows/pr-auto-update-test.yml: runs the new node test.src/docs/hivecommons-migration.md,changelog.d/fixed-18764-pr-verifier-single-post.md.Tests
pr-verifier.test.cjs, mocked GitHub. One completed create per check, and no update or lookup calls. A bad title makes the check fail but not the job. A transient error is retried. When a result can't be recorded, the job fails and a fallback failure check is posted. A response that isn't completed counts as not recorded.integration-governance.test.cjs: exact upstream check text for both checks.workflow_dispatchrun on the v6 copy (run 44137409710) recordedPR Typecompleted/failure ("No matching PR type indicator found in title.", correct for thatTEST ONLY …title) andPR Issuecompleted/success, one create each, with nothing leftin_progress. Thepull_request_targetpath could not be exercised in the fork, because GitHub ran the fork's default-branch copy of the workflow there.🤖 Generated with Claude Code
https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t