Builders, the artifact store's tools and distribution read and write the registry reference form through the registry clients' reference package, and name the sweep seat from its contract (ADR 0634 §4, S-8; issue 1966)
catalogue's SeatReference, InRegistrySeat, Routed, Recorded, InArtifactStore and ArtifactSweepSeat leave mesh-sdk; each package gives the two registry seats' names from their contracts (or the build step's copies of them). Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient"
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
artifactref "git.novox.be/novox/mesh-delivery/contracts/go/clients/containerimageregistryclient/reference"
|
||||
)
|
||||
|
||||
type memObjects map[string][]byte
|
||||
@@ -251,7 +251,7 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
|
||||
}
|
||||
// The reference's registry part is the seat's name, as a node-engine reads it back (ADR 0605 §9); nothing set on
|
||||
// the process names a reach.
|
||||
if seat, path, ok := catalogue.InRegistrySeat(b.said[0].body.Reference); !ok || seat != ArtifactSeat || path != "m/program@"+part.Digest {
|
||||
if seat, path, ok := registryForms.InRegistrySeat(b.said[0].body.Reference); !ok || seat != ArtifactSeat || path != "m/program@"+part.Digest {
|
||||
t.Errorf("the published reference %q is not the seat's form", b.said[0].body.Reference)
|
||||
}
|
||||
if len(b.h.Objects.(memObjects)) != 0 || len(b.h.Transfers.(memTransfers)) != 0 {
|
||||
@@ -910,3 +910,6 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// registryForms reads a reference of the registry form, with the two seats' names this holder answers for.
|
||||
var registryForms = artifactref.Seats{Image: ImageSeat, Object: ArtifactSeat}
|
||||
|
||||
@@ -146,7 +146,7 @@ type Store interface {
|
||||
}
|
||||
|
||||
// SeatReference is a reference in the form the seat answers (novox/hq ADR 0605 §9): the seat's name, then the path the
|
||||
// store answers (`<name>@sha256:<digest>`), as catalogue.InRegistrySeat reads it back. Nothing set on the process names
|
||||
// store answers (`<name>@sha256:<digest>`), as the registry clients' reference.Seats.InRegistrySeat reads it back. Nothing set on the process names
|
||||
// a reach: the seat's name is the registry part.
|
||||
func SeatReference(seat, path string) string { return seat + "/" + path }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user