SD-M2d: the checker's tag-wanted names the pull request's branch

The lead's ruling of 13:0x: the builder removes the tag when the branch ends, so it needs the branch.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:53:49 +01:00
parent 96b7eeeaf7
commit f32ea4ba75
5 changed files with 11 additions and 1 deletions
+2
View File
@@ -98,6 +98,8 @@ type VerdictHolderEvent struct {
// TagWantedHolderEvent is the body of the holder's event tag-wanted. // TagWantedHolderEvent is the body of the holder's event tag-wanted.
type TagWantedHolderEvent struct { type TagWantedHolderEvent struct {
// the pull request's branch: its tag is removed when the branch ends
Branch string `json:"branch"`
// its head // its head
Head string `json:"head"` Head string `json:"head"`
// the group member // the group member
@@ -19,7 +19,7 @@ func TestFixtures(t *testing.T) {
}{ }{
{name: "verdict on the checker's own family", subject: "mesh.mod.mesh-delivery-checker.event.verdict", given: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"out-of-step\":[\"go/seats/meshbroker/contract.go\"],\"pull\":3,\"repository\":\"novox/mesh-contracts\",\"verdict\":\"fail\"}", wire: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"out-of-step\":[\"go/seats/meshbroker/contract.go\"],\"pull\":3,\"repository\":\"novox/mesh-contracts\",\"verdict\":\"fail\"}", {name: "verdict on the checker's own family", subject: "mesh.mod.mesh-delivery-checker.event.verdict", given: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"out-of-step\":[\"go/seats/meshbroker/contract.go\"],\"pull\":3,\"repository\":\"novox/mesh-contracts\",\"verdict\":\"fail\"}", wire: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"out-of-step\":[\"go/seats/meshbroker/contract.go\"],\"pull\":3,\"repository\":\"novox/mesh-contracts\",\"verdict\":\"fail\"}",
decode: func(b []byte) (any, error) { var v VerdictHolderEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.verdict$")}, decode: func(b []byte) (any, error) { var v VerdictHolderEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.verdict$")},
{name: "tag-wanted on the checker's own family", subject: "mesh.mod.mesh-delivery-checker.event.tag-wanted", given: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"module\":\"mesh-sdk\",\"package\":\"go\",\"pull\":170,\"repository\":\"novox/mesh-sdk\",\"tag\":\"registry-1966\"}", wire: "{\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"module\":\"mesh-sdk\",\"package\":\"go\",\"pull\":170,\"repository\":\"novox/mesh-sdk\",\"tag\":\"registry-1966\"}", {name: "tag-wanted on the checker's own family", subject: "mesh.mod.mesh-delivery-checker.event.tag-wanted", given: "{\"branch\":\"feat/registry\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"module\":\"mesh-sdk\",\"package\":\"go\",\"pull\":170,\"repository\":\"novox/mesh-sdk\",\"tag\":\"registry-1966\"}", wire: "{\"branch\":\"feat/registry\",\"head\":\"cccccccccccccccccccccccccccccccccccccccc\",\"module\":\"mesh-sdk\",\"package\":\"go\",\"pull\":170,\"repository\":\"novox/mesh-sdk\",\"tag\":\"registry-1966\"}",
decode: func(b []byte) (any, error) { var v TagWantedHolderEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.tag-wanted$")}, decode: func(b []byte) (any, error) { var v TagWantedHolderEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.tag-wanted$")},
{name: "preview.written on the checker's stream", subject: "mesh.mod.mesh-delivery-checker.event.preview.written", given: "{}", wire: "{}", {name: "preview.written on the checker's stream", subject: "mesh.mod.mesh-delivery-checker.event.preview.written", given: "{}", wire: "{}",
decode: func(b []byte) (any, error) { var v map[string]any; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.preview\\.written$")}, decode: func(b []byte) (any, error) { var v map[string]any; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.mod\\.[a-z0-9-]+\\.event\\.preview\\.written$")},
@@ -21,6 +21,7 @@
"repository": "novox/mesh-sdk", "repository": "novox/mesh-sdk",
"pull": 170, "pull": 170,
"head": "cccccccccccccccccccccccccccccccccccccccc", "head": "cccccccccccccccccccccccccccccccccccccccc",
"branch": "feat/registry",
"module": "mesh-sdk", "module": "mesh-sdk",
"package": "go", "package": "go",
"tag": "registry-1966" "tag": "registry-1966"
+5
View File
@@ -179,6 +179,10 @@
"type": "string", "type": "string",
"description": "its head" "description": "its head"
}, },
"branch": {
"type": "string",
"description": "the pull request's branch: its tag is removed when the branch ends"
},
"module": { "module": {
"type": "string", "type": "string",
"description": "the group member" "description": "the group member"
@@ -195,6 +199,7 @@
"required": [ "required": [
"repository", "repository",
"head", "head",
"branch",
"module", "module",
"package" "package"
] ]
+2
View File
@@ -91,6 +91,8 @@ export interface VerdictHolderEvent {
/** is the body of the holder's event tag-wanted. */ /** is the body of the holder's event tag-wanted. */
export interface TagWantedHolderEvent { export interface TagWantedHolderEvent {
/** the pull request's branch: its tag is removed when the branch ends */
"branch": string;
/** its head */ /** its head */
"head": string; "head": string;
/** the group member */ /** the group member */