DC4 merge-pull-unwatched-base: merge-pull merges a member whose base is no watched branch plainly, whatever its repository, noted no delivery

Builds: design 47 H2 H-A-704, H-A-717 (DQ-49)
This commit is contained in:
2026-11-25 17:08:45 +01:00
parent 9ebf400457
commit c8f9e1b8d3
6 changed files with 17 additions and 17 deletions
@@ -86,7 +86,7 @@ func VerbDescription(verb string) string {
case VerbNote:
return "Append one line to a commit's note under refs/notes/mesh-plan. The line carries the act's id, and an id the note already holds is skipped (held)."
case VerbMergePull:
return "Merge one or more pull requests with the forge tools' account, each at the head the caller names: one merge call, a delivery's start and, with two or more members, its group (design 47 H §734, §735, §766; ADR 0682 §1, §2). Every member is judged before any is merged: still the pull request's head, its base a watched branch, no run at the head's build-input fingerprint failed a required step (judged from its own state failed-steps), registrations heard; no branch protection is read. A member whose repository has no watched branch is judged against nothing of the module graph and merged plainly in the order named, starting no delivery: its outcome says merged with the note no delivery (H-A-471). When one member is refused, none is merged. Then it merges them in the order named, writing the call in its state calls before the first merge, and says merge-called once. It answers once, at the call's end, naming the call and each member's outcome; a member already merged is refused already-merged, naming its commit."
return "Merge one or more pull requests with the forge tools' account, each at the head the caller names: one merge call, a delivery's start and, with two or more members, its group (design 47 H §734, §735, §766; ADR 0682 §1, §2). Every member is judged before any is merged: still the pull request's head, no run at the head's build-input fingerprint failed a required step (judged from its own state failed-steps), registrations heard; no branch protection is read. A member whose base is no watched branch, whatever its repository, is judged against nothing of the module graph and merged plainly in the order named, starting no delivery: its outcome says merged with the note no delivery, and merge-called leaves it out (H-A-471, H-A-704). When one member is refused, none is merged. Then it merges them in the order named, writing the call in its state calls before the first merge, and says merge-called once. It answers once, at the call's end, naming the call and each member's outcome; a member already merged is refused already-merged, naming its commit."
case VerbTag:
return "Write the git tag of a released version, <directory>/vMAJOR.MINOR.PATCH for a Go package (design 47 H2 §796), at the commit its build was made from; the builder writes it only on the catalog's version-released (design 47 G section 370). A tag already at that commit is answered performed. An error answer carries error and error-kind."
}
@@ -229,12 +229,12 @@ type Call struct {
// CallMember is one member of a kept call.
type CallMember struct {
// the pull request's base, read at judging: a watched branch, but for a member noted as of a repository with no watched branch
// the pull request's base, read at judging: a watched branch, but for a member noted as one whose base is no watched branch
Branch string `json:"branch"`
// for merged, the merge commit
Commit string `json:"commit,omitempty"`
Head string `json:"head"`
// for a member merged plainly, its repository having no watched branch: "no delivery: the repository has no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471)
// for a member merged plainly, its base being no watched branch, whatever its repository: "no delivery: its base is no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704)
Note string `json:"note,omitempty"`
Number int64 `json:"number"`
Repository string `json:"repository"`
@@ -298,7 +298,7 @@ type FailedStep struct {
type MemberOutcome struct {
// for merged, the merge commit; for a member refused already-merged, its commit
Commit string `json:"commit,omitempty"`
// for a member merged plainly, its repository having no watched branch: "no delivery: the repository has no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471)
// for a member merged plainly, its base being no watched branch, whatever its repository: "no delivery: its base is no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704)
Note string `json:"note,omitempty"`
Number int64 `json:"number"`
Repository string `json:"repository"`
@@ -43,7 +43,7 @@ func TestFixtures(t *testing.T) {
}, subjectIs: nil},
{name: "a merge call kept", subject: "", given: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"judged\"}],\"said\":false}", wire: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"judged\"}],\"said\":false}",
decode: func(b []byte) (any, error) { var v CallsByCallCallValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "a merge call kept with a member merged plainly, its repository having no watched branch", subject: "", given: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"note\":\"no delivery: the repository has no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}],\"said\":true}", wire: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"note\":\"no delivery: the repository has no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}],\"said\":true}",
{name: "a merge call kept with a member merged plainly, its base being no watched branch", subject: "", given: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"note\":\"no delivery: its base is no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}],\"said\":true}", wire: "{\"account\":\"tools-shanks\",\"at\":\"2026-11-20T02:00:00Z\",\"by\":\"lead-47@workstation\",\"members\":[{\"branch\":\"main\",\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"branch\":\"main\",\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"note\":\"no delivery: its base is no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}],\"said\":true}",
decode: func(b []byte) (any, error) { var v CallsByCallCallValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "pull asks", subject: "", given: "{\"merge-commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"repository\":\"novox/mesh-sdk\"}", wire: "{\"merge-commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"repository\":\"novox/mesh-sdk\"}",
decode: func(b []byte) (any, error) { var v PullInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
@@ -135,7 +135,7 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v MergePullInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "merge-pull answers the call and each member merged", subject: "", given: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"merged\"}]}", wire: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"merged\"}]}",
decode: func(b []byte) (any, error) { var v MergePullAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "merge-pull merges a member of a repository with no watched branch plainly, noted no delivery", subject: "", given: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"note\":\"no delivery: the repository has no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}]}", wire: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"note\":\"no delivery: the repository has no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}]}",
{name: "merge-pull merges a member whose base is no watched branch plainly, noted no delivery", subject: "", given: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"note\":\"no delivery: its base is no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}]}", wire: "{\"call\":\"0123456789abcdef\",\"members\":[{\"commit\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"merged\"},{\"commit\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\",\"note\":\"no delivery: its base is no watched branch\",\"number\":799,\"repository\":\"novox/hq\",\"state\":\"merged\"}]}",
decode: func(b []byte) (any, error) { var v MergePullAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "merge-pull refuses every member when one is refused, naming why", subject: "", given: "{\"call\":\"0123456789abcdef\",\"members\":[{\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"refused\",\"why\":\"the head moved: cccccccccccccccccccccccccccccccccccccccc, not the named aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"judged\"}]}", wire: "{\"call\":\"0123456789abcdef\",\"members\":[{\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"refused\",\"why\":\"the head moved: cccccccccccccccccccccccccccccccccccccccc, not the named aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"number\":261,\"repository\":\"novox/mesh-delivery\",\"state\":\"judged\"}]}",
decode: func(b []byte) (any, error) { var v MergePullAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
@@ -44,7 +44,7 @@
}
},
{
"name": "a merge call kept with a member merged plainly, its repository having no watched branch",
"name": "a merge call kept with a member merged plainly, its base being no watched branch",
"of": "state:calls/call.<call>",
"given": {
"account": "tools-shanks",
@@ -66,7 +66,7 @@
"repository": "novox/hq",
"state": "merged",
"branch": "main",
"note": "no delivery: the repository has no watched branch"
"note": "no delivery: its base is no watched branch"
}
],
"said": true
@@ -515,7 +515,7 @@
}
},
{
"name": "merge-pull merges a member of a repository with no watched branch plainly, noted no delivery",
"name": "merge-pull merges a member whose base is no watched branch plainly, noted no delivery",
"of": "verb:merge-pull.answer",
"why": "a repository of no module is the forge's business alone (design 47 H2 H-A-471)",
"given": {
@@ -532,7 +532,7 @@
"number": 799,
"state": "merged",
"commit": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"note": "no delivery: the repository has no watched branch"
"note": "no delivery: its base is no watched branch"
}
]
}
@@ -834,7 +834,7 @@
},
{
"name": "merge-pull",
"description": "Merge one or more pull requests with the forge tools' account, each at the head the caller names: one merge call, a delivery's start and, with two or more members, its group (design 47 H §734, §735, §766; ADR 0682 §1, §2). Every member is judged before any is merged: still the pull request's head, its base a watched branch, no run at the head's build-input fingerprint failed a required step (judged from its own state failed-steps), registrations heard; no branch protection is read. A member whose repository has no watched branch is judged against nothing of the module graph and merged plainly in the order named, starting no delivery: its outcome says merged with the note no delivery (H-A-471). When one member is refused, none is merged. Then it merges them in the order named, writing the call in its state calls before the first merge, and says merge-called once. It answers once, at the call's end, naming the call and each member's outcome; a member already merged is refused already-merged, naming its commit.",
"description": "Merge one or more pull requests with the forge tools' account, each at the head the caller names: one merge call, a delivery's start and, with two or more members, its group (design 47 H §734, §735, §766; ADR 0682 §1, §2). Every member is judged before any is merged: still the pull request's head, no run at the head's build-input fingerprint failed a required step (judged from its own state failed-steps), registrations heard; no branch protection is read. A member whose base is no watched branch, whatever its repository, is judged against nothing of the module graph and merged plainly in the order named, starting no delivery: its outcome says merged with the note no delivery, and merge-called leaves it out (H-A-471, H-A-704). When one member is refused, none is merged. Then it merges them in the order named, writing the call in its state calls before the first merge, and says merge-called once. It answers once, at the call's end, naming the call and each member's outcome; a member already merged is refused already-merged, naming its commit.",
"input": {
"type": "object",
"properties": {
@@ -1670,7 +1670,7 @@
},
"note": {
"type": "string",
"description": "for a member merged plainly, its repository having no watched branch: \"no delivery: the repository has no watched branch\"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471)"
"description": "for a member merged plainly, its base being no watched branch, whatever its repository: \"no delivery: its base is no watched branch\"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704)"
}
},
"required": [
@@ -1726,7 +1726,7 @@
},
"branch": {
"type": "string",
"description": "the pull request's base, read at judging: a watched branch, but for a member noted as of a repository with no watched branch"
"description": "the pull request's base, read at judging: a watched branch, but for a member noted as one whose base is no watched branch"
},
"head": {
"type": "string",
@@ -1751,7 +1751,7 @@
},
"note": {
"type": "string",
"description": "for a member merged plainly, its repository having no watched branch: \"no delivery: the repository has no watched branch\"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471)"
"description": "for a member merged plainly, its base being no watched branch, whatever its repository: \"no delivery: its base is no watched branch\"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704)"
}
},
"required": [
+3 -3
View File
@@ -92,12 +92,12 @@ export interface Call {
/** one member of a kept call */
export interface CallMember {
/** the pull request's base, read at judging: a watched branch, but for a member noted as of a repository with no watched branch */
/** the pull request's base, read at judging: a watched branch, but for a member noted as one whose base is no watched branch */
"branch": string;
/** for merged, the merge commit */
"commit"?: string;
"head": string;
/** for a member merged plainly, its repository having no watched branch: "no delivery: the repository has no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471) */
/** for a member merged plainly, its base being no watched branch, whatever its repository: "no delivery: its base is no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704) */
"note"?: string;
"number": number;
"repository": string;
@@ -146,7 +146,7 @@ export interface FailedStep {
export interface MemberOutcome {
/** for merged, the merge commit; for a member refused already-merged, its commit */
"commit"?: string;
/** for a member merged plainly, its repository having no watched branch: "no delivery: the repository has no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471) */
/** for a member merged plainly, its base being no watched branch, whatever its repository: "no delivery: its base is no watched branch"; it starts no delivery and merge-called leaves it out (design 47 H2 H-A-471, H-A-704) */
"note"?: string;
"number": number;
"repository": string;