Peerless + New Argo

This commit is contained in:
mr
2026-03-24 12:49:37 +01:00
parent 211339947c
commit 6d0c78946e
13 changed files with 208 additions and 3 deletions

View File

@@ -68,6 +68,13 @@ func NewDataInstance(name string, peerID string) ResourceInstanceITF {
}
func (ri *DataInstance) StoreDraftDefault() {
// Enforce peerless invariant: a public-origin instance cannot have peer ownership.
if ri.Origin.Ref != "" && (ri.CreatorID != "" || len(ri.Partnerships) > 0) {
// Strip partnerships and creator: the structural invariant wins.
// Origin.Ref presence is the authoritative signal that this is peerless.
ri.CreatorID = ""
ri.Partnerships = nil
}
found := false
for _, p := range ri.ResourceInstance.Env {
if p.Attr == "source" {