Node build module: a bundle's publish carries the version the ask reserved

Every bundle was published with an empty version, a by-digest publish, so
the builder never saw package-published and the bundle was not marked
against its reservation.

Builds: design 47 H H-A-372
This commit is contained in:
2026-11-21 23:38:37 +01:00
parent 02371b32de
commit ebf4d9896b
2 changed files with 11 additions and 4 deletions
@@ -94,11 +94,14 @@ func archiveOf(t *testing.T, r BuildResult) []byte {
}
// 1587-S6 (ADR 0498 §1; CAT-BN3): a done bundle is published through oci-artifact-registry and answers the seat's
// reference of its archive, under the manifest's module.
// reference of its archive, under the manifest's module. Its publish names the version the ask reserved, so the bundle
// is marked against its reservation (design 47 H, H-A-372).
func TestADoneBundleAnswersTheReferenceOfTheArchiveItPushed(t *testing.T) {
m, _, _ := builtMachine(t, ``)
store := withStore(t, m)
out, err := m.build(context.Background(), buildArgs())
args := buildArgs()
args["version"] = "1.4.3"
out, err := m.build(context.Background(), args)
if err != nil {
t.Fatal(err)
}
@@ -109,6 +112,9 @@ func TestADoneBundleAnswersTheReferenceOfTheArchiveItPushed(t *testing.T) {
if store.blobs["m/tools@"+r.Digest] == nil || len(store.seats) != 1 || store.seats[0] != steprun.ArtifactSeat {
t.Errorf("the holder holds %d files through %v, not m/tools@%s through %s", len(store.blobs), store.seats, r.Digest, steprun.ArtifactSeat)
}
if len(store.published) != 1 || store.published[0].Version != "1.4.3" {
t.Errorf("the bundle was published as %+v, want the ask's version 1.4.3", store.published)
}
}
// 1587-S7 and S8 (ADR 0498 §2, the lead's decision L9): a publish the holder refuses fails the step `not stored: