indexer, mesh-catalog contract: an unwatch of a branch a placement names is refused as placed
The indexer asks the seat mesh-module-assigner's verb placement (input {module}, answer {placements: [{branch, nodes}]}, A-62)
before an unwatch is proposed and refuses one whose branch a placement names, with the reason placed (new in the seat
mesh-catalog's contract) naming the placement; its manifest invokes the verb.
Builds: design 47 G §704 (unwatch), A-62
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -950,6 +950,7 @@ type RegistrationAsked struct {
|
||||
const (
|
||||
RegistrationAskedRefusedUnprotectedBranch = "unprotected branch"
|
||||
RegistrationAskedRefusedReservedBranchName = "reserved branch name"
|
||||
RegistrationAskedRefusedPlaced = "placed"
|
||||
RegistrationAskedRefusedReviewRequired = "review required"
|
||||
RegistrationAskedRefusedUnknownModule = "unknown module"
|
||||
RegistrationAskedRefusedNothingMoves = "nothing moves"
|
||||
|
||||
@@ -151,6 +151,8 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v RegisterInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "register refused for an unprotected branch", subject: "", given: "{\"module\":\"nats\",\"refused\":\"unprotected branch\",\"words\":\"the branch beta of novox/mesh-catalog admits a direct push\"}", wire: "{\"module\":\"nats\",\"refused\":\"unprotected branch\",\"words\":\"the branch beta of novox/mesh-catalog admits a direct push\"}",
|
||||
decode: func(b []byte) (any, error) { var v RegisterAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "unwatch refused for a branch a placement names", subject: "", given: "{\"module\":\"nats\",\"refused\":\"placed\",\"words\":\"the branch beta of nats is placed: n1 and n2 run it from that branch\"}", wire: "{\"module\":\"nats\",\"refused\":\"placed\",\"words\":\"the branch beta of nats is placed: n1 and n2 run it from that branch\"}",
|
||||
decode: func(b []byte) (any, error) { var v UnwatchAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "register refused for a reserved branch name", subject: "", given: "{\"module\":\"nats\",\"refused\":\"reserved branch name\",\"words\":\"the branch candidate of novox/mesh-catalog is a name the catalog keeps for its own revisions\"}", wire: "{\"module\":\"nats\",\"refused\":\"reserved branch name\",\"words\":\"the branch candidate of novox/mesh-catalog is a name the catalog keeps for its own revisions\"}",
|
||||
decode: func(b []byte) (any, error) { var v RegisterAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "policy moves one artifact's unit step", subject: "", given: "{\"artifact\":\"program\",\"module\":\"nats\",\"steps\":{\"unit\":\"bypass\"},\"why\":\"its tests need hardware\"}", wire: "{\"artifact\":\"program\",\"module\":\"nats\",\"steps\":{\"unit\":\"bypass\"},\"why\":\"its tests need hardware\"}",
|
||||
|
||||
@@ -296,6 +296,15 @@
|
||||
"words": "the branch beta of novox/mesh-catalog admits a direct push"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "unwatch refused for a branch a placement names",
|
||||
"of": "verb:unwatch.answer",
|
||||
"given": {
|
||||
"module": "nats",
|
||||
"refused": "placed",
|
||||
"words": "the branch beta of nats is placed: n1 and n2 run it from that branch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "register refused for a reserved branch name",
|
||||
"of": "verb:register.answer",
|
||||
|
||||
@@ -2433,6 +2433,7 @@
|
||||
"enum": [
|
||||
"unprotected branch",
|
||||
"reserved branch name",
|
||||
"placed",
|
||||
"review required",
|
||||
"unknown module",
|
||||
"nothing moves"
|
||||
|
||||
+1
-1
@@ -448,7 +448,7 @@ export interface RegistrationAsked {
|
||||
"lines"?: string[];
|
||||
"module": string;
|
||||
/** why no ask was raised */
|
||||
"refused"?: "unprotected branch" | "reserved branch name" | "review required" | "unknown module" | "nothing moves";
|
||||
"refused"?: "unprotected branch" | "reserved branch name" | "placed" | "review required" | "unknown module" | "nothing moves";
|
||||
/** the refusal in words, naming the branch, the step or the module */
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user