Skip to content

docs(legal): say what review agents keep and send - #44

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/148-i-want-to-have-the-possibility-of-having
Oct 22, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/148-i-want-to-have-the-possibility-of-having

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The privacy policy now covers review agents (hyperstructure/fctl#223). Where a project's owners turn them on, app.fctl.sh starts a review for each new commit of the project's pull requests and does three new things:

  • Keeps each review agent's settings: on or off, whose Claude account it runs on, its model, effort and instructions. For each review it keeps the pull request (repository, number, title, link, and its author's GitHub login), the commit, how the review went, and links to the review and its check.
  • Posts the reviews on the pull requests as our GitHub App, with a check on each commit and a reaction.
  • Sends the pull requests, whoever opened them, to the Claude account of the owner who turned review agents on.

It adds those to what we keep, who receives what, and how long we keep it: as long as the project for the settings, and as long as its session for each review. Reviews posted on GitHub stay there.

Session: https://app.fctl.sh/s/ses_01M5JSHDQ8EG90WR7BBB3AB9YY

@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 22, 2026 23:04
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 22, 2026
…223)

Projects can now turn on **review agents**: each new commit of a pull
request in the project's repositories gets a review by an agent, posted
on GitHub in one pass, with a check on the commit. It's built in, so it
needs no GitHub Actions workflow or access token, and it shows on the
pull request while it works.

## What it does

