Fistron docs

fistron.io

Run the local UI

The local UI (fistron ui) gives one person what the CLI does, in a browser, on their own machine. It works over a workspace: a directory with the configuration, the cases and the documents Fistron writes.

Before you start

Install and start

  1. Install Fistron’s command line (Install Fistron for your plan):

    curl -fsSL https://get.fistron.io | sh
  2. Start the UI with a workspace:

    fistron ui --workspace ~/fistron-data

    A token in the environment (export FISTRON_GITHUB_TOKEN=...) wins over the one kept in Setup; a CI job gives its own that way.

  3. Open the printed URL once. It carries this run’s token; the browser then keeps a cookie. A restart makes a new token.

The UI binds to 127.0.0.1:8740 by default. Use --port or [ui] port for another port.

In a container, publish the port on the host’s loopback only:

podman run --rm -it --read-only --userns=keep-id \
  -v ~/fistron-data:/workspace:Z -p 127.0.0.1:8740:8740 \
  -e FISTRON_GITHUB_TOKEN ghcr.io/fistron-io/fistron:<version> fistron ui

For a virtual machine with Podman and systemd, see install.md.

Where it is and what it keeps

Keep it running

fistron ui runs while its terminal is open. On Linux, to keep it running after you log out, run it as a systemd service of your user:

mkdir -p ~/.config/systemd/user ~/fistron-data
cat > ~/.config/systemd/user/fistron-local-ui.service <<'EOF'
[Unit]
Description=Fistron's local UI

[Service]
ExecStart=%h/.local/bin/fistron ui --workspace %h/fistron-data
Restart=on-failure

