Expand description
Task checks the node runs itself. When a session’s task worktree (task-<id>) has a new
commit and a clean tree, the node asks core for the task’s check command
(task.check_spec), runs it in that worktree and reports the exit code
(task.check_run, signed by the node’s key). Core takes the receipt as proof, not the
agent’s word; the same path serves PTY and ACP sessions.
The command runs code from the agent’s tree (tests, build scripts), so it runs only through
exec-as with the node’s run-as user, exactly like the sessions; a node without --run-as
(and Windows) does not run checks. The check sees only ENV_KEEP of the node’s variables,
gets no stdin, its output is dropped, and its process group is killed at the timeout.
Constants§
- ENV_
KEEP - The only node variables a check sees: tool paths and locale, never the node’s own settings (core address, token, m4a keys, provider credentials).
- TIMEOUT
- Longest a check may run; past it the check fails (exit code -1).
Functions§
- argv
- The program and arguments that run
commandthrough the shell (and the run-as user). - due
- Task worktrees with a new commit and a clean tree whose head was not checked yet.
- kept_
env - run
- Run
commandinroot:Some((exit_code, duration_ms)), -1 for a timeout or a check that could not start.None: not run, the node has no--run-asuser (a check is a command from core and never runs as the node’s own user).
Type Aliases§
- Due
- A worktree whose head wants a check:
(workspace, root, head).