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
This commit is contained in:
2026-11-12 11:40:07 +01:00
parent fe56de746e
commit e436c59430
3 changed files with 3 additions and 6 deletions
@@ -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"`
}
@@ -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
@@ -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)
}