Skip to content

feat(pr-unblock): name the upstream run on every feedback-dispatch skip - #12181

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/dispatch-log-upstream
Nov 2, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/dispatch-log-upstream

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #7866

Summary

Every pr-feedback-dispatch skip line now names the upstream run, e.g. skip: #12080 has no unresolved escalated thread a trusted person answered (upstream pr-review-comment-relay.yml run 41363810027).

Fix

The first live relay runs (41363810027, 41363812569) succeeded, but the three dispatcher runs that followed logged only the skip reason, so which relay run fed which dispatch could not be confirmed. dispatchFeedback's skip helper now appends the upstream workflow's file name and run id. The path prints only when it is a .github/workflows/<name>.yml file name; anything else prints as "an unnamed workflow". The skip reasons themselves are unchanged.

Verification

  • feedback-dispatch.test.mjs 206/206, including a new case for a non-workflow path; the two end-anchored skip assertions and the one exact-match assertion now include the suffix.
  • resolve-config/feedback-dispatch.test.mjs 6/6, verify-cap.test.mjs 26/26, workflow-gates.test.mjs 48/48.

Related

🤖 Generated with Claude Code

Each skip line now ends with the upstream workflow's file name and run id,
so a relay or review run traces to its dispatch decision in one log read.
A path that is not a workflow file name prints as "an unnamed workflow".

Refs: #7866

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 2, 2026 00:10
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T00:11:58.585924Z 0984d0b Draft marked ready
ℹ️ 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

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #12181, no findings

What changed. The skip helper in dispatchFeedback now adds (upstream <file>.yml run <id>) to the end of every skip line. The file name prints only when the path matches WORKFLOW_PATH, which is .github/workflows/<lowercase-name>.yml. Any other path prints as "an unnamed workflow". The skip reasons themselves are unchanged.

What I checked

  • Run id is safe to print. The first skip(...) call is at feedback-dispatch.mjs#L480. Before it, L464 throws unless upstream.id passes RUN_ID. So the printed id is always a validated number.
  • Path is safe to print. The path regex is anchored at both ends and allows only [a-z0-9-]. That keeps newlines and .. segments out of the log, and the new test feeds in a path that has both.
  • Which run gets named. On the relay path, upstream is the run object relayUpstream reads back from the API, so the line names the relay run. On the merge, verify and sweep paths, it is the review run reviewRunAt returns. That matches what the PR description says the dispatch decision follows. relayUpstream has its own skip and still logs without the suffix, as the diff intends.
  • Nothing else reads these lines. I searched .github/. No workflow or script parses dispatchFeedback's skip: lines with a pattern anchored to the line end, so the suffix breaks no reader. The three test assertions that changed and the new test match the new format.

Verification. The PR description reports 206/206 tests passing. That is the author's claim; I had no shell in this run and did not run the tests.

Closing issue. The PR says "Refs: #7866" and closes no issue. The context file has no closing-issue section, so there were no acceptance criteria to check.

Embedded text. The PR body contains no instructions aimed at this lane.

Prior findings. This lane has posted nothing on this PR before (0 rounds with findings; the cap is 3).

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12181

I found no security issues.

Both changed files were reviewed in full. .github/scripts/pr-unblock/feedback-dispatch.mjs matches a trusted path, so it got the extra scrutiny.

The change affects log output only. The skip helper in dispatchFeedback now adds (upstream <workflow file> run <id>) to each skip line. It does not change any dispatch decision, return value, gate condition or token request.

  • Log injection / workflow-command injection: checked, with no path found.
    • The upstream path is printed only when it matches WORKFLOW_PATH (/^\.github\/workflows\/[a-z0-9][a-z0-9-]{0,80}\.ya?ml$/, L205). That pattern has no m flag, so newlines, .. and :: cannot get through. Anything else prints the fixed text "an unnamed workflow". The new test covers a path with ../ and a newline.
    • upstream.id goes through RUN_ID at L464. If it fails, the code throws before any skip call can run, so the logged id is always numeric.
  • Downstream consumers: nothing outside this file's own tests reads the skip: log lines this helper writes. A search under .github/ found no parser for them, so the suffix cannot change a gate's verdict.
  • Trust controls: no change to the trusted-trigger check, lane token scope, kill switch, merge holds or the broker.
  • PR context: contains no embedded directives aimed at the lane.

The round cap did not apply (0 prior rounds, cap 3), and there were no prior findings to restate.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 5a2c8ba Nov 2, 2026
71 checks passed
@kyle-sexton
kyle-sexton deleted the feat/dispatch-log-upstream branch November 2, 2026 00:27
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