Repository navigation
docs(legal): say what review agents keep and send - #44
Merged
kalaspuff merged 1 commit intoOct 22, 2026
Merged
Conversation
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):   **On, with its reviews** (light, dark, 390 px phone):    **Settings** (owners), and **Review a pull request**:   **A review session**: it says what came of the review instead of offering a composer, with the review in the rail (light, dark):   **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:   ## 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
approved these changes
Oct 22, 2026
kalaspuff
deleted the
fctl/148-i-want-to-have-the-possibility-of-having
branch
October 22, 2026 23:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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