Skip to content

fix(pr-unblock): work a fix request in a thread a trusted person opened - #11159

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/pr-fix-trusted-author-threads
Oct 30, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/pr-fix-trusted-author-threads

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: a dead end found while driving lane PRs; a trusted maintainer's fix request had no thread the lane would take.

Summary

address-feedback took a PR-fix lane: please fix this finding request only as a reply on a
thread a review bot opened (threadAuthors returned null for any other root). A trusted
maintainer therefore could not ask the lane to fix a failing check on a PR with no bot thread: a
thread they opened was never kept, and the round stopped with feedback-untaken-threads.

Now a thread a trusted person opened is worked under the same rules as a bot's thread: it is kept
only when a write-access trusted person's fix request is in it (first comment or a later one), and
after a lane escalation on it, a trusted person's reply re-arms it as it does on a bot thread.
Untrusted authors stay refused.

Fix

  • .github/scripts/pr-unblock/address-feedback.mjs threadAuthors: the root check also accepts a
    trusted person's comment, using the trust check the function already applies to repliers
    (isHuman: on the trusted-actors list, never edited or last edited by someone on it); the
    existing no-escalation branch then requires a fix request by a fixers member (trusted plus
    write/admin permission). This file has no author_association check; trust is
    trusted-actors.json plus the permission read. onReviewedHead accepts the thread because its
    review is the opener's own and the request makes it directed (any head). The dispatcher
    (feedback-dispatch.mjs hasWorkableThread) calls the same function, so it dispatches for such a
    thread too.
  • Doc comments in address-feedback.mjs and feedback-dispatch.mjs, and
    docs/conventions/pr-pipeline/README.md and pr-run-activity.md, name the new root.
  • .changes/pr-pipeline/ patch fragment.

Downstream: the adjudicator never judges such a thread (root.author !== "reviewer", and it is
directed), and past the round cap needsPerson sends it to a person, as it does any thread whose
root is not a bot's.

Verification

  • New tests in .github/scripts/pr-unblock/address-feedback.test.mjs: the keep case failed before
    the change and passes after; the refusal case (account off the list, read-only person, a
    stranger's reply, a request a stranger last edited) passes before and after.
  • node --test over address-feedback.test.mjs, feedback-dispatch.test.mjs,
    adjudicate-feedback.test.mjs and publish-feedback.test.mjs: 502 of 503 pass. The one failure,
    ownerAdoption reads the base adoption section..., is local: the worktree lacks ajv under
    .github/actions/resolve-config, and it passes in a checkout that has it.
  • scripts/check-changelog-fragments.sh --check and markdownlint on the changed docs: clean.
  • Biome reports import order and formatting on both .mjs files; main reports the same, so they
    predate this change.

Related

  • docs/conventions/pr-pipeline/README.md (fix requests)

🤖 Generated with Claude Code

kyle-sexton and others added 5 commits October 29, 2026 23:59
threadAuthors took a `PR-fix lane: please fix this finding` request only as
a reply on a thread a review bot opened. A trusted maintainer could not ask
the lane to fix a failing check on a PR with no bot thread, and the round
stopped with feedback-untaken-threads.

A thread whose first comment is a trusted person's (the trusted-actors list,
never edited or last edited by someone on it) now passes the root check, and
the existing no-escalation rule then works it only when a write-access
trusted person's fix request is in it. Its review is the opener's own, so
onReviewedHead accepts it as directed on any head. A thread an account off
the list opened, one a read-only person opened, one with a stranger's reply,
or one with no fix request is still left alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 05:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-10-30T05:52:48.182384Z 283045d 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 Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 5d72e37e213a05b60eb69a15f67b702d0a12d733: no file of this pull request changed since the review of 283045d.

No blocking findings. I read the diff, the PR context and threadAuthors, onReviewedHead, keepThreads and needsPerson in address-feedback.mjs. I ran no tests; the PR's test results are the author's claim and I did not confirm them.

