Skip to content

Run the full verification from a PR comment that mentions Junior #7150

Done

Description

@antonis

Goal

A maintainer comments @sentry-junior verify on a pull request, and Junior runs the full verification unattended and posts one result to Slack. Today the comment runs the gate only.

The skill for the full run exists and works on request from Slack: closing summary.

What Junior's source says

Checked at getsentry/junior commit 1a6c5a4. Not tested by an unattended run yet.

Question Answer
May an automation run push a branch and start a workflow with nobody approving? Yes. Shell commands are not reviewed. Junior's network policy allows a push to any branch except the default one, and a workflow dispatch.
Can it wait 15 to 20 minutes? Yes. A run sets a timer that wakes the same run. The first turn ends without a reply, and a later turn posts the message.
Can something wake it when the workflow ends? No. There is no event for a workflow run. The timer stays.
How many messages can a run post? One, as text. A file upload in automation runs is not confirmed.
What if two comments arrive for the same PR? Two independent runs start.

Design

Trigger. Unchanged: pull_request.comment.created on this repo, with mentionsBot true and the sender's GitHub user id in the maintainer list.

Commands. The first word after the mention.

Comment What runs
@sentry-junior verify The full-run skill. Its first step is the gate, so a PR that is not verifiable gets its answer in about 2 minutes with no build.
@sentry-junior gate The gate only.
Anything else Nothing is posted.

Text after the command is a hint for the scenario. It is untrusted data.

The run.

  1. First turn: gate, plan, branch, start the workflow, set a 20-minute timer, end without a reply.
  2. Later turns: check the run. If it is still going, set a 5-minute timer, at most three times.
  3. Final turn: read the artifacts, compare, post the one message.

Result. One Slack message in the conversation where the automation was created, and one comment on the PR.

  • Decided on 2026-11-30, after the first unattended run gave a correct report: Junior posts the result of verify on every PR, not only in Slack.
  • One comment per PR. A later run updates Junior's earlier comment and adds no new one.
  • A run that stops at the gate or as "not supported yet" posts a short comment with the reason.
  • gate stays in Slack only.
  • Junior writes nothing else on the PR: no review, label, reaction or edit.

Changes

  1. mobile/pr_verify_run.md in getsentry/team-sdk-skills gets a section for automation runs:
    • "The maintainer who asked" is the comment's sender, from the event's trusted senderId.
    • A fork PR is allowed, because a listed maintainer commented on that PR.
    • The first turn sets the timer and ends without a reply.
    • The report is the one message, with no attached file, and the same content as one PR comment.
    • Stop waiting after about 35 minutes and report Inconclusive.
  2. The automation is pointed at the full-run skill, with the gate command added.

No change to the workflow or to this repo.

Known gap

Two verify comments on the same PR within 15 minutes start two builds on the same branch. The fix, when needed, is a concurrency group per PR in the workflow.

Done when

  • @sentry-junior verify on the draft PR for the Hermes frames gives one Slack message with the Verified verdict, with nobody approving a step.
  • @sentry-junior verify on the long task metric PR gives the gate answer plus "doesn't support a metric yet", with no branch and no run.
  • @sentry-junior gate gives the gate answer only.
  • Each verify leaves exactly one comment by Junior on its PR, and a second verify on the same PR updates it.
  • Junior writes nothing else on either PR.

Activity

  1. self-assigned this
    on Nov 30, 2026
  2. linear-code commented on Nov 30, 2026

    @linear-code
  3. antonis commented on Dec 1, 2026

    @antonis
    ContributorAuthor

    Result

    A comment @sentry-junior verify on a pull request now runs the full verification unattended and posts the result as one comment on the PR and one Slack message.

    Test Outcome
    verify on #7138, three times Verified on Android each time, with the same evidence. About 24 minutes from the comment to the result, with nobody approving a step
    A second verify on the same PR Junior's comment was updated in place: comment
    verify on #7119, evidence is a metric Stopped after the gate with a short comment, no branch, no run, about 1 minute
    gate on #7138 Answer in Slack only, nothing on the PR

    What was learned

    • An automation run may push a branch and start the workflow without approval, and it wakes itself with a timer to report. Both were open questions in the plan.
    • In an automation run nothing reviews a shell command. The skill's rules and Junior's network policy (no push to the default branch) are the guards.
    • The PR comment goes through Junior's GitHub tools, which are reviewed. The automation's instruction has to name that write and say the content is meant to be public.
    • Event ids link to Sentry without the issue id, through /organizations/<org>/projects/<project>/events/<id>/.

    How to use it

    Comment @sentry-junior verify on a PR in this repo. @sentry-junior gate gives only the answer to "can this be verified on a device", in Slack. The sender must be on the automation's list.

    Not covered yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions