Repository navigation
fix(pr-merge): link a refused run to its PR by the check run's external id - #10684
Conversation
…al id GitHub returns a check run a GITHUB_TOKEN posts with details_url set to the check run's own /runs/<check-run-id> page, whatever the POST set, so refire-refused never matched a refused run to its PR, and fix-ci-dispatch never grouped a fix-ci pair by run. report-check-run now sets external_id <lane>:<activity>:<run>:<attempt> on every check it posts, not only those with a lane record, and posting-run.mjs reads the run back from it, falling back to a details_url that names the run's page. Both readers use that one helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nal id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re-refused-match-run
…re-refused-match-run
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed Incremental review of the changes since 4547b27:
I read the code and traced the logic. I did not run the tests, so the PR's own test counts are author-claimed and unverified. No spend or hold applies. |
|
claude-security-review reviewed I found no security issues in the incremental change since 4547b27.
manifest: not hit, since this diff touches no plugin manifests. |
refire-refused.mjs, a floored gate script, now loads .github/actions/report-check-run/posting-run.mjs, so that module joins the floor as `gate` in every copy. The floor-closure test now scans refire-refused.mjs's imports, which is how it found the gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…floor row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re-refused-match-run
|
The pr-unblock lane stopped on this pull request and needs a person: a conflicted path is a workflow, submodule config or a settings file, which the lane does not resolve.
To resume, deal with the reason above, remove the gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=10684 -f activity=resolve-conflicts |
…tch-run # Conflicts: # .github/scripts/pr-merge/merge-holds.mjs # .github/workflows/pr-require-checks.yml # .github/workflows/pr-review-hosted.yml # .github/workflows/pr-review-security-hosted.yml # plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py # plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_risk.py # plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py
|
The pr-unblock lane escalated this pull request as |
A re-run is the same run id at its next attempt, so keying withStops on postingRunId let a lane stop in attempt 1 mark the attempt 2 that fixed the head, and the head was re-dispatched. postingAttempt reads the run id and attempt from external_id; withStops groups checks and matches stops on it, and a check with no readable attempt falls back to timing as an unknown run id did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re-refused-match-run
Refs: #10583
Summary
pr-merge's scheduled step "Re-fire lane runs refused as workflow-modified" never re-fired a run, because it linked a refused run to its PR by a check run's
details_url, and GitHub does not return thedetails_urlthis repository posts. Check run 122864732692 ("pr-unblock / apply-feedback-patch" on #10583, posted by run 40700900804, which the broker refused asworkflow-modified) reads back withdetails_url: https://github.com/melodic-software/claude-code-plugins/runs/122864732692andexternal_id: "", thoughreport-check-runPOSTed.../actions/runs/40700900804. The scheduled run 40711059681 therefore printed nothing for #10583.GitHub's Create a check run docs say only: "
details_url(string) The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used." and "external_id(string) A reference for the run on the integrator's system." They say nothing about a GitHub Actions token'sdetails_urlbeing replaced; the basis for that is the observed check run above.external_idset over the API is kept: everypr-merge / gatecheck reads back withexternal_id: pr-merge-gate.fix-ci-dispatch.mjsparsed the same field (RUN_PAGE), so on live data it never paired a fix-ci check with its run's lane-stopped stop and always took the timing fallback.Fix
report-check-runsetsexternal_idto<lane>:<activity>:<run id>:<run attempt>on every check it posts. Before, it set it only when the run job left a lane record, so a run that failed before the skill (the lane-token-denied case) posted none. The format is the onedocs/conventions/pr-pipeline/pr-run-activity.mdalready specified; no other reader parses it..github/actions/report-check-run/posting-run.mjsowns the format:externalIdOfbuilds it andpostingRunId(check)reads the run id back from it, falling back to adetails_urlthat names the run's own/actions/runs/<id>page.refire-refused.mjsandfix-ci-dispatch.mjsboth usepostingRunId.lane-record.mjsno longer builds the id./runs/<check-run-id>page carries no run id, so the fallback cannot read it.action.ymlandpr-run-activity.mddescribe the new behavior. Changelog fragment:.changes/pr-pipeline/.Behavior changes to note:
external_id.fix-ci-dispatchnow pairs a fix-ci and fix-ci-rung-up check by run, as its comment always said, instead of treating each check as its own attempt.Existing PRs: check runs posted before this merges have an empty
external_idand a/runs/<check-run-id>details_url, so neither path links them. #10583's refused round will not be re-fired automatically; it needs a new head (any push) once this lands. No migration is needed.Verification
details_url/runs/<check-run-id>,external_idnaming the run),node --testover refire-refused, fix-ci-dispatch and report-check-run tests gavetests 127, pass 109, fail 18, including the new "a refused run links to its PR through the check's external_id ..." and "a run job that failed before the skill names its run in external_id".tests 260, pass 260, fail 0; on the head merged with main:tests 197, pass 197, fail 0.bash scripts/check-affected.sh --tests:11 passed, 5 skipped over 14 changed files.uvx pytest plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py:13 passed, 503 subtests passed(no floor row needed).Related
pr-unblock.ymlmid-run and caused that refusal.🤖 Generated with Claude Code