[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now fistron-local-ui
loginctl enable-linger "$USER"                                        # after logout too
journalctl --user -u fistron-local-ui | grep 'Fistron UI:' | tail -1  # the URL with this start's token

Each start makes a new token: after a restart, open the newest URL of the journal. To run the image instead of the command line, the installer sets the service up for you (curl -fsSL https://get.fistron.io | sh -s -- ui, install-local.md).

Get started, step by step

On the first start, with nothing set yet, the UI opens Get started by itself (once a browser session; the Overview is reached again after). It leads through five steps, each with what it sets and what it unlocks, and opens the page that sets it. Above them, Ready for review is offered with nothing set: it checks a change in your working copy without a platform, a token or a model (Ready for review). The steps:

  1. your platform, a first repository and your model (Setup, which writes fistron.toml for you and keeps the tokens on this machine);
  2. why your last run failed, Fistron’s first answer about your own work (ADR 0153 part C), in the step itself:
    • Fistron looks, read-only, for your newest failed CI job in the repositories fistron.toml reads: the newest run you started yourself (GitHub Actions or GitLab CI) in the last 30 days, else the newest of anyone’s there, and says which. Bots’ workflows (a labeler, a dependency bot) are left out. A GitHub App’s token has no user, so with one it is the newest of anyone’s.
    • Click Find out why. Fistron analyses the job as analyze does (with your model when you set one, else its rules) and shows Why it failed, What to do and where the answer comes from, with Show the evidence. Nothing is changed: you decide. Open the whole analysis opens its run with the full report.
    • With no failed run, the step says so; any failed job is analysed by its link on analyze (use-analyze-failure.md);
  3. your repositories and their CI, optional, in the step itself:
    • Find your repositories: choose the Platform and click Find the repositories. Fistron lists what your token may read (on GitLab, the projects you are a member of); those Fistron reads already are ticked. Tick the others it should read and click Check with their count, then Confirm and write: they are written to fistron.toml.
    • Find your repositories’ CI: click Find the CI. For each repository, its GitHub workflows (the main one ticked), its GitLab pipeline’s jobs and the Jenkins jobs named after it; change the ticks and click Keep the CI of with the count. The operations’ forms then offer your repositories, and the named repository’s workflows and jobs;
  4. what Fistron may do (Settings), optional;
  5. your repositories’ settings (Repository settings), optional.

Next step and Back move between the steps; Check again reads where the setup stands after you set something. You can leave and come back; every page is also in the navigation, to set at any time.

Set a repository up

  1. Open Setup. The wizard has these steps:
    • Repository: the Platform (GitHub or GitLab), the API base URL or GitLab URL, the Repository and the Variable with the read token; give The read token and click Keep FISTRON_GITHUB_TOKEN on this machine (the variable’s name as you set it);
    • LLM: tick Use an LLM endpoint (OpenAI-compatible); the rules reasoner needs none, then the Base URL, Model, Variable with its API key (and The API key, kept the same way) and Data class the endpoint may receive;
    • Pull or merge requests: tick Let Fistron open pull or merge requests (its setup), then the Variable with the write token (and The write token, kept the same way) and the Level (propose, decide or merge);
    • Check and write.
  2. In Check and write, click Check and preview. Fistron checks the tokens from the server’s environment and sends the LLM endpoint one fixed request. It shows the checks, what changes and the file’s diff. Nothing is written yet.
  3. Click Confirm and write. The old file is kept as fistron.toml.<UTC time>.bak.
  4. If you allowed pull or merge requests, the Setup pull request step follows: enter the Workflows whose runs Fistron reads (GitHub) and click Propose the setup (admin-repositories.md).

A token or key you keep is written to ~/.config/fistron/secrets.toml ($XDG_CONFIG_HOME/fistron, or the directory FISTRON_CONFIG_DIR names), readable by you alone, never in a repository and never shown again; every fistron command and the UI’s runs take it. A file other users may read is refused: chmod 600 it.

The same steps on the command line: fistron init (setup.md).

Change levels of autonomy

  1. Open Settings.
  2. For each group of repositories and each action, choose a level: off (refused), propose, decide or merge. You can also change the Port of fistron ui.
  3. Click Preview the change. The preview lists the checks, what changes, and under More autonomy the actions whose level rises.
  4. Click Confirm and write.

A level rises only when the group’s write token passes its check. Repositories, token variables, URLs and the UI’s address are changed in the file, not in Settings.

Under Where data may go you set the jurisdictions data may go to, the origins a model may have, and for each host and model where it is and under whose law; previewed and written the same way. With them set, Fistron refuses any other contact before it is made, and every run’s ledger in Documents says where its data went (Set up sovereignty).

Check the licence

With Fistron’s closed core installed, Settings shows under Licence:

An operation the plan does not include is shown as “not in your plan” under Operations, and its Run is disabled with the reason. For more, ask Fistron for a licence that includes it; fistron licence says the same on the command line. Without the core, open Fistron runs without a licence and the core’s operations are not offered.

Under Your licences, Settings lists the licences you hold (your own and your organisation’s), each with its plan, licensee, expiry, where it came from and whether it is used, and says which one applies to the working copy the UI was started in, and why. On your organisation’s code it names its models, its settings and its data-flow policy, and where your runs go; Keep my runs on this organisation’s code on this machine keeps them here, as fistron licence runs off does (Your licences).

Decide Fistron’s proposals

What Fistron proposes of a setting (the flaky quarantine, the Suite Health’s tests to review, the quality goals, a change policy, review rules, the test tiers) waits in Fistron, never in a pull or merge request.

  1. Open Proposals. Under Proposed changes each proposal shows the setting as proposed and as it is now, who proposed it and why.
  2. Optionally write a Note on why.
  3. Click Confirm to keep it as the setting (a new version, checked as Fistron reads it), or Reject to leave the setting as it is.

The same list is on Repository settings (Set your repositories’ settings), and fistron settings proposals does it on the command line.

Other views

View Use
Overview the version, the workspace and its documents; Assess a change links to assess-change
Fištrónek recommendations, the status report and the conversation (Status report, recommendations and quality goals, Ask Fištrónek)
Documents every Fistron document of the workspace, each in its own view
Operations what Fistron can run; open one, fill its form, click Run (“not in your plan”: the licence does not include it)
Why your last run failed your newest failed CI job and, on Find out why, why it failed: the same as Get started’s step, without the steps
Model endpoints this machine’s models: each endpoint with the variable of its key and the roles it serves, Test the endpoint, and your budget for Fistron; every change previewed with one short call (Configure models (LLM endpoints))
Runs this server’s runs; open one to follow it, Cancel while it runs; Model calls says what its model calls used (tokens, cached tokens, cost) against the whole case pasted into a model

The masthead switches the theme: light, dark (a deep blue, with green for the main action and the links), dark with high contrast, or the system’s. The masthead keeps one line: when the window is short of room, its motto goes first, then the theme becomes one list, your name shortens (whole when you point at it), Report a problem keeps its icon alone and the project’s name shortens.

What the status icons say

Every result, check, run and build shows its state with an icon and its words, the same in the local UI and the control plane. In a table read at a glance (the causes of Investigate a failed build) a row shows the icon alone: its words are on hover and for a screen reader. The shape says the state, so it reads without colour:

Icon State
green box with a tick passed, met, succeeded
red box with an X failed, not met
half red, half green gremlin (Flaky) flaky
yellow box with stripes quarantined
outline with a turning arc running
outline with three dots pending, queued, not run yet
grey box with a dash skipped, cancelled, not a test
dashed outline with a dot manual, not observable: a person decides
amber box with “!” a warning: waived, missing evidence, needs input, partly done

Only the states that can still change on their own move (running, pending, flaky, quarantined); with reduced motion set in your system nothing moves. Fištrónek’s poses illustrate a page (at the desk on Overview, cooking in Get started, reading the morning paper beside the Daily CI review, chasing Flaky on the flaky tests, with a red pen beside the reviews, holding the remote beside the agents); a result is always its icon and words. The same moments look the same on every page: he looks into an empty box when there is nothing yet, turns an hourglass on a work’s own page while it runs, holds the map upside down on a page that is not there, takes a megaphone when you report a problem, and juggles checkboxes when everything passed. On the page where you started a work (an investigation, the reading of an issue, a request’s review, an audit) he paces beside the spinner and looks at his watch while it runs, with its step now and when it should end; when it ends, its result takes his place. Beside “Available now” he has his coffee, beside “In development” he is at work; the status icon beside the words stays. With reduced motion set, he stands still.

What each message is

What Fistron tells you on a page (the notes of an investigation or a review, a work’s warnings, what an agent could not read) is one of six kinds. Each has its colour on the left edge, its icon and its word before the text, so it reads without colour too:

Word Colour and icon What it is
Note blue, “i” something to know
Question for you teal, “?” the work waits for your answer
Warning amber, triangle something was not read, not run or not verified: the result may lack it
Error red, “!” something failed: a refused read, a host not reachable; it says the fix
Done green, tick verified, confirmed, saved
Tip amber, dashed edge, light bulb what you can do next

Fištrónek stands beside the first message of each kind (not beside a note): he tilts his head at a question, shouts into his megaphone at a warning, drops his map at an error, juggles when it is done and has an idea at a tip. Point at him for his line. With reduced motion set, he stands still.

Troubleshooting

You see Cause and fix
Every request answers 400 The UI is reached under a name or port it does not know. Publish the same port on both sides, or add --allowed-host 127.0.0.1:<port> (or [ui] allowed_hosts).
Read only here on Setup or Settings Only the browser on this machine’s loopback may change the configuration. In a container, add the address the page names to [ui] settings_from.
A page says how to build the frontend You started a checkout without a build; install a release’s wheel or the image.
A path is refused (422) Every path of a run must stay inside the workspace.
An operation “runs in a CI job, not from the UI” Operations tagged ci (for example ci) run only in CI.
fistron: command not found ~/.local/bin is not on your PATH: add export PATH="$HOME/.local/bin:$PATH" to your shell’s profile and open a new shell.
The printed URL is refused after a while The UI was started again and made a new token: open the newest URL it printed (with a service, the newest Fistron UI: line of its journal).
Your runs and documents are not listed The UI was started over another workspace: start it with the same --workspace.
A warning about binding to 0.0.0.0 The API is reachable from the network: publish the port on the loopback only.

Details: ui.md, install.md, setup.md.