indexer, mesh-catalog contract: a branch named candidate or entry is refused as reserved branch name
Builds: design 47 G §704 (branch named candidate or entry) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -948,10 +948,11 @@ type RegistrationAsked struct {
|
||||
|
||||
// The values of RegistrationAsked's refused.
|
||||
const (
|
||||
RegistrationAskedRefusedUnprotectedBranch = "unprotected branch"
|
||||
RegistrationAskedRefusedReviewRequired = "review required"
|
||||
RegistrationAskedRefusedUnknownModule = "unknown module"
|
||||
RegistrationAskedRefusedNothingMoves = "nothing moves"
|
||||
RegistrationAskedRefusedUnprotectedBranch = "unprotected branch"
|
||||
RegistrationAskedRefusedReservedBranchName = "reserved branch name"
|
||||
RegistrationAskedRefusedReviewRequired = "review required"
|
||||
RegistrationAskedRefusedUnknownModule = "unknown module"
|
||||
RegistrationAskedRefusedNothingMoves = "nothing moves"
|
||||
)
|
||||
|
||||
// StepStatuses is the status of each pipeline step (design 47 *Pipeline steps and the policy*); a step left out keeps the module's.
|
||||
|
||||
@@ -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: "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\"}",
|
||||
decode: func(b []byte) (any, error) { var v PolicyInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "policy asked, naming the moved status", subject: "", given: "{\"ask\":\"ask-m2kx9a1b3c4d5e\",\"lines\":[\"nats:program unit: required -\\u003e bypass\"],\"module\":\"nats\"}", wire: "{\"ask\":\"ask-m2kx9a1b3c4d5e\",\"lines\":[\"nats:program unit: required -\\u003e bypass\"],\"module\":\"nats\"}",
|
||||
|
||||
@@ -296,6 +296,15 @@
|
||||
"words": "the branch beta of novox/mesh-catalog admits a direct push"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "register refused for a reserved branch name",
|
||||
"of": "verb:register.answer",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "policy moves one artifact's unit step",
|
||||
"of": "verb:policy.input",
|
||||
|
||||
@@ -2424,6 +2424,7 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"unprotected branch",
|
||||
"reserved branch name",
|
||||
"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" | "review required" | "unknown module" | "nothing moves";
|
||||
"refused"?: "unprotected branch" | "reserved branch name" | "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