Run.verify()¶
Run a shell command in this Run's worktree and get its result as a
VerifierOutcome: whether it passed, its exit status and its output. A failing command doesn't
raise.
Pass the outcome to a step, so the agent sees what failed.
To run your repository's own build, read it from Run.config.
A command may take 600 seconds unless the project sets
build_timeout. A command that runs longer is stopped, and
its outcome doesn't pass.
A command's changes to files aren't committed. A step on this Run wipes them before its agent
starts, apart from files .gitignore covers.
Run.verify() is recorded like a step. On a resume, it returns its
recorded outcome without running the command, unless the command or the work before it changed.
Reference¶
agl.sdk.Run.verify(command)
async
¶
Runs a command in the worktree this Run owns.
Parameters:
-
command(str) –The shell command line to run. An empty one passes.
Returns:
-
VerifierOutcome–The
VerifierOutcome, even when the command fails.
Raises:
-
InputError–commandisn't a string, or can't be written down as JSON. -
NotFoundError–The ref this worktree was cut from names nothing.
-
ConflictError–Another line of work is holding this worktree's place.
-
UpstreamUnavailable–AGL couldn't start the command.
-
UpstreamUnexpected–AGL couldn't read the command's output.
agl.sdk.VerifierOutcome
dataclass
¶
Whether a command passed, with its exit status and output.