PR conversations
A pull request is already where the conversation about code happens. PR
conversations make it a surface on a Control Center workspace, the same way a
chat bridge makes Slack one: @mention
@usectrl on a PR, reply inside its review
threads, or add the ai-review label, and the work happens in the PR’s review
space — under the same attribution and guardrails as anything typed in the app.
A comment and a label are gated the same way: on the member who wrote or added
it. The answers come back on GitHub, in the lane the question was asked in.
Three decisions shape the feature, and each is the same decision the chat bridge made for chat, restated for a forge: which direction the connection runs, what authorises a comment that arrives from outside and who each side is attributed to.
Polling is the transport
Section titled “Polling is the transport”GitHub’s only push channel for an app is a webhook, and a webhook needs an
inbound URL — the one thing this surface deliberately never requires. So
discovery is a sweep: one aliased search per app installation asks GitHub for
PRs that mention @usectrl and for open PRs that carry the
review label, PRs that already have a review space get their comment threads
read, and everything is diffed by comment id against what was seen last sweep.
An own app sweeps every minute over at most 25 PRs. Through Connect the calls
ride members’ own GitHub quota, so the sweep runs every two minutes over at
most 10, and a workspace below 15% of its quota is skipped until it recovers.
Connect itself never sees PR content.
The design consequences are worth naming:
- Latency is a sweep interval, not an event. The 👀 acknowledgement lands within one sweep. Nothing urgent rides on it.
- Exactly once, per comment. Comment ids are unique across GitHub; each is recorded the moment it is classified as eligible, before anything acts on it. A crash can lose a comment’s handling, never double-fire it.
- Offline time is caught up, not replayed. The seen-set is persisted, so a restart delivers what arrived while it was down. The one exception is the first sweep ever: with no memory to diff against, everything outstanding is recorded silently — an operator who labelled twenty PRs before this server existed must not come back to twenty running reviews.
- The label is a set, not an event. Search reports label presence, so a labelled PR triggers once, ever. Re-adding a label after removing it is invisible to the sweep; a mention is the re-run path.
The search runs once per installation account on that owner’s own client, because a token only sees its own installation’s repos — a single server-wide credential would quietly miss every PR under the app’s other installations.
Membership authorises, not the comment
Section titled “Membership authorises, not the comment”A PR comment arrives carrying an author — an unauthenticated external identity
until proven. The server resolves the author’s immutable numeric GitHub account
id (never the login, which can be renamed and reused) against the GitHub
sign-ins of the workspace’s members, rebuilt on a TTL because people sign in and
get invited while the server runs. For the ai-review label, the person
resolved is whoever added it most recently.
Three checks, in order, and failing any of them is silent — nothing is posted:
- A signed-in member. The account must belong to a member of this workspace who signed in to GitHub on this server
- A write role.
viewerandguestcannot start work - Push access. Replies use a token for that one repository, limited to that member’s access to it. If the server cannot mint one, it does not proceed
Every check runs before any acknowledgement, so a stranger gets no reaction and no reply. A comment is never attributed to somebody who did not send it, and a stranger’s words never enter a workspace they cannot see.
The claim
Section titled “The claim”The last step before any work is a 👀 reaction, added with the author’s own
GitHub sign-in. GitHub answers 201 for a new reaction and 200 for one that
already exists, so the reaction doubles as a lock: when the same person is
signed in on two servers that both link the repository, only the first to react
does the work. A comment that several workspaces on one server see is offered to
each, and the same claim decides.
Two identities, on purpose
Section titled “Two identities, on purpose”Each side of the conversation carries a different identity, and the difference is the feature:
- On GitHub, the reply is automation on your behalf. Every reply rides a
token for that one repository, limited to the asking member’s access, and is
authored by the app’s
[bot]account. One exception: on the shared Control Center Connect app the bot posts in review threads only when the Connect operator has listed the installation, so otherwise a reply inside a review thread is authored by the asking member’s own account. Either way every reply starts with**Control Center** (for @login):, which says who asked and doubles as the loop guard. @-mentions in the agent’s words are made inert, so a reply never notifies a user or team. - In the space, the question is yours. The message is attributed to the member the author resolved to, and the agent run executes on their behalf: its commits are theirs, and the space’s autonomy dial and action guardrails apply exactly as they do to a message typed in the app. Forge writes from the run use one-repository tokens bounded by that member, never their sign-in handed over whole.
Publishing review findings back to GitHub remains a person’s decision, made in Control Center. A mention can start a review; only a human publishes one.
The loop guard
Section titled “The loop guard”Everything authored by a bot account is dropped before any gate runs — ours
specifically, and every [bot] suffix, so another app’s review bot cannot
wake ours either — and so is every comment that starts with the
**Control Center** (for @ prefix, since a review-thread reply through Connect
can be authored by a person’s account. Without this the answers would arrive as new comments and
re-trigger the bridge forever.
Only @usectrl starts work. The App’s own login (<slug>[bot]) and its bare
slug address nothing: GitHub offers no autocomplete for an app account, and a
bare slug can belong to a human user.
What is deliberately not offered
Section titled “What is deliberately not offered”- No auto-publish. Findings land in the review space; publishing to GitHub is a separate, human action
- No fuzzy identity. The author resolves to exactly one member or is ignored — there is no best-guess attribution
- No automated approval. Automation can comment and request changes, but an
APPROVEreview is refused before it is sent. Approving is a person’s act - No GitHub App webhook. This surface never registers one, so there is no inbound URL to expose for PR comments. Other product webhooks (pipelines, ticket sync) are a separate, optional setup.
See also
Section titled “See also”- Talk to Control Center from a GitHub PR: the how-to for all of this
- Chat bridges: the same three decisions, made for chat
- Create the GitHub App: where an own-app bot identity comes from
- Multiplayer — identity, membership and presence: the principals and roles a login resolves through
- Guardrails: what the answering agent is allowed to do
- Use AI-powered review: the pipeline a mention or label starts