Fistron docs

fistron.io

Review pull and merge requests

Fistron reviews a pull request (GitHub) or merge request (GitLab) as a native review: its own findings on the lines of the diff they are about, each citing the report it comes from. Nothing reasons and no model is called for these findings: each is a reading of a report. When you turn it on, the comments of an AI review tool appear beside them, labelled as such. Fistron never approves a request.

You choose what the review does, in any combination and in every plan, Individual included:

The defaults are set in Repository settings, and each run may choose otherwise.

Review a request from the control plane

The project’s agent reviews a request without any change to your CI, also a request from a fork: it reads it through the platform with its read token, runs nothing of it, and keeps the review in the control plane until you publish it.

  1. Open the project’s Pull and merge requests page, tab Review a request (engineers), and enter the request’s URL, e.g. https://github.com/owner/name/pull/123. Choose what the review does, or leave each as As Repository settings say:
    • The team’s rules: At their levels, or Without the team’s rules;
    • AI review: with or without the model’s review;
    • The code explained: Not explained, An overview or Line by line, and its Depth. The model of the role explainer explains the change from Fistron’s evidence; each sentence is a comment you choose to publish or not.
  2. Click Review this request. The card follows the agent’s work request-review and says how many findings it found.
  3. The review appears in The results as not published. Open it to read its verdict, the findings, the AI review and what the agent could not read (for example a request’s CI it has no access to). The findings are a table: the finding, its level, its rule, where it comes from, where it is and its evidence. Sort it by a header, or choose a level or a rule above it; Export gives the rows shown as CSV or Markdown.
  4. To post it on the request, click Publish in its row or on its page. This needs the action review allowed for the repository in the agent’s configuration (Connect GitHub and GitLab); a review of another team’s repository stays in the control plane otherwise.
    • Under How it goes on the request, choose As Fistron’s review (posted at once with the agent’s write token, never an approval) or As my pending review. A pending review is seen only by the account of the agent’s write token, on GitHub or GitLab, which submits it there; Fistron never submits it. It needs a person’s token: with a GitHub App’s or a bot’s token nothing is written and the work says so.
    • The dialog lists every finding. To keep one off the request, tick Leave out next to it and write why, for example “the change only adds tests”.
    • An AI comment, also one Fištrónek’s chat kept, has Edit: change its words, and they go on the request instead; the record keeps who changed them. A Fistron finding stands on its evidence: leave it out instead.
    • Under The code explained, tick Publish next to each sentence of the explanation you want on the request, on its line. None goes there unless you tick it. The lines of a file in a language whose functions Fistron does not read (Ruby, for one) are explained as the file’s own. When no sentence of the model was kept, the section says so once, with each reason and how many sentences it left out.
    • Click Publish all findings. When you left some out, the button says how many it publishes, for example “Publish 2 of 3 findings”, and how many sentences of the explanation. For your pending review it says Make it my pending review; the review’s page then says whose pending review it is.
    • The review’s summary on the request says how many findings were left out. The review’s page in the control plane keeps them, marked “left out” with the reason and who left them out.
  5. Optional: Review the open requests every hour adds a schedule; each head of each open request is reviewed once, at most five a run.

What the agent’s review contains: the change’s assessment with the target branch’s change policy (whether it is written by AI, the intent review with the model of the role reasoner), the dependency check of the lock files it changes, the evidence of its CI where the project names it, and the AI review with the model of the role reviewer. Without a change policy on the target branch the review uses the defaults, with the AI review.

When the project has a test plan whose suite is in the request’s repository (the Test plan page, saved), the review also checks what the change does to the suite: steps no definition matches, a new feature in no run set, a renamed step whose features still use the old text, a tag nothing reads, a Then that asserts nothing, a fixed wait (suite-map.md).

The AI review follows the repository’s own rules: its AGENTS.md files and the files the change policy’s [review] rubric names (by default CONTRIBUTING.md, CODING_STANDARDS.md, .github/copilot-instructions.md), as the target branch has them. An observation that breaks one names the file and line of the rule (review.md).

When a check lacks a test’s result

A required check of the change’s assessment that no test result supports is a warning, “Required check CHK-01 lacks evidence”. When the review also checked the suite, the warning says which features to run on the request’s head, and the review’s page has Get the evidence:

Before you start (a review from your CI)

Review from Fistron’s CI templates

Fistron in your CI reviews the request after the change assessment, when you turn it on (Fistron in your CI). It makes the same review as the project’s agent, from the request’s URL through the platform’s API.

The templates of a self-managed GitLab, or set up by hand:

The templates allow the write path only the action review, only for the repository the job runs in. A review that fails never fails the job.

To build the review yourself in your own change job, use the commands below.

Configure the review

In Repository settings, the code review’s form sets these; the setting change-policy holds them as text:

# the setting change-policy (or .fistron/change-policy.toml until it is set)
[review]
enabled = true
publish = "review"            # review | comment | off
request_changes = false       # true: when the gate fails or a finding reaches the level
request_changes_level = "error"
max_inline_comments = 20
rubric = ["CONTRIBUTING.md", "CODING_STANDARDS.md", ".github/copilot-instructions.md"]

[review.ai]
enabled = false
tool = "pr-agent"
role = "reviewer"
block_on = []                 # categories of the AI review that may fail the review

