X1 join: the checker's generated packages, requires and askers go
The seat mesh-delivery-checker's generated Go seat, client and TypeScript package go from mesh-delivery-contracts (and their entries in its manifest), with the old copies under contracts/go; the indexer, the forge bridge and the assigner require them no more, and the assigner judges with its own internal/assignment verdict constants. The git, node-build-go and node-build-node fixtures, the buildstep and steprun tests and the indexer's and assigner's whole tests name the seat mesh-wants (the asker of every check-kind run in H1) or the runner where they named the checker; the indexer's unused CheckerModule and the judge's stream exemption for the checker go. The step kinds check and recheck stay with their queues (H-A-117). Builds: design 47 H H-A-57, H-A-117 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -27,20 +27,20 @@ func goodBuild() StepAsk {
|
||||
}
|
||||
|
||||
func goodCheck() StepAsk {
|
||||
return StepAsk{ID: testAskID, Kind: AskCheck, Language: AskGo, Asker: "mesh-delivery-checker",
|
||||
return StepAsk{ID: testAskID, Kind: AskCheck, Language: AskGo, Asker: "mesh-wants",
|
||||
At: time.Date(2026, 11, 5, 10, 0, 0, 0, time.UTC),
|
||||
Check: &CheckJob{Fetch: Fetch{Repository: "novox/mesh-catalog", Commit: testCommit}, Levels: []string{LevelUnit}}}
|
||||
}
|
||||
|
||||
// runAsk is the checker's run of a checking program built at a mesh-delivery head, over two heads (issue 1921, B0).
|
||||
// runAsk is the seat mesh-wants' run of a program built at a mesh-delivery head, over two heads (issue 1921, B0).
|
||||
func runAsk() StepAsk {
|
||||
in, err := RunInputOf("seat:mesh-delivery-checker.input", []byte(`{"v":1}`))
|
||||
in, err := RunInputOf("seat:mesh-wants.input", []byte(`{"v":1}`))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return StepAsk{ID: testAskID, Kind: AskCheck, Language: AskGo, Asker: "mesh-delivery-checker",
|
||||
return StepAsk{ID: testAskID, Kind: AskCheck, Language: AskGo, Asker: "mesh-wants",
|
||||
At: time.Date(2026, 11, 5, 10, 0, 0, 0, time.UTC),
|
||||
Run: &RunJob{Program: RunProgram{Repository: "novox/mesh-delivery", Commit: testCommit, Dir: "modules/mesh-delivery-checker",
|
||||
Run: &RunJob{Program: RunProgram{Repository: "novox/mesh-delivery", Commit: testCommit, Dir: "modules/mesh-delivery-indexer",
|
||||
Package: "./cmd/mesh-checking-program"},
|
||||
Heads: []RunHead{{Repository: "novox/mesh-delivery", Commit: testCommit}, {Repository: "novox/mesh-sdk", Commit: testCommit}},
|
||||
Input: in, Args: []string{"-verdict"}}}
|
||||
@@ -109,8 +109,8 @@ func TestAskCheckAndRoundTrip(t *testing.T) {
|
||||
{"run of no package", func(a *StepAsk) { a.Run.Program.Package = "" }, "no package"},
|
||||
{"run over a head twice", func(a *StepAsk) { a.Run.Heads = append(a.Run.Heads, a.Run.Heads[0]) }, "twice"},
|
||||
{"run over a branch", func(a *StepAsk) { a.Run.Heads[1].Commit = "main" }, "novox/mesh-sdk at no full commit"},
|
||||
{"input on a state", func(a *StepAsk) { a.Run.Input.Verb = "mesh-delivery-checker.inputs" }, "no seat:<seat>.<verb>"},
|
||||
{"input on one machine", func(a *StepAsk) { a.Run.Input.Verb = "seat:mesh-delivery-checker.input@ace" }, "no seat:<seat>.<verb>"},
|
||||
{"input on a state", func(a *StepAsk) { a.Run.Input.Verb = "mesh-wants.inputs" }, "no seat:<seat>.<verb>"},
|
||||
{"input on one machine", func(a *StepAsk) { a.Run.Input.Verb = "seat:mesh-wants.input@ace" }, "no seat:<seat>.<verb>"},
|
||||
{"input by no digest", func(a *StepAsk) { a.Run.Input.Digest = "d1" }, "no sha256 digest"},
|
||||
{"input of no bytes", func(a *StepAsk) { a.Run.Input.Size = 0 }, "under 1"},
|
||||
{"argument of the shell", func(a *StepAsk) { a.Run.Args = []string{"-x; rm"} }, "no word or flag"},
|
||||
@@ -148,7 +148,7 @@ func TestAskCheckAndRoundTrip(t *testing.T) {
|
||||
t.Error("a kept result skips its package at its digest and level only")
|
||||
}
|
||||
// A-237: a run's input is any size.
|
||||
if in, err := RunInputOf("seat:mesh-delivery-checker.input", make([]byte, 3<<20)); err != nil || in.Size != 3<<20 {
|
||||
if in, err := RunInputOf("seat:mesh-wants.input", make([]byte, 3<<20)); err != nil || in.Size != 3<<20 {
|
||||
t.Errorf("an input of 3 MiB: %+v, %v", in, err)
|
||||
}
|
||||
in := runAsk().Run.Input
|
||||
@@ -224,7 +224,7 @@ func TestAskOfAnySeatsType(t *testing.T) {
|
||||
} `json:"check,omitempty"`
|
||||
}
|
||||
at := time.Date(2026, 11, 5, 10, 0, 0, 0, time.UTC)
|
||||
s := seatAsk{V: 1, ID: testAskID, Kind: AskCheck, Lang: AskGo, Asker: "mesh-delivery-checker", At: &at}
|
||||
s := seatAsk{V: 1, ID: testAskID, Kind: AskCheck, Lang: AskGo, Asker: "mesh-wants", At: &at}
|
||||
s.Check = &struct {
|
||||
Fetch Fetch `json:"fetch"`
|
||||
Levels []string `json:"levels"`
|
||||
@@ -458,7 +458,7 @@ func TestPauseCapacityAndComposerKey(t *testing.T) {
|
||||
t.Error("other versions, or none, share the key")
|
||||
}
|
||||
// 1921 (B0): a run's program is kept the same way, under a key of its own kind.
|
||||
p := RunProgram{Repository: "novox/mesh-delivery", Commit: testCommit, Dir: "modules/mesh-delivery-checker", Package: "p"}
|
||||
p := RunProgram{Repository: "novox/mesh-delivery", Commit: testCommit, Dir: "modules/mesh-delivery-indexer", Package: "p"}
|
||||
if rk := RunKey(p, tc, nil); !strings.HasPrefix(rk, "program-") || len(rk) != len("program-")+16 || rk != RunKey(p, tc, nil) ||
|
||||
RunKey(p, tc, PackageVersions{"m/x": a}) == rk {
|
||||
t.Errorf("run key = %q", rk)
|
||||
|
||||
@@ -47,7 +47,7 @@ func publishAsk(t *testing.T, js jetstream.JetStream, a sdkstep.StepAsk) {
|
||||
// A build rides main's subject; any other kind a named asker's (design 47 G §543: main takes only a build and a run).
|
||||
subject, _ := sdkstep.AskSubject(a.Language, a.Kind)
|
||||
if a.Kind != sdkstep.AskDelivery {
|
||||
subject, _ = sdkstep.AskSubjectBy(a.Language, a.Kind, "mesh-delivery-checker")
|
||||
subject, _ = sdkstep.AskSubjectBy(a.Language, a.Kind, "mesh-wants")
|
||||
}
|
||||
if _, err := js.Publish(context.Background(), subject, raw); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -59,7 +59,7 @@ func askKey(a sdkstep.StepAsk, node string) (string, error) {
|
||||
if a.Kind == sdkstep.AskDelivery {
|
||||
return sdkstep.AskStepKey("", node, a.ID)
|
||||
}
|
||||
return sdkstep.AskStepKey("mesh-delivery-checker", node, a.ID)
|
||||
return sdkstep.AskStepKey("mesh-wants", node, a.ID)
|
||||
}
|
||||
|
||||
// 1887/A2a, 1887/AC-order, 1887/AC-pull on the real server: a check ask published before a delivery ask runs after it;
|
||||
|
||||
Reference in New Issue
Block a user