docs/generated/checks.mdgenerated from code
How Agentflare works · 3 min read
Checks
Tests run once per version, on your machines, with failures sent to their author.
On this page
A check is a command, like your tests, a build, or a deploy, that af runs on new versions of main. Your own machines run it, and sign the result. Checks come from the actions plugin, which comes with af.
Checks run on Linux machines. On macOS and Windows, af edits and syncs but doesn't run checks yet: to run them, add a Linux machine to the project with agentflare join and let it run your checks, as Where it runs shows. Until one has, agentflare action checks says each check is pending.
Add a check
List it in lvcs.toml:
1[[plugins.actions.actions]]2name = "test"3paths = ["src/**", "tests/**"]4run = ["npm", "test"]Or keep your GitHub workflow files: af can run their jobs as checks. The lvcs.toml reference has every key.
Where it runs
On a Linux machine you let run checks, in a sandbox, on the exact version of main it was asked about. To add one, install af on it and join the project:
1agentflare join <project>It prints the machine's peer= id. Then, on your machine, let it read the project and run your checks. For a check named test:
1agentflare grant <its peer id> read --alias runner-12agentflare grant runner-1 write --paths '.lvcs/x/actions/**'3agentflare grant runner-1 channel.move --paths '.lvcs/x/actions/channels/test' --paths '.lvcs/x/actions/frontiers/**' --paths '.lvcs/x/actions/logs/**' --paths '.lvcs/x/actions/slots'4agentflare grant runner-1 delegate --paths '.lvcs/x/actions/instance'Name each check it should run with one more --paths '.lvcs/x/actions/channels/<check>' in the channel.move grant. Once it holds a grant, its daemon installs the plugins that come with af, actions included, by itself; the delegate grant lets the actions plugin on it act for the machine. agentflare action list then names it among each check's runners.
Each version once
A revision is a version of main that a check ran on. A check that passed on a revision is reused for later revisions until the files it reads change, so changing a README doesn't rerun your tests. While one run is under way, only the newest version waits for the next one; set queue = "all" to run every version instead.
You can ask for more than one machine to agree before a revision counts as passed: that's the check's quorum.
A failure goes to whoever changed those lines
When a check fails, af tells the people and agents whose saves are in that revision, with the failing command, its tests, and its errors. They see it in agentflare notify, fix it, and the next passing run closes it. No one has to relay it.
Passed versions only
A push, a release, or a deploy is a check of its own that takes only a revision every check before it passed. Secrets it needs, like a deploy key, are sealed to the machines that run it; no one else can read them.
Commands
| Command | What it does |
|---|---|
agentflare action checks | Every check on your latest changes. |
agentflare action runs | Recent runs, newest first. |
agentflare action view <run> | One run's steps and log. |
agentflare action watch <run> | Follow one run until it ends. |
agentflare action run <action> | Run a push, release, or deploy by hand, on the newest revision the checks before it passed. |