Skip to content

refactor(ci): simplify the pr-test-platforms and pr-unblock-dispatch workflows - #15863

Merged
kyle-sexton merged 1 commit into
mainfrom
refactor/s084-pr-test-platforms-unblock-dispatch
Nov 13, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
refactor/s084-pr-test-platforms-unblock-dispatch

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Closes #15855

session: Simplify E2 B

Summary

A /simplify pass over pr-test-platforms.yml and pr-unblock-dispatch.yml. Behavior is unchanged.

Fix

  • pr-test-platforms.yml
    • The plan step sets base="${BASE_REF:+origin/$BASE_REF}" in place of a case on the event name. Of this file's three triggers (pull_request, schedule, workflow_dispatch), only pull_request has a base, and github.base_ref is set only there. The notice text and the --base argument stay the same.
    • The hooks and lib jobs repeated the rename-1 job's 4-line shfmt comment word for word. They now point at it ("Same shfmt pin and reason as the rename-1 job."), as the guards job already does.
    • The host-skip note in test-windows-secrets said "see the job comment above". The HOST-SKIP block sits above test-windows-rename-1, so the note now names that.
    • Two broken comment wraps are rewrapped.
  • pr-unblock-dispatch.yml: two broken comment wraps are rewrapped, and a stray blank line between "Check out the default branch tip" and "Log the checked-out main tip" is removed.

Unchanged: the file names, workflow and job name:s, job ids, triggers, matrix, outputs, step ids, printed text, dispatches, and permissions.

Considered and left as is

  • pr-unblock-dispatch.yml, "Stop on an untrusted trigger": its if/else differs only in the echoed text. It is the trust gate, so I left it alone.
  • pr-unblock-dispatch.yml, the dispatch gate condition repeated on five steps: workflow-gates.test.mjs evaluates each step's if: on its own.
  • pr-unblock-dispatch.yml, the refine job's record steps and run-id checks: workflow-gates.test.mjs pins them verbatim.
  • pr-test-platforms.yml, the timing table: it leaves out a few suites the jobs also run. Adding them without measured times would put unmeasured numbers in it.

Verification

  • All 22 local test files that name these workflows pass under scripts/run-test-file.sh. They include:
    • admit.test.mjs (778), check-trusted-trigger.test.mjs (485), callers.test.mjs (280), feedback-dispatch.test.mjs (239), address-feedback.test.mjs (195), reconcile.test.mjs (183), clear-escalations.test.mjs (123)
    • dispatch.test.mjs (80), fix-ci-dispatch.test.mjs (80), workflow-gates.test.mjs (66)
    • plan-test-lanes.test.sh, dispatcher-current.test.sh and read-runner-dispatcher-gate.test.sh
  • Local actionlint 1.7.12 reports no errors for either file.
  • The full .github suite is left to ci-status, under the one-suite-per-machine rule.

Related

