From df5cef0a6769cca80f23d79682919e90ca7b7858 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 4 Nov 2026 12:04:11 +0100 Subject: [PATCH] =?UTF-8?q?SDK-2:=20the=20seat's=20reference=20form=20is?= =?UTF-8?q?=20a=20reader=20capability=20a=20node-engine=20states,=20form:s?= =?UTF-8?q?eat-reference=20(ADR=200618=20=C2=A71,=20ADR=200624=20=C2=A71)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit catalogue.ReferenceFormSeat joins ManifestReads, so the builder compares it with a node record's stated reads (A3's request 3); the older forms are the baseline's and the builder's to name (lead-47's delivery forms on feat/adr0618-reads, where FormRegistry's match must leave this form out when the two meet). Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig --- go/catalogue/manifest_reads.go | 13 +++++++++++++ go/catalogue/own_manifest_test.go | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/go/catalogue/manifest_reads.go b/go/catalogue/manifest_reads.go index e0d5851..8da9384 100644 --- a/go/catalogue/manifest_reads.go +++ b/go/catalogue/manifest_reads.go @@ -37,6 +37,16 @@ const ( var referenceForms = []string{"access", "backup", "bound", "collected", "config", "consumer", "consumers", "contribution", "dir", "machine", "port", "seat", "secret", "setting"} +// ReferenceFormSeat names the reference form a registry seat answers for a build's artifact, +// `//@sha256:` (novox/hq ADR 0605 §9; InRegistrySeat), as the reader capability +// `form:seat-reference` a node-engine built with this contract states (ADR 0618 §1, ADR 0624 §1): the builder writes it +// into a build key only for the nodes whose engines state it. The older reference forms a node-engine read before any +// stated what it reads are the baseline's; they are the builder's to name (delivery's artifact forms). +const ReferenceFormSeat = "seat-reference" + +// artifactReferenceForms are the reference forms of a build's artifacts this contract reads beyond the baseline's. +var artifactReferenceForms = []string{ReferenceFormSeat} + // manifestTopWords are the top-level keys Manifest.UnmarshalJSON reads apart from the fields of manifestFields: each // read whole, its inside a map of the module's own names (requirements, local names) and values, no words of the // contract's beneath it. `requires` and `config` are read as their fields are (manifestNeeds). @@ -60,6 +70,9 @@ func ManifestReads() []string { for _, f := range referenceForms { set[ReadForm+f] = true } + for _, f := range artifactReferenceForms { + set[ReadForm+f] = true + } for _, s := range DefaultSeats() { set[ReadSeat+s.Name] = true } diff --git a/go/catalogue/own_manifest_test.go b/go/catalogue/own_manifest_test.go index fda8140..b509c86 100644 --- a/go/catalogue/own_manifest_test.go +++ b/go/catalogue/own_manifest_test.go @@ -42,7 +42,9 @@ func TestOwnManifestUsesNoWordTheRunningControllerRefuses(t *testing.T) { t.Errorf("the baseline's %s is no reader capability of this contract", b) } } - for _, want := range []string{"word:tool-runner", "word:core-credentials", "word:bus-state", "word:bus-state.storage"} { + for _, want := range []string{"word:tool-runner", "word:core-credentials", "word:bus-state", "word:bus-state.storage", + // The reference form a registry seat answers (ADR 0605 §9), and the seats the registry milestone adds. + ReadForm + ReferenceFormSeat, "seat:go-package-registry", "seat:container-image-registry", "seat:oci-artifact-registry"} { if !slices.Contains(added, want) { t.Errorf("%s is in the baseline, or not read: added since it are %v", want, added) }