What the change does. isHuman moves above the root check, so a thread whose first comment is from a trusted person is no longer rejected outright. The root must be on the trusted-actors list and not last edited by anyone off it. Acceptance still depends on later branches.

  • With no lane App comment, the thread is kept only if humanAsks(fixers) finds a fix request by a write-access trusted person.
  • With a lane escalation, the existing branch takes it: every comment after the escalation must be a trusted person's reply.
  • A human-rooted thread that is neither of those returns null.

Checks that hold.

  • Authors in a human-rooted thread: the every(finder) early return can't be reached, because the human root's finder is null. So requesters gating still applies as before.
  • Review match: onReviewedHead needs review.user.id === firstAuthorId. A comment on someone else's review, or one with no review, is not kept.
  • Any head: a kept human-rooted thread always has a direction: true comment (the fix request, or the escalation reply). So the any-head rule only applies to directed threads.
  • Round cap: needsPerson returns true when the root author isn't reviewer, so these threads go to a person past the cap, as the PR says. fix-ci-context.mjs reads only comments[0].body, which is fine for a human root.
  • Trust: the trusted-actors list, the edit-by-outsider check and the write-permission read in reviewFixers are all unchanged. An untrusted root, an untrusted editor of the root, or a stranger's reply still returns null. The refusal test covers these.

Gap in the tests, advisory (not counted). The PR text says a trusted person's reply re-arms a human-opened thread after a lane escalation. The new tests cover only the no-escalation fix-request path. The escalation branch needs no change for it. But no test would fail if a future edit to the root check broke re-arming for human-rooted threads.

Spend. No change to cost or to spend on prepaid credits. A thread a trusted person opened can now start a pr-unblock round that was not possible before. That is the intended behavior, and it is bounded by the existing round cap.

Manifests. The diff changes no plugin manifest.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 5d72e37e213a05b60eb69a15f67b702d0a12d733: no file of this pull request changed since the review of 283045d.

No security issues found in this pull request.

critical-findings: 0

What I read. The full diff, the PR context, and the complete threadAuthors, onReviewedHead and keepThreads in .github/scripts/pr-unblock/address-feedback.mjs. That file, feedback-dispatch.mjs and pr-pipeline.yaml's neighbours are on the trusted-paths list, so I read what they gate as well as the change.

The change. threadAuthors now also accepts a thread whose first comment is by a trusted person (isHuman: on the trusted-actor list, never edited or last edited by a trusted-list account). The isHuman definition only moved up. It is the same predicate the function already applied to repliers.

Does it widen who or what is trusted? No.

  • A human-rooted thread skips the all-bot branch because finder returns null for the human root. It then falls into the last === -1 branch. That branch requires humanAsks(fixers): a fix request by someone in fixers (trusted-list members who also hold write or admin). It also requires every other comment to be a reviewer comment or an isHuman comment, or it returns null.
  • A root by an account off the trusted list, by a trusted person without write access, or by a person whose request a stranger last edited is still rejected. The new tests cover each of these.
  • A stranger's reply on the thread still returns null.
  • The escalation and "finding stands" branches need a lane-App comment on the thread. The lane comments only on threads it already worked, so a human-opened thread reaches them only after passing the fix-request rule.
  • onReviewedHead still requires the review that holds the root comment to be submitted by the root's author. It accepts any head only because the thread carries direction: true. That is the same treatment a trusted fix request on a bot thread already gets, and a trusted person's text was already allowed to direct the lane there.
  • The requesters filter on human-gated PRs is unchanged and still applies.

Remaining controls I checked. The adjudicator skips threads whose root is not the reviewer, and the thread cap and the requesters filter are untouched. The CRITICAL/security holds and the patch rules are unchanged by this diff.

Not an exposure. The change adds no token scope, secret handling, kill-switch change, merge-hold change or manifest change. It touches no userConfig or plugin manifest, so no manifest <field> lines apply. The remaining files are docs, a changelog fragment, comments and tests.

Spend. No change in cost or in lane run counts.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 257b56f Oct 30, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the fix/pr-fix-trusted-author-threads branch October 30, 2026 06:35
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