Skip to content

Write the design document for Junior-run verification in CI #7124

Done

Description

@antonis

Goal

A design document, linked to the Linear project, that settles how Junior and a GitHub Actions workflow verify a PR together. The project playbook requires one for a project of this size.

The split

Part Where
Gate, plan, scenario and sample changes Junior
Build both sides, run the flows, collect logs and screenshots A GitHub Actions workflow: a fixed script with no agent and no secrets
Find the events in Sentry, compare, write the report Junior
Post the report Junior, after a maintainer approves

Decisions to record

  • How the scenario reaches the runner. Proposal: Junior pushes a short-lived branch with the PR head, the flow and any sample change, and deletes it afterwards. The branch name stays outside main and release/**, the only branches whose pushes start other workflows.
  • The workflow's inputs and outputs. PR number, branch, platform, run ids, repeat count; logs, screenshots and a result file.
  • Shared scripts. Which build, reverse-patch, run and check commands move out of the skill's reference files so the local skill and the workflow use the same ones, on macOS and Linux.
  • Checks built into the workflow. The stale-bundle check, the control event, and up to three repeats in one dispatch.
  • Who can start a run. People with write access, through Junior. For a fork PR, only when a maintainer asks.
  • How Junior waits for the result.
  • Where the report goes. One draft comment, shown to a maintainer first.
  • Runners. Linux for Android, and for every JS-only change. macOS only when the claim touches iOS.

Inputs

Done when

This runs as a spike. The design is working notes, corrected after each experiment, and the team review waits until there are results. The current plan: #7124 (comment)

  • The plan is posted on this issue and the Linear project matches it.
  • The first experiment, the two triggers with the gate only, has a result.

Activity

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

    @linear-code
  3. antonis commented on Nov 30, 2026

    @antonis
    ContributorAuthor

    Plan

    This continues as a spike. The design is working notes that each experiment corrects, and the team review waits until there are results to discuss.

    Where it stands

    The test workflow verify-pr-spike.yml on main verifies #7087 end to end when Junior starts it (#7127). It handles that one PR only: a fixed flow, native Android changes, crash events.

    The flow

    Step Where
    Gate: can this PR be verified on a device? Junior
    Plan the scenario, push verify/pr-<number> Junior
    Build without and with the change, run the flow on each Workflow, build job, no secrets
    Fetch the two runs' events from Sentry Workflow, fetch job, no PR code
    Wait, read the artifacts, compare, draft the report Junior
    Report A Slack channel during the spike. Nothing is posted on the PR

    Two triggers

    Both are Junior event automations on this repo.

    A: a comment that mentions Junior B: a PR becomes ready for review
    Event pull_request.comment.created pull_request.ready_for_review
    Filter mentionsBot, and senderId in a list of maintainers is_draft: false, and opener_role of admin, maintain or write
    Drafts Yes No
    PRs from outside contributors and bots Yes, because a maintainer asked No
    Later pushes Verified again when a maintainer comments Not verified again
    • Trigger B needs no separate "opened" event. Junior publishes ready_for_review for a PR that is opened as non-draft.
    • Trigger B does not run on pushes, to avoid CI runs nobody asked for. After a push, a maintainer asks again with trigger A.
    • A new run replaces a run in progress for the same PR. The workflow's concurrency group is keyed on the PR number.
    • Text after the mention in trigger A is a hint for the scenario. It is untrusted and cannot change the rules.
    • A label is not a trigger yet. Junior publishes label events for issues but not for pull requests.

    Experiments, in order

    1. Triggers with the gate only. Both automations run the gate and report to Slack. The gate works on any PR and takes 1 to 3 minutes.
    2. A merged PR that changes JavaScript: feat(tracing): Report long tasks as ui.long-task spans in transactions #7110. Needs the flow as an input, a rebuild of packages/core on each side, the script taken from main, and spans in the fetched fields.
    3. An open PR: feat(android): Report JS thread hangs as errors on Android #7111. Tests reverse-applying a change that has no merge commit.
    4. iOS. A second build job on a macOS runner, once the Android job handles experiments 2 and 3.
    5. Trigger A runs the full flow, then trigger B.

    Postponed until a run needs them

    • Scripts shared by the local skill and the workflow.
    • The control event and repeated runs.
    • A GitHub environment limited to main with a dedicated read-only token. Today only a rule for Junior keeps the workflow from being started on a branch.

    Checked against Junior's source

    • Event automations exist, need a repo filter, and run without a Slack message.
    • The filters above are matched in code before the agent starts.
    • An automation is limited to 10 runs per minute.

    Not known yet

    • Whether an automation run can push a branch and start a workflow without a person approving each step.
    • Whether an automation run can wait 17 minutes for the workflow. If not, a second automation has to pick up when the run ends.
    • How long an iOS verification takes in CI.
  4. antonis commented on Nov 30, 2026

    @antonis
    ContributorAuthor

    Summary

    Closed without a formal design document. The work continues as a spike, and the team review waits until there are results to discuss.

    • The plan is in this comment: the flow, the two triggers, and the experiments in order.
    • Experiment 1 is done. A comment @sentry-junior verify on a draft PR (fix(core): Keep Hermes InternalBytecode.js frames out of app #7138) started Junior's gate with no Slack message. The answer arrived in Slack in about a minute, Junior wrote nothing on GitHub, and three runs gave the same answer.
    • Not tested: the second trigger, which runs when a PR becomes ready for review. It is set up and runs the first time that happens.

    Next

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