This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Project bazel agent

1 - Bazel Agent Specification

Describe the validated AL Bazel entry point and installation diagnostics used by repository agents.

Sources: project README, Bazel targets, command and diagnostic implementation, and runner tests. Baseline source revision: 550d7e79b1f5fdbc2b6017b75178471d6914082f, observed 2026-09-08.

al bazel SHALL require a recognized Bazel command and insert --config=agent immediately after that command. Subsequent options, targets, and arguments after a run separator SHALL pass through unchanged.

  • WHEN the caller invokes al bazel run //path:target -- argument
  • THEN the runner constructs bazel run --config=agent //path:target -- argument.

The Bazel entry point SHALL resolve bazel from PATH and replace the runner process with it, preserving the supplied environment without creating or injecting a host temporary directory.

  • WHEN a validated invocation starts Bazel
  • THEN Bazel owns the runner process and its resulting exit status directly.

doctor SHALL emit a read-only JSON report containing runner and available built-source identities, Bazelisk pins, platform, configured profile and rc paths, and task-scratch classification without dumping environment values. Unavailable built-source identity SHALL remain explicit.

  • WHEN doctor cannot find the expected Bazel output for the runner
  • THEN the source report records that it is unavailable rather than claiming that the installed runner matches current source.