G M-8: an artifact takes calls, and mesh-sdk's package artifacts name the capability words their code calls
Go: finding-calls, ledger-upkeep-calls, put-sessions, sent-objects-calls; npm: finding-calls. Builds: design 47 G §605, §622, §488 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -1246,6 +1246,12 @@ 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 tool runner stating
|
||||
// those words on each node, so no manifest names the tool runner's module. Said on a package only; the manifest
|
||||
// validator checks their form.
|
||||
Calls []string `json:"calls,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
|
||||
|
||||
@@ -9,7 +9,8 @@ func TestTheReaderReleaseReadsTheManifestWordsGWrites(t *testing.T) {
|
||||
m, err := decodeForTest([]byte(`{"module":"mesh-watcher","version":"1.4","needs-approval":["restart","node-engine.composition","finding-written"],` +
|
||||
`"consumes":["*.finding-written","mesh-conditions.findings-asked"],` +
|
||||
`"streams":[{"name":"mesh-watcher-findings","events":["finding-written","finding-cleared","findings-stated"],"max-age-days":7,"max-mib":16}],` +
|
||||
`"build":{"artifacts":[{"name":"program","kind":"bundle","language":"go","needs":["mesh-grants:program","node-tools:runtime"]}]}}`))
|
||||
`"build":{"artifacts":[{"name":"program","kind":"bundle","language":"go","needs":["mesh-grants:program","node-tools:runtime"]},` +
|
||||
`{"name":"go","kind":"package","language":"go","calls":["put-sessions","finding-calls"]}]}}`))
|
||||
if err != nil {
|
||||
t.Fatalf("a manifest with G's words was refused: %v", err)
|
||||
}
|
||||
@@ -17,7 +18,8 @@ func TestTheReaderReleaseReadsTheManifestWordsGWrites(t *testing.T) {
|
||||
t.Fatalf("a word was set aside: %v (needs-approval %v)", m.UnknownField(), m.NeedsApproval)
|
||||
}
|
||||
if m.Version != "1.4" || m.Consumes[0] != "*.finding-written" || m.Streams[0].Name != "mesh-watcher-findings" ||
|
||||
len(m.Build.Artifacts[0].Needs) != 2 || m.Build.Artifacts[0].Needs[0] != "mesh-grants:program" {
|
||||
len(m.Build.Artifacts[0].Needs) != 2 || m.Build.Artifacts[0].Needs[0] != "mesh-grants:program" ||
|
||||
len(m.Build.Artifacts[1].Calls) != 2 || m.Build.Artifacts[1].Calls[0] != "put-sessions" {
|
||||
t.Fatalf("read as %+v", m)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
"slug": "sdk",
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{ "name": "lib", "kind": "package", "language": "typescript" },
|
||||
{ "name": "go", "kind": "package", "language": "go", "paths": ["go"] }
|
||||
{ "name": "lib", "kind": "package", "language": "typescript", "calls": ["finding-calls"] },
|
||||
{ "name": "go", "kind": "package", "language": "go", "paths": ["go"], "calls": ["finding-calls", "ledger-upkeep-calls", "put-sessions", "sent-objects-calls"] }
|
||||
]
|
||||
},
|
||||
"resources": []
|
||||
|
||||
Reference in New Issue
Block a user