Ready for review
Before you push, see your change as its review will see it, and fix what the review would ask for while it is still on your machine. Fistron brings together what a reviewer of the change will see (ADR 0153 parts A and B):
- your change explained, from Fistron’s evidence and, with a model of
the role
explainer, in words; - the review by your team’s code review rules and Fistron’s evidence, as your pull or merge request’s review would make it;
- the AI review of the role
reviewer; - the change’s risk (the closed core’s, Fistron Team and above);
- the tests your change needs: each required check with the tests mapped to it, and what is missing;
- the known flaky tests among your change’s tests, noise to expect;
- what a reviewer will likely ask, each question with the evidence that answers it.
Each part says where it comes from: From Fistron’s evidence, Fistron’s
rules on the evidence, or A model’s words with the model. Nothing is
posted and nothing goes to your platform: the documents go to your
private space (ready/<head> in it,
Become a developer), never into the
repository.
In the local UI
- Open Ready for review (under Control and changes).
- Fill in:
- Working copy: the directory of your checkout, anywhere on your machine;
- The branch it goes to: empty for your remote’s default branch
(
origin/HEAD, such asorigin/master), else the branch your request goes to; the change is compared with where your branch left it; - What you were asked to do: optional, the change’s why;
- Your tests’ results and Per-test coverage: optional, files in your working copy (below).
- Leave Ask my models (explainer, reviewer, reasoner) where I set them and Run the team’s tools over the changed files on, or turn them off for a quick look.
- Click Check my change. It takes a minute or two with a model.
The answer says Ready for review when no finding of the review would ask for changes, else Not yet ready for review with what is left. When something is worth a second look, it says so and names it, for example Ready for review, but without test evidence when no test result or coverage ties a test to your change. Then each part, its findings marked Asks for changes, Look twice or Note. Show the code with its notes under Your change explained shows your change as its code, the explanation beside its lines. A part that could not be made says why (no model of the role, the closed core not installed, no flaky quarantine record). Open its run shows the run with its result. Share it gives the result as text for your request or a colleague, with Checked by you when you tick I checked it (use-my-growth.md). Each check is kept in your history on this machine for My growth.
In the terminal
In your working copy, with nothing set up (no platform, no token, no model):
fistron ready
More:
fistron ready --config fistron.toml # against the remote's default branch
fistron ready --base origin/release-2 # against another
fistron ready --quick # no model, no tool: the verdict and what is left
fistron ready --quarantine flaky/quarantine.json --suite-map shop
fistron ready --json # the record ready_for_review
Give it your tests’ results
The tests your change needs lists each required check with the tests that cover it. Without your tests’ results, it can only say that results are missing. Give them, and Fistron names the tests that ran your changed lines and the changed lines no test ran. Fistron never reads what a test asserts, so a check is never met by coverage alone: what your tests assert is yours to check.
With pytest:
pip install pytest-cov
pytest --cov --cov-context=test --junitxml=junit.xml
coverage json --show-contexts -o coverage-contexts.json
fistron ready --junit junit.xml --test-coverage coverage-contexts.json
--junit takes any JUnit XML (Maven Surefire, Gradle, Go’s gotestsum) and
can be given more than once. In the local UI, give the same files in
Your tests’ results and Per-test coverage. A relative path is in
your working copy. Files git does not track that look generated
(junit.xml, .coverage, __pycache__/, build/) or are binary are
left out of your change, and the notes say which; a .gitignore keeps
them out of your status.
In a CI job (CI, GITHUB_ACTIONS, GITLAB_CI or JENKINS_URL set),
nothing is kept in a private space, because a runner is shared. The
documents are removed when the job ends; --output <dir> keeps them where
you say.
In a control plane
Ready for review runs on your machine, where your change is. To keep its result in your control plane, for example to read it again on another computer, save it in your own private space there:
export FISTRON_CONTROL_PLANE_TOKEN=fcp_... # your personal token (API tokens)
fistron ready --control-plane https://fistron.example.com
Then open Ready for review in the control plane (under Changes and reviews): it lists the checks you saved. Click Open to read one, Delete to remove it. Only your own account sees them: not the other members, not your organisation’s admins. Become a developer’s Delete everything deletes them too.
Before every push: the hook
fistron ready --install-hook # in your working copy
fistron ready --remove-hook
The git pre-push hook runs fistron ready --quick before a push and
says what is left. It never stops the push: it teaches, it never judges.
A hook of your own is never replaced.
A change written with AI
When your team’s change policy names the signals of an AI-written change
([ai] trailers, for example Assisted-by:), Ready for review says that
your change was written with AI and asks you to make sure you understand
it before you push. The questions of What a reviewer will likely ask
help; fistron explain check asks them in the terminal. Answering them
is your choice: nothing grades them, and your answers stay yours. When
your team’s policy asks the author’s confirmation ([review] understanding), Ready for review says so, so that your review does not
ask for it later.