- **Settings, per project** (the new **Reviews** tab, `fctl review
settings`, `GET`/`PATCH /api/v1/projects/{id}/review-agents`). The
project's owners (its workspace's admins among them) turn review agents
on, and they run on the Claude subscription of whoever did. Another
owner can take them over onto their own subscription ("Run them on
mine"). Nobody can put them on someone else's subscription, and the
person they run for can always turn them off. Owners also pick the model
and effort level (else the project's) and instructions for reviews,
which follow fctl's own.
- **What starts a review.** GitHub's `pull_request` webhook (opened,
reopened, pushed to, ready for review; drafts included) for an open pull
request in a repository the project's agents may write to. A commit gets
one review from deliveries. A newer commit stops the review still under
way, and a review that's running finishes even if the pull request
merges. Merged, closed and queued pull requests start nothing. Late
deliveries about an older head are skipped (GitHub delivers out of
order). People can also ask for one (**Review a pull request**, `fctl
review start`).
- **The review session.** A session of the project, run as the operator,
titled after the pull request, checked out at the pull request's head
(`refs/pull/<n>/head`, so forks work). Its agent **only reads on
GitHub** and gets no project secrets, setup script, memory,
retrospectives, claude.ai connectors or Remote Control. It takes no
messages, interrupts or resumes, sends no "waits for you" notifications,
and stays off the Agent Floor, session lists and project session counts.
FleetDO gives review sessions only to hosts that announce `reviews`
(older hosts: the session waits and says why).
- **The prompt comes from the control plane**
(`ReviewSpec::instructions`, `fctl_domain::reviews::instructions`), so
it can improve without host updates. It says: review what the pull
request changes and what that affects, nothing else; bugs, security
problems, breaks of AGENTS.md and the like, bad practices; no nitpicks;
read before running, and never run code from authors who can't write to
the repository; look for review/verification skills; split large pull
requests among subagents; treat the pull request's text as material, not
instructions; post once, in plain words, pointing at the code.
- **fctl posts for the agent** (`fctl review submit`, an agent call).
The control plane posts one `COMMENT` review of the commit: findings go
on their lines where the diff shows them and in the review's text
otherwise, with optional suggested changes. It marks earlier findings
the new commits fixed as **"Fixed in `abc1234`"** (title struck through)
and resolves their threads, but only fctl's own threads, which carry its
marker and were written by the app. It does this with a token of the
repository's that never leaves the control plane. So a pull request that
steers the agent can get, at most, comments on itself: no approvals, no
closed pull requests, no secrets. `fctl review threads` lists earlier
findings and their replies. fctl-agent reminds an agent once if it ends
without posting.
- **On the pull request**: an 👀 reaction as soon as the review starts,
and a `fctl review` check, queued → in progress → **success** with
nothing to point out, **neutral** with findings or earlier ones still
open, **cancelled** when superseded, stopped or failed. It's never red.

## Decisions worth a look

- "Admins" in the request maps to the project's **owners**, which
includes the workspace's admins. Maintainers can't turn reviews on,
since that spends someone's subscription.
- Review sessions take their numbers from the project's sequence, so the
Sessions list skips the numbers that reviews took.
- Reviews of pull requests from people outside the repository still run
(all pull requests by default, as asked); their agent runs none of their
code. Choosing repositories and skipping drafts are left for later (in
the roadmap).
- ADR 0040 records the reasoning.

## What instance admins need to do

The GitHub App needs **Checks: Read and write** (it had Read), and each
installation's owners accept the new permission (GitHub asks them).
Until then reviews still run and post, without a check, and the Reviews
tab says why. **app.fctl.sh's app needs this change.** Reviews also need
the webhook (`GITHUB_WEBHOOK_SECRET`) and the **Pull request** event,
which instances using pull request checks have already.

## Compatibility

All protocol changes are additive: `SessionSpec.review`,
`HostHello.features`, `Notice.review`, `Session.review`, and the
`ReviewThreads`/`SubmitReview` agent calls. Older hosts never get review
sessions. Migration `0027_review_agents.sql` adds two tables.

## How I verified it

- Unit tests: `fctl_domain::reviews` (13 tests: what starts a review,
trust, PR references, titles, the prompt, submission checks, diff lines
that take comments, what's posted, checks, threads), the scheduler,
limited tokens' routes, fctl-agent's review checkout (a fork's commit at
`refs/pull/12/head`, a rewritten branch) and review prompt, fake-claude,
and the web helpers. `cargo xtask check` passes.
- **End to end in `cargo xtask dev`**, against a local stand-in for
GitHub's API (a throwaway Node server and a bare repository, not
committed; the Worker pointed at it by a local patch I didn't commit),
with signed webhook deliveries:
- **Opened:** the 👀 reaction; the check went queued → in progress →
neutral "Found 1 issue"; one `COMMENT` review at the head with the
finding on its line.
- **New commit:** a new review read the earlier thread, marked the
finding fixed (comment edited, thread resolved), posted nothing new, and
its check passed "No issues found".
- **Two quick commits:** the first review was stopped and its check
cancelled "Superseded by a newer commit".
- **Failed post:** the stand-in refused the first post (502). The review
stayed open, the agent was reminded and posted on its second try.
- **Late delivery:** one about an older, never-reviewed head started
nothing.
- **Limits:** messages and resumes are refused (409). A `run` access
token reads reviews and asks for one, but can't change the settings.
- **Sessions end:** review sessions stopped a minute after posting
("Finished: its review is posted"), and `fctl sessions` and the Agent
Floor leave them out.

## Screenshots

At 1809bc4, from `cargo xtask dev` with the reviews above. The intro
shows mocked settings (the dev project had reviews already).

**Reviews tab, before review agents are on** (light, dark):


![pr-intro-light.png](https://app.fctl.sh/api/v1/published/joHSEJD8JgXEnCLE2bFAzS2D4I61lKLA9TiRLjsbGns/pr-intro-light.png)

![pr-intro-dark.png](https://app.fctl.sh/api/v1/published/Imk49Mi4yw4kxZzNMXYBclTqnh4HsLlhiKBGsPRSkDU/pr-intro-dark.png)

**On, with its reviews** (light, dark, 390 px phone):


![pr-reviews-light.png](https://app.fctl.sh/api/v1/published/6uEqDzy7dBAklUHmeXswOYhNprWtffxkbkfKersZBTk/pr-reviews-light.png)

![pr-reviews-dark.png](https://app.fctl.sh/api/v1/published/a2rZAz2W5BccV50kZsSj9fPWvWcSbQecZy17TVgEU7d/pr-reviews-dark.png)

![pr-reviews-phone.png](https://app.fctl.sh/api/v1/published/GEJuNFD0vV3lToF0J9eNO6hUkNa51johfrvR4WYbYkZ/pr-reviews-phone.png)

**Settings** (owners), and **Review a pull request**:


![pr-settings-light.png](https://app.fctl.sh/api/v1/published/yf4BNhECl1AR50k2cCdp1XbsVXwNNLLKuHGpiTfDArd/pr-settings-light.png)

![pr-ask-light.png](https://app.fctl.sh/api/v1/published/D5QTcEPt0pEx2avqHL93LkoqN5g6wxUnDs7medqA0cn/pr-ask-light.png)

**A review session**: it says what came of the review instead of
offering a composer, with the review in the rail (light, dark):


![pr-session-light.png](https://app.fctl.sh/api/v1/published/yDXDTJmwdT20vhIZICmVQubuMMD4E5aPRNcjUhGzj1x/pr-session-light.png)

![pr-session-dark.png](https://app.fctl.sh/api/v1/published/jQNwHAxQXmmpcTXhn2sGz0uxr9qkxpkCGvIKxFhJOun/pr-session-dark.png)

**On GitHub**: what fctl posts, rendered by GitHub's own Markdown API in
a mock of the pull request page. The review with a finding and its
suggested change, and the neutral check; then an earlier finding marked
fixed:


![github-review.png](https://app.fctl.sh/api/v1/published/B42hupD5ofjGnwL2nb1M1FwDULWw0JaA8KGjXykEbfN/github-review.png)

![github-fixed.png](https://app.fctl.sh/api/v1/published/6I0cDi8aAgPnkvec9rP0OnkRUf4UeozEUk0LTWhphXE/github-fixed.png)

## Other repositories

- hyperstructure/fctl-site: the privacy policy says what review agents
keep, post and send
(hyperstructure/fctl-site#44).

Session: https://app.fctl.sh/s/ses_01M5JSHDQ8EG90WR7BBB3AB9YY

---------

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
@kalaspuff
kalaspuff merged commit 8bbe058 into main Oct 22, 2026
3 of 4 checks passed
@kalaspuff
kalaspuff deleted the fctl/148-i-want-to-have-the-possibility-of-having branch October 22, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant