gitea: the package seats take a publish with a digest and no parts (held says published, else refused not stored)

The builder's publish again sends version and digest and no parts; the package seats refused it as not one part.
Both registry holders now run the publish conformance cases.

Builds: design 47 G A-73, A-417, A-490

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
2026-11-19 16:51:10 +01:00
parent 282758456c
commit 5dfb357333
4 changed files with 83 additions and 4 deletions
@@ -18,6 +18,7 @@ import (
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient"
artifactref "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/clients/containerimageregistryclient/reference"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/publishconformance"
)
type memObjects map[string][]byte
@@ -666,6 +667,22 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) {
}
}
})
// Design 47 G A-490: the publish contract's no-parts form, as every publish holder is held to it.
t.Run("the publish conformance cases", func(t *testing.T) {
publishconformance.Run(t, func(t *testing.T) publishconformance.Bed {
b := newBed(true)
return publishconformance.Bed{
Hold: func() { b.store.has[publishconformance.Digest] = true },
Publish: func(name, version, digest string) publishconformance.Outcome {
got, err := b.h.Publish(ArtifactSeat, builder, PublishRequest{Name: name, Version: version, Kind: KindBundle, Digest: digest, Transfer: "t"})
o := publishconformance.Outcome{Ended: got.Ended, Lacks: len(got.Missing), Err: err}
if len(b.said) > 0 {
o.Event, o.Reason = b.said[len(b.said)-1].event, b.said[len(b.said)-1].body.Reason
}
return o
}}
})
})
t.Run("a publish with a version and no parts tags the held digest at the store's size; one not held is not stored", func(t *testing.T) {
// Design 47 G A-417, A-73, A-50: the build stored the bundle untagged; the builder's publish of its version with that
// digest and no parts tags it and says published, nothing sent; a digest the store holds none of is refused as not