Documentation
¶
Overview ¶
Package preflight provides the baseline check that runs before each prompt execution. It verifies that the project's CI command passes on the clean main-branch tree, caching results per git commit SHA to avoid redundant container runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface {
// Check returns true when the baseline is green and the prompt may proceed.
// Returns false when the baseline is broken or preflight is disabled (empty command).
// Docker execution errors and non-zero exit codes are both treated as "broken baseline":
// they are logged and cause false to be returned, never propagated as Go errors.
Check(ctx context.Context) (bool, error)
}
Checker verifies the project baseline before each prompt execution.
func NewChecker ¶
func NewChecker( command string, interval time.Duration, projectRoot string, containerImage string, extraMounts []config.ExtraMount, n notifier.Notifier, projectName string, ) Checker
NewChecker creates a new preflight Checker. command is the shell command to run (empty string disables preflight). interval is how long a cached green result is valid for the same git SHA (0 disables caching). projectRoot is the absolute path of the project directory mounted as /workspace. containerImage is the Docker image to use (same as the YOLO executor). extraMounts are additional volume mounts applied to the preflight container. n is used to notify humans when the baseline is broken.