From e436c5943054827d33af91a3031998c68e03eca1 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 11:40:07 +0100 Subject: [PATCH] Area 5 (join 11): a take-in's branch no longer stands in for a member's base Builds: design 47 G A-279 (answers G-22) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go | 2 +- modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin.go | 2 +- .../cmd/mesh-delivery-gate/takenin_test.go | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go index 70782a9f1..99edd8393 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go @@ -129,7 +129,7 @@ type RecordPull struct { State string `json:"state"` Commit string `json:"commit,omitempty"` Words string `json:"words,omitempty"` - // Base is the watched branch the pull request merged into (A-236), the branch of the take-in that took it in. + // Base is the pull request's base branch (A-279); the take-in's branch never stands in for it. Base string `json:"base,omitempty"` } diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin.go index e2771d212..de51c0257 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin.go @@ -60,7 +60,7 @@ func (h *Holder) TakenIn(body json.RawMessage) error { sort.Strings(g.Members) for _, m := range t.Merges { g.Pulls = append(g.Pulls, RecordPull{Repository: m.Repository, Number: int(m.Number), Head: heads[mdc.ApprovedKey(m.Repository, int(m.Number))], - State: string(mdc.MergeMerged), Commit: m.Merge, Base: t.Branch}) + State: string(mdc.MergeMerged), Commit: m.Merge}) } if err := h.Records.SetGroup(r, g); err != nil { return err diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin_test.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin_test.go index 9e2f65c48..543a183bf 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin_test.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/takenin_test.go @@ -74,13 +74,10 @@ func TestATakeInTakenOpensOneRecordAndMovesItsBranchsSource(t *testing.T) { len(r.Group.Members) != 1 || r.Group.Members[0] != "novox/app@3" || r.Group.Group != "feat" { t.Fatalf("the record %+v group %+v", r, r.Group) } - // A-188: the take-in's entries are in the record, each with its module; A-236: each member says its base. + // A-188: the take-in's entries are in the record, each with its module. if e, ok := r.Entries[EntryKey("app", "f", "")]; !ok || e.Module != "app" { t.Fatalf("the take-in's entries are not in the record: %+v", r.Entries) } - if ms := membersOf(r); len(ms) != 1 || ms[0].Base != "main" { - t.Fatalf("a group member names the branch it merged into: %+v", ms) - } if got := r.Outcomes[OutcomeKey("", "", "", "take-in")]; got.Outcome != OutcomeTakenIn { t.Fatalf("the take-in is not the record's outcome: %+v", r.Outcomes) }