diff --git a/cmd/mesh-controller/seatverbs.go b/cmd/mesh-controller/seatverbs.go index 460be8a2..ae2e4643 100644 --- a/cmd/mesh-controller/seatverbs.go +++ b/cmd/mesh-controller/seatverbs.go @@ -100,6 +100,12 @@ type verbArguments struct { var removedVerbs = map[string]bool{"build": true, "rebuild": true, "forget-checks": true, "delivery-plan": true, "delivery-check": true, "queue": true, "cancel": true, "clear": true, "kill": true, "replay": true, "pause": true, "resume": true} +// removedVerb says a verb is one the seat answers by name only: removed in release 4e or in release 6. +func removedVerb(name string) bool { + _, r6 := removedInRelease6(name) + return removedVerbs[name] || r6 +} + // removedInRelease6 says a verb is one release 6 removed (ADR 0539, ADR 0429 §8): refused by name, with its replacement. func removedInRelease6(verb string) (string, bool) { why, removed := catalogue.RemovedControllerVerbs[verb] diff --git a/cmd/mesh-controller/seatverbs_schema_integration_test.go b/cmd/mesh-controller/seatverbs_schema_integration_test.go index c66a5ec9..85bd1c16 100644 --- a/cmd/mesh-controller/seatverbs_schema_integration_test.go +++ b/cmd/mesh-controller/seatverbs_schema_integration_test.go @@ -38,7 +38,7 @@ func servedSchemas(t *testing.T) map[string]catalogue.Verb { func TestNoArgumentAVerbIsGivenIsPassedOver(t *testing.T) { for name, v := range servedSchemas(t) { - if inProcess[name] || removedVerbs[name] { + if inProcess[name] || removedVerb(name) { continue } names, switches := declaredArguments(v) @@ -79,7 +79,7 @@ func TestAnArgumentAVerbDoesNotDeclareIsRefused(t *testing.T) { args := sampleArguments(v) args[stranger] = "x" _, err := argvFor(name, args) - if inProcess[name] || removedVerbs[name] { + if inProcess[name] || removedVerb(name) { _, err = readArguments(name, args) } if err == nil || !strings.Contains(err.Error(), strconv.Quote(stranger)) { @@ -100,13 +100,13 @@ func TestAnArgumentAVerbDoesNotDeclareIsRefused(t *testing.T) { func TestEveryFlagOfAVerbsCommandIsAnArgumentOrAccountedFor(t *testing.T) { flags := commandFlags(t) - if len(flags["push"]) == 0 || len(flags["plan"]) == 0 { - t.Fatalf("reading the commands' flags found nothing for push or plan: %v", flags) + if len(flags["settings"]) == 0 || len(flags["upgrade"]) == 0 { + t.Fatalf("reading the commands' flags found nothing for settings or upgrade: %v", flags) } reached := map[string]map[string]bool{} // verb → flag sets its command lines reach served := servedSchemas(t) for name, v := range served { - if inProcess[name] || removedVerbs[name] || name == "command" { + if inProcess[name] || removedVerb(name) || name == "command" { continue } names, switches := declaredArguments(v) diff --git a/cmd/mesh-controller/seatverbs_schema_test.go b/cmd/mesh-controller/seatverbs_schema_test.go index 90ebbd58..06532054 100644 --- a/cmd/mesh-controller/seatverbs_schema_test.go +++ b/cmd/mesh-controller/seatverbs_schema_test.go @@ -148,19 +148,10 @@ func stringLit(e ast.Expr) (string, bool) { var accountedFlags = map[string]map[string]string{ "status": {"json": "set by the verb: the answer is data"}, "seats": {"json": "set by the verb: the answer is data"}, - "plan": {"json": "set by the verb unless files is asked"}, - "push": { - "wait": "set by the verb to 0: a tool call cannot hold a connection for a whole apply", - "all": "withheld: the verb naming no machine is --behind, and a push of every machine is said at a " + - "shell (novox/hq ADR 0217); `command` reaches it", - }, "builds": {"n": "=limit"}, - "plans": {"n": "=limit", "what-if": "=repository"}, // The machine's tunnel key, named as the verb's other arguments are (novox/hq ADR 0169). - "durations": { - "json": "set by the verb: the answer is data", - "all": "withheld: every measurement of a fortnight is more than a call should carry; `command` reaches it", - }, + // `upgrade` takes --together, which only a roll-out of one machine first once meant; no caller reaches it. + "upgrade": {"together": "withheld: nothing rolls out one machine first any more (ADR 0539 §5); `command` reaches it"}, // The desk path of `secret accept` (novox/hq ADR 0259 §10): a value is never an argument of a call. "hand-acts": {"json": "set by the verb: the answer is data"}, "conditions": {"json": "set by the verb: the answer is data"},