Follow-ups

  • For the restructuring pass (R2, Restructure and dedupe workflow files (final group, host sessions) #15695): pr-test-platforms.yml repeats the shfmt install four times, the Pester install twice and log-api-budget eight times. A shared shfmt composite action would also cover pr-require-checks.yml, eval-browser-dispatch.yml and maintenance-audit-test-selection.yml.
  • Test gap (review thread on line 90): no test pins how the plan step builds base, so an edit that left it empty on pull_request would pass every check and just run every Windows step. A grep-level assertion in a workflow-shape test would cover it. That is a test edit, which this issue puts out of scope.
  • Out of scope here: several more comment paragraphs in pr-test-platforms.yml run past 80 columns. They date from the ci.yml rename; rewrapping them would be cosmetic only.

🤖 Generated with Claude Code

…workflows

- pr-test-platforms: set the plan step's base with
  ${BASE_REF:+origin/$BASE_REF} (github.base_ref is set only on
  pull_request, the one trigger with a base) in place of a case on the
  event name; the hooks and lib jobs point at the rename-1 job's shfmt
  comment instead of repeating it; the host-skip reference names where
  the HOST-SKIP block is; rewrap two broken comment lines.
- pr-unblock-dispatch: rewrap two broken comment lines and drop a
  stray blank line between two steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T05:27:30.764838Z be57354 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed be57354b913aaee37e2ca4e6d46fafe9955088ef: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read the whole diff for both changed files (.github/workflows/pr-test-platforms.yml and .github/workflows/pr-unblock-dispatch.yml).

pr-unblock-dispatch.yml (trusted path): I read its whole change. It rewraps two comments and removes one blank line between the "Check out the default branch tip" step and the "Log the checked-out main tip" step. The pull_request_target trigger, its types and branches filters, the main-tip checkout (persist-credentials: false), the trusted-trigger gate, permissions and dispatch steps are all unchanged. Nothing new gets through any control.

pr-test-platforms.yml: the one change that affects behavior is in the plan step. A case on $GITHUB_EVENT_NAME is replaced by base="${BASE_REF:+origin/$BASE_REF}".

  • BASE_REF still comes in through env: from github.base_ref and is used quoted, exactly as before. No new expression or shell injection surface.
  • github.base_ref is set only on pull_request events. On the file's other two triggers (schedule, workflow_dispatch) it is empty, so base stays empty as it did under the old case. The selector then falls back to running every Windows step, which is the fail-safe direction.
  • Every other hunk only edits comments: two rewraps, the shfmt pin comment now points to the rename-1 job, and the host-skip pointer names its block. The SHFMT_VERSION: v3.14.1 pin lines and action SHAs are unchanged.

No trust control is widened. There are no plugin manifest changes and no deletions from instruction files. The PR context contains no embedded directives aimed at the review lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on be57354b913aaee37e2ca4e6d46fafe9955088ef; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/workflows/pr-test-platforms.yml Resolved
@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed be57354b913aaee37e2ca4e6d46fafe9955088ef: read 2 of 2 changed file(s); 1 finding(s), 1 as inline comments.

Code review: PR #15863, a /simplify pass over pr-test-platforms.yml and pr-unblock-dispatch.yml

Scope: I read both changed files in full in .claude-lane/pr.diff. Only pr-unblock-dispatch.yml is a trusted path, and its changes are comment rewraps plus one removed blank line between two steps. Neither touches a trigger, if: gate, permission or command.

What I checked

  • Plan-step base (pr-test-platforms.yml:90). base="${BASE_REF:+origin/$BASE_REF}" behaves the same as the old case on the event name. The file has three triggers: workflow_dispatch, schedule and pull_request (lines 49, 52, 54). Only pull_request fills github.base_ref, so base is origin/<base> there and empty on the other two, as before. The ::notice:: text and the --base argument are unchanged.
  • Shfmt comment pointers (lines 410, 506). The rename-1 job still has the full shfmt rationale (line 204 onward), and the guards job already points at it (line 365). So the two new "Same shfmt pin and reason as the rename-1 job." lines lead to a comment that exists.
  • Host-skip note (line 321). The HOST-SKIP SUITES (#3683) block is at line 166, right above test-windows-rename-1 (line 186), so the new pointer is correct.
  • Tests that quote the removed text. No test outside the workflow quotes the removed case text or the removed comment lines.

Closing issue #15855, acceptance criteria

  • "Behavior is unchanged…": met by reading the code. No repository test pins the plan step's base derivation (see the inline comment).
  • "The diff edits only the listed files…": met; it touches only the two listed workflows.
  • "…within 400 changed lines and 15 hand-edited files": met; 2 files and well under 400 lines.
  • "Every workflow file name, job id and trigger is unchanged": met; the diff edits none of them.
  • "ci-status is green": I can't check this from the lane; it's left to CI.

The author's verification (22 local test files and actionlint runs) is the author's claim; I did not run anything to confirm it.

No embedded instructions were found in the PR context. There are no prior findings, no settled threads, and no plugin manifest changes.

Verifier dropped 0 of 1 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 12427c8 Nov 13, 2026
70 of 71 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/s084-pr-test-platforms-unblock-dispatch branch November 13, 2026 06:12
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify the pr-test-platforms.yml and pr-unblock-dispatch.yml workflows

1 participant