Documentation
¶
Overview ¶
Package line runs the steps routing names for an event, in order, and the handoffs they ask for (docs/spec/routing.md).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gates ¶ added in v0.36.0
type Gates struct {
// Only: the event's gate steps alone, each one, for a job that runs
// nothing else.
Only bool
// From: the file holding the result a line given Only printed; each
// gate step's verdict is read there, never run.
From string
// contains filtered or unexported fields
}
Gates says how a line takes its gate steps: run there, by default. In CI, a job of their own runs them, with no write token and no agent's (Only), and the job judging the line reads their verdicts (From): the gates' tools run the change's code, a linter's config or plugin (ADR-0049, section 6).
type Result ¶
type Result struct {
Status string `json:"status"`
Summary string `json:"summary,omitempty"`
Steps []Step `json:"steps"`
Findings []verdict.Finding `json:"findings,omitempty"` // every step's
AgentCalls int `json:"agent-calls"`
Calls []agent.Call `json:"calls,omitempty"` // every step's
// Pending lists the runs judged with NoApply, in the line's order: what
// `workline apply` is given in the job that holds the write token.
Pending []string `json:"pending,omitempty"`
// Range: the range the gates alone ran on (Gates.Only); Commits, its
// ends as the commits they were when the gates ran, which the line
// reading their verdicts checks it judges too.
Range string `json:"range,omitempty"`
Commits string `json:"commits,omitempty"`
}
Result is the outcome of an event on the line.
func Run ¶
Run runs event's steps. base carries what every role run shares (repository, roles, agent, inputs, forge, target, scope, NoApply); Role and Event are set per step. The first step that does not pass stops the line: it fails closed. On an event the routing sets `fail-fast: false` for (schedule, by default), every step runs all the same and the line takes the worst verdict (ADR-0037). With NoApply, each step judges the tree as it is — no step sees what an earlier one proposed — and handoffs wait, since nothing is applied yet.
type Step ¶
type Step struct {
Name string `json:"name"`
Status string `json:"status"`
Result *engine.Result `json:"result,omitempty"`
Gate *verdict.Verdict `json:"gate,omitempty"`
// New: what a gate found the change adds, for what shows it on the
// merge request; on an event given a range, the gate run here.
New *gate.Added `json:"new,omitempty"`
// From: the file a gate's verdict was read from, the job that ran it
// having shown its findings; empty when it ran here.
From string `json:"from,omitempty"`
}
Step is one role or gate that ran.