Skip to content

Managing versions

assay’s three packages, assay_lints, assay and assay_cli, are released together under one version number, so the presets, the plugin and the program of one version always match:

  • a preset names the plugin assay at exactly its own version (version: 0.1.0-dev in its plugins.assay entry), never at a range;
  • assay_cli depends on exactly the assay of its own version.

The project’s pubspec.lock locks assay_lints, and so the presets and, through them, the plugin: everyone who works from one lockfile sees the same rules in the editor and in dart analyze. The plugin itself is in no lockfile; the analysis server fetches it when it first starts for the project, not when the project resolves its dependencies.

To move to a new version of assay, raise assay_lints.

The program is installed per machine and serves every project on it, so it can differ from a project’s assay_lints. Then every command that judges, and config, prints one warning on standard error and judges all the same:

warning: this program is assay_cli 0.1.0-dev and the project resolves assay_lints 0.0.9, so the editor and the command line can disagree. Run `dart pub global activate assay_cli 0.0.9` to bring them into line.

The verdict and the exit code do not change, and the gate does not tell an agent of the warning. assay config always shows both versions:

╭─ assay config ───────────────────────────────────────────────────────────────╮
│ Preset recommended │
│ Options analysis_options.yaml │
│ Versions assay_cli 0.1.0-dev = assay_lints 0.1.0-dev ✓ │
╰──────────────────────────────────────────────────────────────────────────────╯

and, where they differ:

╭─ assay config ───────────────────────────────────────────────────────────────╮
│ Preset recommended │
│ Options analysis_options.yaml │
│ Versions assay_cli 0.1.0-dev ≠ assay_lints 0.0.9 ! │
│ They differ, so the editor and the command line can disagree. Run │
│ `dart pub global activate assay_cli 0.0.9` to bring them into │
│ line. │
╰──────────────────────────────────────────────────────────────────────────────╯

The agent plugin assay-agent runs the program on the machine and reads its JSON result. A plugin reads exactly one version of the result schema, and a program writes exactly one, so update the program and the plugin together:

Agent plugin Reads Program that writes it
0.1.0-dev.7 and earlier assay.result/2 assay_cli before the result schema 3
0.1.0-dev.8 to 0.1.0-dev.24 assay.result/3 assay_cli of now: the version that adds the failure reason gate_condition and requires the new coverage-ignore comments in every result of the gate. From 0.1.0-dev.18 on, the plugin can be installed in Codex.

The plugin asks assay version --json once in a session. If the program writes another version, the person is told once in that session, nothing is judged at turn end, and the agent is never held for it:

assay gate: COULD NOT RUN - assay 0.1.0-dev writes the result schemas `assay.result/2`, and the agent plugin reads `assay.result/3`.
The change of this turn was not judged.
Next: install a version of assay that writes it, or set the command that runs one in the settings of the agent plugin. This is said once in a session; the agent is not held while assay cannot be used.

Under Codex the same notice says to set the command “in the environment variable ASSAY_COMMAND”.

One plugin version for both agents. The manifests for Claude Code (.claude-plugin/plugin.json) and for Codex (.codex-plugin/plugin.json) name the same version, raised at every change to the plugin. Each agent takes a new plugin only when the version changes. If you use both, install and update the plugin in each:

  • Claude Code: /plugin.
  • Codex: codex plugin marketplace upgrade assay, which then asks you to trust the plugin’s hooks again.
Terminal window
dart pub global activate assay_cli 0.1.0-dev

(No version is published yet.) Activating another version replaces the one on the machine, for every project.

  • Agree on the program version: the version of the project’s assay_lints. Whoever has another sees the warning above at every command, and their command line and editor can disagree.
  • In CI, install the program as a step of its own, pinned to the version of the project’s assay_lints (Pipelines). Nothing of assay goes into the pubspec for that.