SDK-2: the seat's reference form is a reader capability a node-engine states, form:seat-reference (ADR 0618 §1, ADR 0624 §1)

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
This commit is contained in:
2026-11-04 12:04:11 +01:00
parent 46baac8286
commit df5cef0a67
2 changed files with 16 additions and 1 deletions
+13
View File
@@ -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,
// `<seat>/<module>/<artifact>@sha256:<digest>` (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
}
+3 -1
View File
@@ -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)
}