mesh-cli: nox try and nox groups go with the checker and the groups
Review round 1, Must 4: both called verbs no part serves. Builds: design 47 H §764 (the checker whole; the gate's verb groups) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -166,8 +166,6 @@ var commands = []command{
|
||||
return call{"mesh-delivery.deliveries", pick(l, "state", "repository", "group", "all")}, nil
|
||||
}},
|
||||
{words: []string{"delivery"}, usage: "<id>", does: "one delivery or group whole", build: needArg("mesh-delivery.show", "id")},
|
||||
{words: []string{"groups"}, usage: "[--all]", does: "every delivery group", allowed: []string{"all"},
|
||||
build: func(l line) (call, error) { return call{"mesh-delivery.groups", pick(l, "all")}, nil }},
|
||||
{words: []string{"stalled"}, does: "every delivery held past its state's bound", build: fixed("mesh-delivery.stalled")},
|
||||
{words: []string{"checks"}, usage: "<owner/repo> [--number n | --commit c]", does: "what the mesh's checks said of a head",
|
||||
allowed: []string{"number", "commit"}, build: func(l line) (call, error) {
|
||||
@@ -178,16 +176,6 @@ var commands = []command{
|
||||
a["repository"] = l.pos[0]
|
||||
return call{"mesh-delivery.checks", a}, nil
|
||||
}},
|
||||
{words: []string{"try"}, usage: "<owner/repo> <head> [--level l] [--trunk t] [--tests t]",
|
||||
does: "try a pushed head before its pull request is opened", allowed: []string{"level", "trunk", "tests"},
|
||||
build: func(l line) (call, error) {
|
||||
if len(l.pos) != 2 {
|
||||
return call{}, usageErr("give the repository and the head")
|
||||
}
|
||||
a := pick(l, "level", "trunk", "tests")
|
||||
a["repository"], a["head"] = l.pos[0], l.pos[1]
|
||||
return call{"mesh-delivery-checker.try", a}, nil
|
||||
}},
|
||||
{words: []string{"builds"}, usage: "[--since <RFC 3339 time>]", does: "every build that ended since (the last day by default)",
|
||||
allowed: []string{"since"}, build: func(l line) (call, error) {
|
||||
since := l.flags["since"]
|
||||
|
||||
@@ -103,7 +103,6 @@ func TestEachLineCallsItsOwner(t *testing.T) {
|
||||
{"deliveries --state merged --json", "mesh-delivery.deliveries", `{"state":"merged"}`},
|
||||
{"delivery novox/mesh-sdk@dff0ce2abb21", "mesh-delivery.show", `{"id":"novox/mesh-sdk@dff0ce2abb21"}`},
|
||||
{"checks novox/mesh-catalog --number 591", "mesh-delivery.checks", `{"number":"591","repository":"novox/mesh-catalog"}`},
|
||||
{"try novox/mesh-catalog abc123 --level unit", "mesh-delivery-checker.try", `{"head":"abc123","level":"unit","repository":"novox/mesh-catalog"}`},
|
||||
{"builds", "mesh-delivery-builder.builder_builds_since", `{"since":"2026-11-01T10:00:00Z"}`},
|
||||
{"upgrade nats --policy record --why bus", "mesh-wants.upgrade", `{"module":"nats","policy":"record","why":"bus"}`},
|
||||
{"bus", "mesh-wants.bus", `{}`},
|
||||
@@ -177,6 +176,9 @@ func TestALineWithNoOwnerOrNotReadCallsNothingAndSaysWhy(t *testing.T) {
|
||||
{"healers --days soon", 2, "takes a number"},
|
||||
{"config propose --pull novox/x#1", 2, "--pull is not a flag"},
|
||||
{"frobnicate", 2, "is not a command"},
|
||||
// The checker and the groups go whole (design 47 H §764): nox calls neither.
|
||||
{"try novox/mesh-catalog abc123 --level unit", 2, "is not a command"},
|
||||
{"groups", 2, "is not a command"},
|
||||
} {
|
||||
got := console(t, nil)
|
||||
args := strings.Fields(c.line)
|
||||
|
||||
Reference in New Issue
Block a user