gate

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvironmentOutput added in v0.1.0

func EnvironmentOutput(text string) bool

EnvironmentOutput accepts the marker only at the start of the text or on the line after a "review gate could not run" wrapper, never inside test output, which an agent controls.

Types

type Failure added in v0.1.0

type Failure struct {
	Kind     string
	Command  string
	ExitCode int
}

Failure preserves command identity and an exit status without treating test prose containing words such as quota or unauthorized as an environment fault.

func (*Failure) String added in v0.1.0

func (f *Failure) String() string

type Result

type Result struct {
	Passed  bool
	Output  string
	Failure *Failure
}

func Run

func Run(dir string, cfg config.GateConfig) (Result, error)

Run stops at the first failing command rather than running the rest.

A gate command is not Golem's command. It is a line of shell out of .golem/config.yaml — a file inside the repository an agent works in, which an agent can edit — and it is executed later, by whichever process next runs `golem ticket review` on that repository. So it runs with the agent's allow-listed environment rather than the ambient one (see internal/agentenv): otherwise an agent could write a gate command today and have it read GOLEM_GITHUB_TOKEN tomorrow, out of an operator's own shell on a co-located box. That was the last path making "the agent never sees GOLEM_*" untrue.

The allow-list is the right one here for the reason that justifies it for the agent: gate commands are build and test commands, run in the same repository and against the same toolchain the agent uses, so whatever suffices for the agent's own `make test` suffices for the gate's. Nothing here pushes — internal/cli contains no push at all; the branch push lives in internal/shem/worker.pushTicketBranch, which is one of Golem's own commands and keeps the full environment. GOLEM_AGENT_ENV remains the escape hatch for a gate that genuinely needs more, and it cannot re-add the GOLEM_ namespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL