Skip to content

docs(legal): cover review summaries in pull request descriptions - #91

Merged
kalaspuff merged 2 commits into
mainfrom
fctl/507-when-configuring-review-agents-for-a-pro
Oct 29, 2026
Merged

kalaspuff merged 2 commits into
mainfrom
fctl/507-when-configuring-review-agents-for-a-pro

Conversation

@fctl-sh

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

Copy link
Copy Markdown
Contributor

Summary

The privacy policy now says what app.fctl.sh keeps and posts when a project's review agents sum pull requests up in their descriptions, a new setting in hyperstructure/fctl: whether the setting is on, the summary each review put in the description (how risky the pull request looked, why, what it does and what deserved a closer look), and that review agents may write that summary at the end of a pull request's description on GitHub. Merge it with the fctl change; the updated date is already today's.

fctl session

@fctl-review

fctl-review Bot commented Oct 29, 2026

Copy link
Copy Markdown

fctl reviewed 9cb87d6 and found 1 issue.

On lines the diff doesn't show:

  • Retention doesn't cover the summary in the description · Low severity · legal/privacy.md lines 515–516: The retention entry for review agents says only that "Reviews posted on GitHub stay there". The new summary is written into the pull request's description rather than posted as a review, so the policy doesn't say that it, too, stays on GitHub after the session or project is deleted.

Reviewed by fctl · Review agent settings

@fctl-sh

fctl-sh Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 6d81a15: the retention entry for review agents now says that each review's summary is kept as long as its session, and that summaries in pull requests' descriptions stay on GitHub, with the description's edit history, until someone edits or deletes them, as reviews posted there do.

@fctl-sh fctl-sh Bot changed the title docs(legal): say review agents may sum pull requests up in their descriptions docs(legal): cover review summaries in pull request descriptions Oct 29, 2026
@kalaspuff
kalaspuff merged commit d69feb0 into main Oct 29, 2026
4 of 5 checks passed
@kalaspuff
kalaspuff deleted the fctl/507-when-configuring-review-agents-for-a-pro branch October 29, 2026 19:07
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 29, 2026
)

## Summary

A project's owners can now have its review agents sum each pull request
up at the end of its description before they review it in depth: how
risky what it sets out to do looks, what it does, and what deserves a
closer look. It's a new review agent setting, off by default: Reviews →
Settings → **Summary in the description**, `fctl review settings
--description-summary on`, or `description_summary` in the API. The
agent judges the risk from what the change does and where, not from bugs
it may find later. The note is a GitHub alert: a note at low and medium
risk, a warning at high risk, and a caution when a serious security
problem shows at first sight.

The review agent still only reads on GitHub. It hands its summary to the
control plane with a new in-sandbox command, `fctl review summarize
summary.json`, and the control plane writes the description. The control
plane reads the description just before writing it and replaces only
what lies between `<!-- FCTL_REVIEW_SUMMARY -->` and `<!--
/FCTL_REVIEW_SUMMARY -->` (each on a line of its own), or adds the
section at the end after a blank line. Marks inside code blocks, or
within a line, stay as text, and a code block the description leaves
open is closed first. Each new review replaces the summary. When a
review posts, fctl puts its summary back if something removed or changed
it meanwhile, since fctl's own agents rewrite their descriptions as they
push; those agents are now also told to keep that part. Reviews keep
their summary too: the Reviews tab shows each review's risk, and a
review session's page shows the summary in its transcript and its risk
in the rail. [ADR
0067](docs/adr/0067-review-agents-sum-pull-requests-up-in-their-descriptions.md)
records the design.

I verified it with unit tests for the splicing (code blocks, CRLF line
endings, missing and duplicate marks, an unclosed fence), the checks on
the agent's text and the layout, and with GitHub's Markdown API, which
renders the section as intended. In `cargo xtask dev`, the setting
round-trips through the CLI and API, and `fctl review summarize` gets
its answers from fctl-agent and the control plane up to the GitHub call.
The dev stack has no GitHub App, so the description edit itself hasn't
run against GitHub yet. `cargo xtask check lint`, `test` and `web` pass.
Deploying applies D1 migration 0040. A host from before this change runs
an fctl-agent that refuses the new call; its review agents are told to
carry on, so their reviews get no summary until the host updates.

## What it adds to a description

An example, as GitHub renders it (the real one also links the review
session, the commit and the settings):

---

> [!NOTE]
> **Medium risk.** It changes how the upload worker retries, which every
sync goes through, though only for uploads that fail.
>
> **What it does.** Makes the upload worker give up after five failed
attempts and wait longer between them, so that a server that stays down
no longer keeps the worker busy for good.
>
> **Config rename.** `retry_ms` becomes `retry_delay_ms`, and existing
configs keep working through an alias.
>
> <sub>fctl review's first look at `3f2a1c9` · 3 files, +120 −4 · Review
agent settings</sub>

## Screenshots

At 7a26dc1, in `cargo xtask dev` with the review agents' settings,
reviews and a review's transcript staged (the dev stack has no GitHub
App). The settings with the summary turned on, which shows what it adds:


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

The Reviews tab: the status says so, and each review shows the risk it
saw (amber when high, red only when critical):


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

A review session's page, light and dark: the summary in the transcript
as it reads on GitHub, and the first look in the rail:


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


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

At a phone's width (390 px):

<img
src="https://app.fctl.sh/api/v1/published/DrzFf6OOyyXEOZO4airrNGF9r8wiLBlJeaLctUBUeSM/session-light-390.png"
alt="The review session's transcript at a phone's width" width="390">

## Related

- hyperstructure/fctl-site#91

## Worth confirming

- **Decision:** It's off by default, for new projects and existing ones:
it edits descriptions that other people own, so owners turn it on.
- **Decision:** The note has a look of its own, as you asked: "**Medium
risk.**", "**What it does.**" and the highlight's topic lead their
paragraphs in bold, as in fctl's findings, rather than "Medium Risk" and
"Overview" on lines of their own. A last line fctl writes itself says
which commit it describes, the files and lines changed, and links the
review and its settings.
- **Decision:** A Markdown parser (pulldown-cmark) reads the agent's
text as GitHub will, and only text, inline code and emphasis pass.
Lists, headings, code blocks, tables, images, HTML, links (link
definitions and bare addresses included), @-mentions and email addresses
are refused; GitHub's own references such as #12 still link. The summary
is kept short: a paragraph for the risk, two at most for what it does,
and an optional highlight. That way it reads at a glance, can't break
out of its note, and a pull request that steers the agent can't have
fctl link people elsewhere or notify them from the description.
- **Decision:** Every review rewrites the summary, a review someone asks
for again on the same commit included. A summary someone deletes comes
back when the review posts and with the next commit's review; to stop
it, owners turn the setting off.
- **Assumption:** "Update the existing one if there's been new comments
since the last review" meant new commits. Reviews run for each new
commit (or when someone asks), and only a review refreshes the summary;
new comments alone don't.

[fctl session](https://app.fctl.sh/s/ses_01M648ZXW9H2DW0A36A3AQSE10)

---------

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
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