Skip to content

feat(pr-pipeline): start address-feedback when a listed human replies on an escalated thread #7866

Closed

Description

@kyle-sexton

Problem

After #7865, address-feedback applies a listed human's reply on a thread it escalated. But nothing starts the lane when that reply is posted. pr-feedback-dispatch.yml runs only when a review workflow completes, and it skips a head that already has an address-feedback check run. So an owner's reply waits for the next review round or a manual dispatch.

Options (security-relevant: what starts a write lane)

  1. Add a pull_request_review_comment trigger to the dispatcher. The trigger gate and the broker would then have to accept a dispatch with no review run behind it.
  2. Have an existing trusted scheduled caller (work-unblock or pr-merge) dispatch address-feedback for PRs that carry a decided thread newer than their last address-feedback check.

Acceptance criteria

  • An owner's reply on an escalated thread leads to an address-feedback run within one sweep.
  • No path lets a non-listed author start the lane.

Refs: #7864, #7865

Activity

  1. added
    needs-triage
    on Oct 18, 2026
  2. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Verified: request valid

    Default branch: e59e0be (not applicable)
    Open linked PRs: none (#7865, merged as 28c01e9, is the prerequisite: it makes address-feedback act on a listed human's reply once the lane runs, but adds no trigger)

    Nothing starts the lane when that reply is posted:

    • pr-feedback-dispatch.yml triggers only on workflow_run completion of the two review workflows (.github/workflows/pr-feedback-dispatch.yml:17-21).
    • feedback-dispatch.mjs:159-161 skips a head that already has a pr-unblock / address-feedback check run, so the next review round on the same head also skips.
    • The trigger gate accepts a dispatcher run only when started by push, a workflow_dispatch from a listed human, or a workflow_run from a review run (.github/actions/check-trusted-trigger/check-trusted-trigger.mjs:24, :340-346); pr-unblock-dispatch.yml:10-11 records the same limit for the broker. Neither option in the issue works without changing the gate and the broker.
    • Today the only path is a listed human hand-dispatching pr-unblock.yml.

    Related: #7860 hit the same trigger limit; the owner declined a scheduled dispatcher there on 2026-10-18, and #7860 is now scoped to marker wording only, so the trigger question lives here. This is a code-path check, not a reproduction.

  3. added
    status: confirmed
    on Oct 18, 2026
  4. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Agent Brief

    Type: Feature
    Summary: Start pr-unblock's address-feedback activity when a listed human replies on a review thread the lane escalated, without letting anyone else start the lane.

    Current behavior:
    The feedback dispatcher runs only after a review workflow completes, and skips a head that already carries an address-feedback check run. An owner's reply on an INCORRECT, UNCERTAIN or VALID-defer thread waits for the next review round on a new head, or a manual pr-unblock.yml dispatch.

    Desired behavior:
    Within one dispatcher pass after a listed human's reply on an escalated thread, address-feedback runs for that PR, accepted by the trigger gate and the lane token broker. Only a decided thread whose direction comments are by listed humans (per threadAuthors) can cause the dispatch.

    Key interfaces:

    • pr-feedback-dispatch workflow; dispatchFeedback / hasWorkableThread
    • threadAuthors / trustedHumansFrom; the trusted-actors list
    • the per-head check-run skip on pr-unblock / address-feedback
    • check-trusted-trigger's dispatcher-event policy (DISPATCHER_EVENTS, the workflow_run upstream path, the pr-feedback-dispatched-<upstream>-<run> record)
    • the lane token broker's dispatcher check (melodic-software/azure-iac)
    • the kill switch CLAUDE_LANES_DISABLED

    Acceptance criteria:

    • A listed human's reply on an escalated thread leads to an address-feedback run within one dispatcher pass, including when the head already has an address-feedback check run older than the reply.
    • A reply or edit by a non-listed author on that thread causes no dispatch.
    • A forged pr-unblock.yml dispatch naming the new dispatcher run is refused by the gate and the broker.
    • The kill switch, held labels, the round cap and the resolve-config slot check still stop the dispatch.
    • ADR 0071 (or a successor ADR) and the gate README record the newly accepted dispatcher event.

    Out of scope:

    Why a human: Which new event may start a write-lane dispatcher is a security-surface, cross-repo decision (the broker lives in azure-iac). Options: a pull_request_review_comment trigger, a scheduled caller (declined for #7860 on 2026-10-18; ADR 0071 excluded a schedule sweep), or having the already-trusted push-to-main dispatcher also sweep decided threads (no new event, but misses "within one pass" when main is quiet). Evidence that would settle it: the owner's ruling on trusting a non-push dispatcher event; GitHub's "Events that trigger workflows" page on which ref's workflow file a pull_request_review_comment run uses (UNVERIFIED, not checked this session); and the matching broker change in azure-iac.

  5. added
    needs-human
    and removed
    needs-triage
    on Oct 18, 2026
  6. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Probe, then build. Use an unprivileged relay workflow on pull_request_review_comment (permissions: {}, no checkout, no secrets) listed in pr-feedback-dispatch.yml's workflow_run.workflows. Do not add a new dispatcher. The gate and the azure-iac broker accept that upstream by path, event and actor id. First run one probe in pr-pipeline-sandbox to confirm: the relay run's actor id is the commenter's; its head_sha is the PR head; pull_requests is populated; it runs on a PR with a merge conflict. Build only if all four hold.

  7. removed
    needs-human
    on Oct 25, 2026
  8. kyle-sexton commented on Oct 25, 2026

    @kyle-sexton
    MemberAuthor

    Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.

    To hold this issue again, add needs-human (or status: needs-decision) and say why in a comment.

  9. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: structural
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: High
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    Decision recorded. Probe, then build. Use an unprivileged relay workflow on pull_request_review_comment (permissions: {}, no checkout, no secrets) listed in pr-feedback-dispatch.yml's workflow_run.workflows. Do not add a new dispatcher. The gate and the azure-iac broker accept that upstream by path, event and actor id. First run one probe in pr-pipeline-sandbox to confirm: the relay run's actor id is the commenter's; its head_sha is the PR head; pull_requests is populated; it runs on a PR with a merge conflict. Build only if all four hold.

    #7866 (comment)

    The decision settles the open questions about the trigger. The work is to run the sandbox probe, then add the relay workflow and update the gate and broker if all four checks hold. No fix or timeline is promised.

    Automated triage, applied by the lanes App.

  10. added
    status: ready
    on Oct 25, 2026
  11. 22 remaining items

  12. added
    status: confirmed
    and removed
    status: ready
    on Nov 1, 2026
  13. melodic-automation-lanes commented on Nov 1, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: a criterion names .github/workflows/pr-unblock.yml, which the issue lane cannot push (patch-protected-path); a builder session takes it. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  14. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Broker side is live. azure-iac#104 merged and deployed: the production run is https://github.com/melodic-software/azure-iac/actions/runs/41353771343 (operation=up, success). Its preview was clean, with 22 resources unchanged and a code-only deploy. The relay PR #12017 is armed for the merge queue. Still left on #7866: one live relay, dispatch and address-feedback round on a lanes App PR.

  15. kyle-sexton commented on Nov 2, 2026

    @kyle-sexton
    MemberAuthor

    Status: what landed and what is left.

    Status check by the issue-triage session against main at 0ed6022913, on the criteria in the 2026-11-01 decision comment, with the all-four probe condition lifted by owner decision Q1(a) (2026-11-01).

    Met:

    Remaining:

    • A listed human's reply on an escalated thread leads to an address-feedback run within one dispatcher pass, including when the head already has an address-feedback check run older than the reply. The relay (.github/workflows/pr-review-comment-relay.yml), the dispatcher upstream (pr-feedback-dispatch.yml:99) and their tests (feedback-dispatch.test.mjs:924, :945, :957) are on main, but no live relay → dispatch → address-feedback round is recorded. The first live relay runs (41363810027, 41363812569) found no answered escalated thread (feat(pr-unblock): name the upstream run on every feedback-dispatch skip #12181).
    • A forged address-feedback dispatch naming the relay run is refused by the trusted-trigger gate and the azure-iac broker. The gate half is covered: check-trusted-trigger.test.mjs:2374-2397 refuses 17 forged relay shapes. For the broker half, azure-iac#104 is deployed, but no refusal of a forged relay is recorded.

    Route: both need a live run on a lanes App pull request (a listed person replies on an escalated thread, and a forged dispatch is checked against the deployed broker). That is a host run.

  16. added
    host-run
    on Nov 4, 2026
  17. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Status: the relay → dispatcher chain runs live; only an answered escalated thread is missing.

    Live runs on 2026-11-04, each a person's review comment relayed and judged by pr-feedback-dispatch:

    Both skips are correct. The relay fires, the dispatcher reads it as its upstream, and the holds still stop it.

    Broker half: src/lanes-token-broker/test/dispatcher.test.mjs:635-750 on azure-iac main (8fe55f2d75) refuses 22 forged relay shapes (unlisted actor or triggering actor, listed bot, lanes bot, missing actors, wrong event, and others) and mints only for a listed human's relay bound to the PR head. Whether that commit is the one deployed is not checked here. No live forged dispatch was sent against the production broker: tests cover the shapes, and a live forgery would only probe production.

    Left: one live round where a listed person answers a thread a lane escalated on a lanes App pull request, so the dispatcher starts address-feedback (owner Q2(a), 2026-11-02). No lanes App PR is open now, so this waits on the next lane escalation.

    Posted by the Automation Lanes session. This was generated by AI.

  18. kyle-sexton commented on Nov 5, 2026

    @kyle-sexton
    MemberAuthor

    Claim released. The Backlog HITL session (hitl-backlog) has no live work, branch or PR on this issue. It is free for any lane to take.

  19. kyle-sexton commented on Nov 5, 2026

    @kyle-sexton
    MemberAuthor

    Done: the live round happened. Owner decision Q2 (a): this issue closes on the next live round of an escalated-thread reply, then relay, then dispatch, then address-feedback.

    • Escalation: the lane left the thread UNCERTAIN (r4474158154, 2026-11-04T22:30Z).
    • Reply: a listed human replied on that thread (r4475404983, 2026-11-05T01:12:50Z).
    • Relay: 41946949979, event pull_request_review_comment, success.
    • Dispatcher: 41946970130 logged dispatched #13388 head 24c1d69d… upstream run 41946949979 workflow_run_id=41947061462.
    • address-feedback: 41947061462 fixed the finding and posted VALID, fixed (r4475489494).

    Its resolve-feedback-threads job was refused a broker mint (untrusted-actor). That defect is tracked in #13580.

  20. removed
    status: confirmed
    host-run
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Work status

    confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions