From 3747b5f78c74a63b20b2efcc9a90f7629e87f5c2 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 03:06:59 +0100 Subject: [PATCH] RR2-3: the manifest reader reads an artifact's calls and states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mesh-sdk's own manifest names the capability words its packages call, and the tool runner's artifact the words it states; the running reader refused both manifests on the unknown word. Builds: design 47 G §621, §605, §545 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- go/catalogue/manifest.go | 10 ++++++++++ go/catalogue/reader_release_test.go | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/go/catalogue/manifest.go b/go/catalogue/manifest.go index 5d501f9..ec6f765 100644 --- a/go/catalogue/manifest.go +++ b/go/catalogue/manifest.go @@ -1246,6 +1246,16 @@ type Artifact struct { // release keeps a manifest that names them whole (design 47 G §340, §409); the manifest validator checks their form. Needs []string `json:"needs,omitempty"` + // Calls are the capability words (design 47 G §488, §605) a package's code calls of the tool runner: the delivery plan + // derives, for each module whose build resolved a version of such a package, an ordering edge to the module whose + // artifact States the word. Read here so the second reader release keeps a manifest that names them (§621). + Calls []string `json:"calls,omitempty"` + + // States are the capability words (design 47 G §488) the tool runner's artifact states, the edge of a package's Calls + // running to the module that states each (§545). Read here so the second reader release keeps a manifest that names + // them (§621). + States []string `json:"states,omitempty"` + // GeneratedFrom marks a package of a contracts module (novox/hq ADR 0608 §5, design 26 *Contracts modules*): the // directory, relative to the module's, of the seat definitions every file of the package is generated from. A // module carrying it holds contracts only and claims no seat, which the judge refuses naming the seat; the build diff --git a/go/catalogue/reader_release_test.go b/go/catalogue/reader_release_test.go index 93d0912..a52ba46 100644 --- a/go/catalogue/reader_release_test.go +++ b/go/catalogue/reader_release_test.go @@ -36,6 +36,13 @@ func TestTheSecondReaderReleaseReadsGsManifestWords(t *testing.T) { check: func(m Manifest) bool { return m.State[0].MaxMiB == 0 && m.State[1].MaxMiB == 256 }}, {name: "a state's cap out of the objects section's bounds (§469)", raw: `{"module":"m","version":"1.0","state":[{"name":"pipelines","max-mib":0}]}`, refused: "max-mib is between 1 and 8192"}, + {name: "a package's calls and the tool runner's states (§605, §545)", + raw: `{"module":"m","version":"1.0","build":{"artifacts":[{"name":"go","kind":"package","language":"go","calls":["put-sessions"]},` + + `{"name":"runtime","kind":"bundle","language":"go","states":["put-sessions","finding-calls"]}]}}`, + check: func(m Manifest) bool { + a := m.Build.Artifacts + return len(a) == 2 && len(a[0].Calls) == 1 && a[0].Calls[0] == "put-sessions" && len(a[1].States) == 2 + }}, } { m, err := decodeForTest([]byte(c.raw)) switch {