Take out StepRun.names: the step ask no longer carries the registrations' names for a lint scan

The part build-step.json, its generated Go and TypeScript (seatgen, check clean), the three build seats' fixtures and sdk/buildstep lose StepNames and the ask's required names.

Builds: design 47 G §7, §328, §329
This commit is contained in:
2026-11-11 14:51:56 +01:00
parent f366225135
commit e7ef3f3a78
18 changed files with 11 additions and 220 deletions
+2 -4
View File
@@ -47,14 +47,13 @@ func runAsk() StepAsk {
Input: in, Args: []string{"-verdict"}}}
}
// stepAsk is the runner's unit step of one artifact (086 A-D31): the names the lint step reads and a kept result.
// stepAsk is the runner's unit step of one artifact (086 A-D31): its kept result.
func stepAsk() StepAsk {
return StepAsk{ID: testAskID, Kind: AskStep, Language: AskGo, Asker: "mesh-delivery-pipeline",
At: time.Date(2026, 11, 10, 10, 0, 0, 0, time.UTC),
Step: &StepRun{Pipeline: "main.12.nats", Step: StepUnit, Module: "nats", Artifact: "nats:program", Branch: "main",
Commit: testCommit, Revision: 12, Fingerprint: "fp-0123", Fetch: Fetch{Repository: "novox/mesh-catalog", Commit: testCommit},
Names: StepNames{Modules: []string{"nats"}, Repositories: []string{"novox/mesh-catalog"}, Branches: []string{"main"}},
Kept: []KeptResult{{Package: "./modules/nats/a", Digest: "sha256:bbbb", Level: StepUnit}}}}
Kept: []KeptResult{{Package: "./modules/nats/a", Digest: "sha256:bbbb", Level: StepUnit}}}}
}
// The ask the three build seats share is one neutral form: it round-trips, and every ill-formed ask is refused,
@@ -137,7 +136,6 @@ func TestAskCheckAndRoundTrip(t *testing.T) {
{"artifact of another module", func(a *StepAsk) { a.Step.Artifact = "nats-tools:program" }, "not nats:<artifact>"},
{"step at a branch", func(a *StepAsk) { a.Step.Commit = "main" }, "no full commit"},
{"no fingerprint", func(a *StepAsk) { a.Step.Fingerprint = "" }, "no build-input fingerprint"},
{"no names", func(a *StepAsk) { a.Step.Names = StepNames{Modules: []string{"nats"}} }, "no repositories, branches of the registrations"},
{"rerun with no caller", func(a *StepAsk) { a.Step.Rerun = true }, "rerun with no caller"},
} {
a := stepAsk()
-21
View File
@@ -39,14 +39,6 @@ var StepOutcomes = []string{OutcomePassed, OutcomeFailed, OutcomeNothingToRun, O
// StepEndedVersion is the layout version of a step's end.
const StepEndedVersion = 1
// StepNames are the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 §5):
// carried in the ask, so the build module reads no other part for them.
type StepNames struct {
Modules []string `json:"modules"`
Repositories []string `json:"repositories"`
Branches []string `json:"branches"`
}
// KeptResult is a package's passing result at the digest of what its tests read (ADR 0666 §8).
type KeptResult struct {
Package string `json:"package"`
@@ -74,7 +66,6 @@ type StepRun struct {
Fingerprint string `json:"fingerprint"`
Fetch Fetch `json:"fetch"`
Toolchain *ToolchainUsed `json:"toolchain,omitempty"`
Names StepNames `json:"names"`
Kept []KeptResult `json:"kept,omitempty"`
Rerun bool `json:"rerun,omitempty"`
By string `json:"by,omitempty"`
@@ -109,18 +100,6 @@ func (r StepRun) check(id string) error {
if err := r.Fetch.check(id); err != nil {
return err
}
var missing []string
for _, n := range []struct {
name string
list []string
}{{"modules", r.Names.Modules}, {"repositories", r.Names.Repositories}, {"branches", r.Names.Branches}} {
if len(n.list) == 0 {
missing = append(missing, n.name)
}
}
if len(missing) > 0 {
return fmt.Errorf("buildstep: the step ask %s names no %s of the registrations, which the lint step reads", id, strings.Join(missing, ", "))
}
if r.Rerun != (r.By != "") {
return fmt.Errorf("buildstep: the step ask %s is a rerun with no caller, or names a caller and is no rerun", id)
}