Review a change

  1. Optionally, run the AI review on the change’s diff:

    fistron review ai --case <change-case> --change-policy .fistron/change-policy.toml \
      --config fistron.toml --output <change-case>
  2. Write the findings:

    fistron review findings --case <change-case> --assessment <report-dir>/report.json \
      --change-policy .fistron/change-policy.toml \
      --platform github --repository acme/shop --request 42 --head <sha> --output <dir>

    You get pr-review.json, review.md, review.sarif and review.rdjson.

  3. Publish it on the request:

    fistron review publish --record <dir>/pr-review.json --config fistron.toml
  4. Upload pr-review.json to the project (admin-repositories.md).

On a new push, Fistron keeps a finding’s comment that still stands instead of repeating it, and supersedes its earlier review.

The team’s rules

With the team’s rules of Repository settings (or, until they are set there, .fistron/review-rules.toml of the target branch, or the default rules), each finding names the team’s rule it is of, and the review’s page shows The team’s rules: the rules applied and the findings by rule. The results of Pull and merge requests says which rules the newest review applied. How to write the rules: review-rules.md.

What the findings say

From Findings
diff coverage uncovered_lines: changed lines no test executed
change assessment unexplained_change, check_failed, check_without_evidence
dependency check dependency_not_found, dependency_not_approved, dependency_risk
fix verification fix_not_reproduced
change risk change_risk for medium or high
the suite (test plan) undefined_step, ambiguous_step, step_text_unmatched, feature_in_no_run_set, then_without_assertion, fixed_sleep, tag_without_hook
your scanners sarif:<tool>/<rule>
the AI review pr-agent/<category>, pr-agent/security; support or fail nothing unless block_on names the category

A finding goes inline when all its lines are on the new side of the diff; the rest, and inline findings over the limit, go into the summary.

Read the reviews in the control plane

  1. Open the project’s Pull and merge requests page: The results is its first tab.

  2. Each request shows its newest review: its Verdict in one word (and the gate), the findings by level, with the AI review’s counted apart, what it was Published as (commented, changes requested, or not published) and when it was computed.

  3. Click the request to open its page, Review of the repository and the request’s number, under Pull and merge requests:

    • first the verdict in one word beside Fištrónek’s head: Changes required (an error, or a failed gate), Not fully reviewed (one of the team’s rules a model checks was not checked), Changes suggested, or Ready, in a sentence with What it would change (three things at most, or nothing and why) and Not checked; then the review in numbers in a tile (to fix before merging, with a ring of the findings by level, to consider, the AI review’s observations, the scenarios to run);
    • beside it What to do now: Publish the review to the request when it is not published yet, and The way to merging (reviewed by the team’s rules, the evidence, findings fixed, posted to the request, merged), with Get the evidence when a check lacks it;
    • the change and what the review was published as;
    • The code with its explanation, open, each finding beside its line, the explanation’s sentences one by one folded under it;
    • What to change: Fistron’s findings and the AI review’s in one list by level, each with where it comes from (From), its lines and its evidence;
    • What was checked, folded: the team’s rules, the AI review, what the review read; then the earlier reviews of the same request, the document as it was uploaded with its hash and its JSON.
    • Publish the review to the request asks for each sentence of the explanation whether to post it on the PR (on GitLab, the MR).

    Back to the reviews returns to the list. The review’s address stays the same; the document’s own page under Documents opens it with Open the review’s page.

Troubleshooting

You see Cause and fix
Nothing is posted The request’s head moved since the review, or the request is closed: review the new head.
A request for changes appears as a comment GitHub refuses requests for changes in some cases, for example on the token owner’s own pull request. The record notes it.
Fistron’s earlier request for changes stays On a protected branch whose dismissals are restricted, a person dismisses it.
ai-review.json says it was skipped The policy does not turn it on, no endpoint has the role reviewer, the data class does not allow the change, or pr-agent is not installed.
The AI review fails offline PR-Agent downloads a token-counting file on first use: prepare TIKTOKEN_CACHE_DIR.
“the head’s runs archived no test report Fistron reads” The request’s CI keeps its test reports in no artifact, or in one named unlike a test report: upload them as an artifact named like test-results, or name it in [acquisition.github]: junit_artifact for JUnit XML, test_reports ("<artifact>/<file>") for any report. On GitLab, a job’s artifacts:reports:junit gives the pipeline its test report.
No reviews in The results Review a request in the tab Review a request, or upload pr-review.json from the CI job to the project.
“The project’s agents do not run request-review yet.” Update the agent’s image to one with Fistron with ADR 0087.
The review work fails with “not on the allowlist” Add the repository to [acquisition.github] repositories of the agent’s configuration.
Publish fails The agent’s configuration does not allow the action review for the request’s repository, or the request moved on: review its new head.
The publish button stays disabled in the dialog A finding you left out has no reason yet, or a comment you edited has no words.
“a pending review is seen and submitted only by its author” The agent’s write token is a GitHub App’s or a bot’s: nobody could submit its pending review. Publish it as Fistron’s review, or give the write path a token of your own.
“has a pending review of the pull request already” GitHub keeps one pending review a person: submit or delete the earlier one on GitHub first.
A finding left out still shows on GitHub That head was published already: GitHub gets one review per head, so delete or hide the comment there. On GitLab, the left-out finding’s thread from an earlier review is resolved.

Details: review.md.