Fistron docs

fistron.io

Set up verifying code written with AI

For teams that merge code written by assistants and agents: every change passes an evidence gate. Does it do what was asked, do the tests really check it, would they fail without it, are its new dependencies real?

State today. The checks of a change and the evidence gate on pull and merge requests work today; stricter rules for AI-written changes are set by your policy. Broader validation continues.

See it

Fistron’s review of a pull request: the findings by level and by rule, each with its evidence.

The review of a synthetic pull request (the demo’s document). The same in the dark theme and on a phone. Taken from Fistron’s GUI at its release, never drawn.

You do Fistron does You get
Let Fistron review your pull and merge requests. Fistron checks each change with evidence: tests, coverage of the changed lines, scanners, the AI review, each finding with its file and line. A review that says what is not proven, before a person approves the change.

The setup’s checklist

The same checklist, with each step’s state for your project and the page that does it, is on the project’s page Solutions.

  1. Connect an agent. The agent reads your CI, repositories and environments inside your network. See Use the hosted control plane with your own agent.
  2. Let the agent read your repositories. A change’s review and the change policy read the repository. See Connect GitHub and GitLab.
  3. Choose the reviewer’s model. The review of a change reads its diff with the model your policy allows. See Configure models (LLM endpoints).
  4. Merge the change policy. The evidence each change must bring, on your default branch.
  5. Add Fistron to your CI. Each pull or merge request reviewed and each failed build analysed in your own pipeline, automatically; one pull request sets it up. See Fistron in your CI.

What you need

Steps

  1. Set the change policy: the repository’s setting change-policy on Repository settings in Fistron, never a file the change itself can edit. Let Fistron propose it first: on the project’s Pull and merge requests page, tab Review a request, under Propose a change policy, enter the Repository and click Propose a change policy (or start propose-change-policy on Work, or fistron propose change-policy). The agent reads the repository with its platform access. The proposal says, by rules and with the reason of each value:

    • the gate in report mode;
    • the signals the repository’s newest commits and labels use;
    • coverage when a CI history has per-test coverage;
    • dependencies when the repository has a lock file;
    • the review rubric files it has.

    A policy set already is kept, and only the sections it lacks are added. A manager confirms it under Proposed changes of Repository settings, then edits it there as needed. By hand, name how an AI-written change is recognised (only explicit signals: commit trailers, bot accounts, labels) and what it requires:

    version = 1
    
    [ai]
    trailers = ["co-authored-by: example agent *"]
    authors = ["example-agent*"]
    labels = ["ai-*"]
    
    [ai.requires]
    coverage = true       # every changed line executed
    confirmation = true   # supported checks confirmed by a second model
    intent_review = true  # every part of the diff explained by the stated intent
    reproduction = true   # a fix's test fails on the base and passes on the head
    dependencies = true   # new packages exist, are not confused, are approved
    
    [gate]
    mode = "block"        # "report" first, to see what it would block
    checks = true
    unknown = "fail"

    Every option: change-assessment.md.

  2. Make the gate a required check. Run the change assessment with --gate in the request’s own pipeline and require the job (GitLab: “Pipelines must succeed”; GitHub: a required status check). Run the blocking job with plain rules and no model key, because the change’s code can read the job’s secrets (ci-job.md).

  3. Give the change’s own evidence. In the request’s test job, produce fistron verify-fix, fistron dependencies check and your security scanners’ SARIF reports, and upload them as an artifact that change_artifact names.

  4. Choose a different verifier. In the agent’s or job’s configuration, set the roles reasoner, judge and reviewer to an endpoint other than the model that writes your code, or keep plain rules (Configure models (LLM endpoints)).

  5. Publish the result on the request. Have the agent review requests and publish the review with its findings on the diff’s lines (Review pull and merge requests).

Start with mode = "report" for a few weeks, read what it would have blocked, then switch to block.

Check

Next

The assessment of a change and its risk: Assess a change and read its risk.