diff --git a/cmd/bd/mol_bond.go b/cmd/bd/mol_bond.go index 1778d66c..58cf334a 100644 --- a/cmd/bd/mol_bond.go +++ b/cmd/bd/mol_bond.go @@ -317,8 +317,8 @@ func bondProtoProto(ctx context.Context, s storage.Storage, protoA, protoB *type Priority: minPriority(protoA.Priority, protoB.Priority), IssueType: types.TypeEpic, BondedFrom: []types.BondRef{ - {ProtoID: protoA.ID, BondType: bondType, BondPoint: ""}, - {ProtoID: protoB.ID, BondType: bondType, BondPoint: ""}, + {SourceID: protoA.ID, BondType: bondType, BondPoint: ""}, + {SourceID: protoB.ID, BondType: bondType, BondPoint: ""}, }, } if err := tx.CreateIssue(ctx, compound, actorName); err != nil { diff --git a/internal/types/types.go b/internal/types/types.go index e4da27a9..a4d9d100 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -128,7 +128,7 @@ func (i *Issue) ComputeContentHash() string { // Bonded molecules for _, br := range i.BondedFrom { - w.str(br.ProtoID) + w.str(br.SourceID) w.str(br.BondType) w.str(br.BondPoint) } @@ -795,7 +795,7 @@ type EpicStatus struct { // When protos or molecules are bonded together, BondRefs record // which sources were combined and how they were attached. type BondRef struct { - ProtoID string `json:"proto_id"` // Source proto/molecule ID + SourceID string `json:"source_id"` // Source proto or molecule ID BondType string `json:"bond_type"` // sequential, parallel, conditional BondPoint string `json:"bond_point,omitempty"` // Attachment site (issue ID or empty for root) } diff --git a/internal/types/types_test.go b/internal/types/types_test.go index 87b11cb5..40906aea 100644 --- a/internal/types/types_test.go +++ b/internal/types/types_test.go @@ -464,12 +464,12 @@ func TestIssueCompoundHelpers(t *testing.T) { t.Fatalf("expected nil constituents for non-compound issue") } - bonded := &Issue{BondedFrom: []BondRef{{ProtoID: "proto-1", BondType: BondTypeSequential}}} + bonded := &Issue{BondedFrom: []BondRef{{SourceID: "proto-1", BondType: BondTypeSequential}}} if !bonded.IsCompound() { t.Fatalf("issue with bonded refs should be compound") } refs := bonded.GetConstituents() - if len(refs) != 1 || refs[0].ProtoID != "proto-1" { + if len(refs) != 1 || refs[0].SourceID != "proto-1" { t.Fatalf("unexpected constituents: %#v", refs) } }