The two judgements
assay judges in two ways, and they differ on purpose: at turn end the gate judges the agent’s change, in CI it judges the whole project. Nothing is done to make them agree.
| At turn end | In CI | |
|---|---|---|
| Command | assay gate --scope changed --since <the session's mark>, which the agent plugin runs; by hand, assay gate --scope changed |
assay gate, whose default scope is the project |
| What is judged | The changed files of the agent’s session | Every file of the project |
| The baseline | Does not apply in changed files: every violation there counts | A violation the baseline knows is known and does not fail |
| Fails on | A blocking violation in a changed file, a changed file that does not compile, baseline growth, a configuration error | A blocking violation not in the baseline, a file that does not compile, a configuration error, a gate condition that is not met |
| Gate conditions | Never judged: each is listed as not judged | On coverage only with --coverage <lcov file>, on duplicated code only with --duplication. assay gate --scope changed --base <commit> --coverage … --duplication judges them on the new lines of a change too |
| Snapshots | Never: the agent plugin passes neither --snapshot nor --compare-with |
The default branch’s job records the project judgement and the metrics with --snapshot; the pull request job compares with them by --compare-with (Snapshots and trends) |
The row Files of the console report’s head box |
1 changed |
2 in the whole project |
Every result names its scope, the console report in the row Files of its head box. The verdict box of the project judgement ends with the line Files that no change touched are judged only here, in the project judgement: the gate on a change judges the changed files.
The agent is never told of rule violations in files it did not change. The results of the cross-file checks and the project-file checks are the exception: they are whole-project checks, and enter the gate at turn end through the baseline.
The pull request job
Section titled “The pull request job”A pull request job can also judge the change since the branch left its target, beside the project judgement:
assay gate --scope changed --base "$(git merge-base HEAD origin/<target>)"It judges by the rules of turn end: every violation in a file the pull request changed counts, known to the baseline or not, and the whole-project results enter through the baseline. Given --coverage and --duplication, it also judges the gate conditions on the new lines of the change.
So a pull request can fail its own job on a known violation in a file it changed, while the project judgement of the same commit passes. The remedy is a fix, as at turn end. See the pull request job, which also writes a summary in Markdown.
Passing at turn end, failing in CI
Section titled “Passing at turn end, failing in CI”Through a blocking violation that the baseline does not hold, in a file the session did not change. That happens:
- after a rule or a preset was added;
- after an SDK upgrade brought a new lint or warning;
- in a file a shell command changed in a project with no repository, which the session ledger does not record.
The turn is not at fault: the project has debt the baseline does not record. Fix it, or have a person run assay baseline update --add on purpose, which leaves a growth record.
Failing at turn end, passing in CI
Section titled “Failing at turn end, passing in CI”Through a violation the baseline holds, in a file the session changed. That is intended: touching a file means cleaning it. The message marks each such violation [in the baseline; blocks because its file was changed].
Running the project judgement locally
Section titled “Running the project judgement locally”assay gateThat is the project judgement, exactly as CI runs it: both engines on the whole project, against the baseline, with its size and growth printed. Its exit code is CI’s verdict. Every option and exit code is on assay gate.
╭─ assay gate ─────────────────────────────────────────────────────────────────╮│ Preset recommended ││ Rules 109 ││ Files 2 in the whole project │╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Baseline ─────────────────────────────────────────────────────── 4 entries ─╮│ Removed in this run none ││ ││ Growth record Time Added ││ ────────────────────────────────────────── ││ 1 2026-11-23T21:44:29Z 4 │╰──────────────────────────────────────────────────────────────────────────────╯
╭─ ✓ PASS ─────────────────────────────────────────────────────────────────────╮│ 0 blocking · 0 advisory · 0 of 2 files · 4 in the baseline ││ ! 4 known violations in the baseline · listed in ││ .dart_tool/assay/reports/gate-project.txt ││ Files that no change touched are judged only here, in the project judgement: ││ the gate on a change judges the changed files. │╰──────────────────────────────────────────────────────────────────────────────╯
Full report: .dart_tool/assay/reports/gate-project.txtTo judge a change by hand instead, see Judging a change by hand.