All of mesh-build-go's buildstep Go module leaves mesh-catalog for modules/mesh-delivery-sdk: the step run, fetch and release and the regenerate-and-compare step as the package steprun, the CPU share as steprun/buildcpu, the conformance kit as steprun/conformance, the seat generator as seatgen with cmd/seatgen, and cmd/mesh-pack. The three build modules and the builder's and checker's tests import the SDK and keep no copy; the SDK requires nothing of mesh-catalog. Code the build modules share is the delivery domain's SDK, not one module's package. It carries the build-module round's two new files of that package (dropdetected.go 247c422f, storedbuilds.go 904b8aed). Builds: design 47 G §464, §680, §327, §420, §495 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
36 lines
1.6 KiB
Go
36 lines
1.6 KiB
Go
package steprun
|
|
|
|
import "fmt"
|
|
|
|
// Refusal is a step that is not run on purpose, as against one that failed: the toolchain installed is not the
|
|
// recipe's, the integration level's postgres major is not the one it is built for (novox/hq ADR 0469 §1, ADR 0470
|
|
// §4; issue 1473). A step's run returns one and the runner ends the step refused with its text.
|
|
type Refusal struct {
|
|
// Text is the reason, in words the operator reads.
|
|
Text string
|
|
// Want is the version the recipe asks for and Have the one found; either may be empty.
|
|
Want, Have string
|
|
}
|
|
|
|
func (r *Refusal) Error() string { return r.Text }
|
|
|
|
// Refuse is a Refusal with its text formatted.
|
|
func Refuse(format string, args ...any) *Refusal { return &Refusal{Text: fmt.Sprintf(format, args...)} }
|
|
|
|
// Declining is a step a node does not run because another node should: it ends refused as declined (sdkstep.StepDeclined),
|
|
// the ask's message is dropped, and the asker puts the ask again under a new id (issue 890). A build ask naming a
|
|
// toolchain other than this node's is one (novox/hq ADR 0584 clause 2): a node that is not in the toolchain majority
|
|
// sits out and never fails a build.
|
|
type Declining struct {
|
|
Text string
|
|
Lacks []string // what this node lacks, in words the operator reads
|
|
}
|
|
|
|
func (d *Declining) Error() string { return d.Text }
|
|
|
|
// Dropped is a step the seat's verb drop ended: its asker no longer waited for it. A step's run ends with one and the runner
|
|
// writes the step dropped with its text, the cause its caller named (ADR 0664 §4).
|
|
type Dropped struct{ Text string }
|
|
|
|
func (d *Dropped) Error() string { return d.Text }
|