Skip to content

fix(pr-unblock): skip resolve-feedback-threads where it has no thread to resolve - #13609

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/13580-skip-resolve-feedback-threads
Nov 5, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/13580-skip-resolve-feedback-threads

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #13580

Summary

resolve-feedback-threads in pr-unblock.yml now starts no job, and requests no lanes-broker mint, when it has nothing to resolve. That covers two cases: a PR no listed person opened, and an address-feedback round whose upstream is a review-comment relay (a person's reply). On a person-opened PR's review-completion round it runs as before. This removes the red job seen on #13388, where the broker refused the mint on the relay round (run 41947061462).

Fix

  • Person-opened check. address-feedback-select emits person-opened. It uses the ownerPull test that resolve-threads.mjs already applies, run on the PR read the head step already wrote (PULL_FILE), so it adds no API call. ownerPull moves into address-feedback.mjs, which resolve-threads.mjs already imports from, to avoid an import cycle.
  • Relay marker. No value in the run carries the dispatch's upstream before the job starts: the dispatch inputs are pr-number, activity, dispatcher-run-id and the verify heads, and the upstream is first resolved inside the write runner by check-trusted-trigger. So feedback-dispatch.mjs now sends a new upstream-relay: "true" input on a relay round, and pr-unblock.yml declares it. Setting it can only skip this one job.
  • Job gate. The job's if adds needs.address-feedback-select.outputs.person-opened == 'true' && inputs.upstream-relay != 'true'. The existing skip-reason list is unchanged.
  • Docs. The README's resolve paragraph names both skips, and a pr-pipeline changelog fragment records them.

Verification

  • node --test passed all 737 tests across workflow-gates, address-feedback, feedback-dispatch, resolve-threads and resolve-config/callers.
  • The new workflow-gates case checks three things: a person's PR runs; a lanes App PR, an unread author and a relay round each skip; and the input is declared. address-feedback checks person-opened for the person, stranger, bot-typed and missing-file cases. feedback-dispatch checks that a relay round sends upstream-relay and a review round does not.
  • The related dispatch, trigger, refire and config suites passed (846 tests). The shell tests read-runner-dispatcher-gate (10), pr-unblock-trusted-base (31) and check-read-caller-keys (68) passed. zizmor --offline on pr-unblock.yml reported no findings.
  • Left out: a live relay round. Whether the lanes token broker (azure-iac) reads dispatch inputs is unverified. check-trusted-trigger does not read them.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 5, 2026 15:53
… to resolve

resolve-threads.mjs serves only a PR a listed person opened and leaves
open every thread a person wrote in. publish-feedback already resolves a
lanes App PR's VALID threads. So on a lanes App PR, and on a relayed
person's reply, the job resolved nothing and still asked the lanes token
broker for a token, which the broker refused on #13388's relay round.

- address-feedback-select emits person-opened, computed with the same
  ownerPull test resolve-threads.mjs uses, from the PR read it already
  holds (no new API call). ownerPull moves to address-feedback.mjs, which
  resolve-threads.mjs already imports from.
- feedback-dispatch.mjs sends upstream-relay=true on a relay round, and
  pr-unblock.yml declares the input. Setting it can only skip the job.
- resolve-feedback-threads' if requires person-opened == 'true' and
  upstream-relay != 'true'; a person's PR on a review-completion round
  runs as before.

Closes #13580

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

chatgpt-codex-connector Bot commented Nov 5, 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-05T21:01:23.272185Z efb2d65 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 5, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #13609 (head efb2d65)

No security issues found. I read every hunk of all 10 changed files.

critical-findings: 0

Controls checked

.github/workflows/pr-unblock.yml (trusted path)

  • The resolve-feedback-threads job keeps all of its old if: terms. The change adds two more terms with &&: needs.address-feedback-select.outputs.person-opened == 'true' and inputs.upstream-relay != 'true'. The job can now run only in a subset of the cases where it ran before.
  • The new upstream-relay dispatch input appears only in a != 'true' comparison. Setting it can only skip this job.
  • The diff changes no permissions: block, token request or kill-switch step.
  • Skipping the job leaves review threads unresolved. That keeps thread-based merge holds in place, so the change is stricter and widens nothing.

.github/scripts/pr-unblock/address-feedback.mjs and resolve-threads.mjs (trusted paths, pr-unblock/ modules)

  • ownerPull moved from resolve-threads.mjs to address-feedback.mjs without change: pull?.user?.type === "User" && trustedHumans.has(pull.user.id).
  • resolve-threads.mjs:114 still applies it before resolving anything. Its only other user is the new person-opened output.
  • person-opened comes from pullFromFile (address-feedback.mjs#L1760-L1770). That function returns undefined for a missing file, a file it cannot read, or a file whose PR number or head SHA doesn't match. In every one of those cases person-opened is false and the job is skipped, so it fails closed.
  • The PR author's id and type come from the GitHub PR read, and the trusted list comes from the base branch's trusted-actors file. A PR author cannot set either value.

.github/scripts/pr-unblock/feedback-dispatch.mjs (trusted path)

  • upstream-relay: "true" is sent only when relayed is set. relayed is upstream?.path === RELAY_WORKFLOW at L516, and the existing gates in that file still apply.
  • The new input only switches off one job's mint. It gives the dispatch no new authority.

Unverified (from the PR description): the PR says it has not checked whether the lanes token broker reads dispatch inputs. Nothing in this diff gives the input any meaning beyond the job skip, so I see no widening from it.

Not in scope: the tests, the README and the changelog fragment have no security surface. The diff deletes no standing instructions and changes no plugin manifests.

Spend: the change lowers run-minute and broker-mint use by skipping a job that had nothing to do. Nothing in it can start a charge.

This was a full review of the first head this lane has seen (prior heads: 0; not blocking-only).

@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 efb2d65afb9f12f9545cad3a72c4a5f6b81c58e6; the summary is in this lane's pull request comment.

claude-lane: claude-review

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

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #13609 (one advisory finding)

This PR adds two skips to the resolve-feedback-threads gate in pr-unblock.yml. The job no longer starts when no listed person opened the PR (the new person-opened output from address-feedback-select), or when the dispatch sets the new upstream-relay input.

Closing issue #13580:

  • Criterion "starts no job and requests no mint when the dispatch's upstream is a review-comment relay … or when the PR was not opened by a listed person. It still runs as today on a person-opened PR's review-completion round": met. The gate at pr-unblock.yml:2918-2926 adds both conditions and keeps the skip-reason list.
  • Criterion "A test covers both skips and the unchanged run": met. workflow-gates.test.mjs evaluates the gate for a person's PR, a lanes App PR, an unread author, a relay round and a relay on an App PR. It also checks that the input is declared. address-feedback.test.mjs covers person-opened for a person, a stranger, a Bot-typed listed id and a missing PR file. feedback-dispatch.test.mjs covers the relay input.

What I checked by reading code (not by running anything):

  • ownerPull moved from resolve-threads.mjs into address-feedback.mjs. Nothing else in the repository imported it from resolve-threads.mjs, so the move breaks no importer.
  • person-opened reads the same PULL_FILE and HEAD_SHA that the head step writes (pr-unblock.yml:1380, :1428). On a normal round it matches the PR's real author.
  • The pass-only branch (VERIFY_PASS_HEAD) does not write person-opened, so the job stays off on those rounds. That matches the README rule that a person-opened PR gets no pass-only round.
  • relayed is defined in feedback-dispatch.mjs at line 516.
  • The new input declared under workflow_dispatch can only skip a job.

Author-claimed and unverified: the test counts in the description, the zizmor result, and whether the lanes token broker reads or rejects unknown dispatch inputs (the PR itself says this last point is unverified).

Advisory (inline, pr-unblock.yml:2921): the relay skip assumes the round's only thread is the relayed one. select does not narrow to that thread, so other bot-only threads answered in the same round on a person's PR now get no resolve pass.

Spend: none beyond what already exists. The change removes a runner and a token mint from some rounds.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 2e6031c Nov 5, 2026
77 of 78 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13580-skip-resolve-feedback-threads branch November 5, 2026 21:11
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.

fix(pr-pipeline): let a human-reply address-feedback round resolve its thread after its own push

1 participant