From fd2ae834310bd6028e685f8bcaa4e1d7e3993cd9 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 22 Oct 2026 18:00:02 +0200 Subject: [PATCH] =?UTF-8?q?Name=20the=20error=20of=20a=20fetch=20whose=20l?= =?UTF-8?q?ock=20waits=20for=20an=20unpublished=20package=20(issue=201587,?= =?UTF-8?q?=20ADR=200500=20=C2=A76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit waits for: is the prefix the builder turns into a queued key with Waits; it is not one of the errors held until the fingerprint changes. --- go/delivery/builder.go | 3 +++ go/delivery/builder_reference_test.go | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/go/delivery/builder.go b/go/delivery/builder.go index 51d6d17..47bcab7 100644 --- a/go/delivery/builder.go +++ b/go/delivery/builder.go @@ -147,6 +147,9 @@ const ( VersionTaken = "version taken: " // RefusedKind: no build module builds this kind of artifact in its language. RefusedKind = "refused kind: " + // WaitsFor: a fetch found the module's lock naming a package version the registry does not hold yet; the builder + // writes the key queued with Waits (novox/hq ADR 0500 clause 6), and it is built once the package is published. + WaitsFor = "waits for: " ) // FailedUntilChanged says whether a failed key's error is one that is not built again until the module's fingerprint diff --git a/go/delivery/builder_reference_test.go b/go/delivery/builder_reference_test.go index cbe206d..4a0dd3c 100644 --- a/go/delivery/builder_reference_test.go +++ b/go/delivery/builder_reference_test.go @@ -133,3 +133,11 @@ func TestADoneKeyWithNoArtifactIsReferenced(t *testing.T) { t.Fatalf("Referenced = %v, %v; want true", ok, missing) } } + +// A Node fetch that finds the lock naming a package version the registry does not hold fails with WaitsFor; the +// builder then writes the key queued with Waits, and the error is not one that waits for the fingerprint to change. +func TestWaitsForIsAPrefixThatIsBuiltAgain(t *testing.T) { + if WaitsFor != "waits for: " || FailedUntilChanged(WaitsFor+"@novox/mesh-sdk@0.1.15") { + t.Fatalf("WaitsFor = %q", WaitsFor) + } +}