C1 node-engine-word: directory-contents-owner joins the seat node-engine's ManifestReadWord, form stays

The word names the engine's read of a declared directory's contents owner; a fixture row reads it back in a manifest-reads answer.

Builds: design 47 H2 H-A-622, H-A-640
This commit is contained in:
2026-11-25 17:06:01 +01:00
parent 52e522493c
commit 82c532c071
5 changed files with 23 additions and 6 deletions
+3 -2
View File
@@ -748,12 +748,13 @@ type LoginFallback struct {
Why string `json:"why"`
}
// ManifestReadWord is the word a node-engine states in manifest-reads when it reads a want by version and not by digests (design 47 H 772, H-A-45); the assigner holds a node whose engine does not state it. Other words in manifest-reads are free.
// ManifestReadWord is a word a node-engine states in manifest-reads: want:version when it reads a want by version and not by digests (design 47 H 772, H-A-45); directory-contents-owner when it sets the owner of a declared directory's contents (design 47 H2, H-A-622, H-A-640). The assigner holds a node whose engine does not state the word it needs. Other words in manifest-reads are free.
type ManifestReadWord = string
// The values of ManifestReadWord.
const (
ManifestReadWordWantVersion = "want:version"
ManifestReadWordWantVersion = "want:version"
ManifestReadWordDirectoryContentsOwner = "directory-contents-owner"
)
// ManifestReadsChanged is what a node-engine says when what it reads changed or its node returned (ADR 0618 §4).
+2
View File
@@ -99,6 +99,8 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v BoundsByWhatIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "manifest-reads answers what the engine reads and when it stated it", subject: "", given: "{\"manifest-reads\":[\"form:seat-reference\",\"word:series\"],\"node\":\"ace\",\"stated-at\":\"2026-11-04T10:00:00Z\",\"v\":1}", wire: "{\"manifest-reads\":[\"form:seat-reference\",\"word:series\"],\"node\":\"ace\",\"stated-at\":\"2026-11-04T10:00:00Z\",\"v\":1}",
decode: func(b []byte) (any, error) { var v ManifestReadsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "manifest-reads names the words want:version and directory-contents-owner", subject: "", given: "{\"manifest-reads\":[\"want:version\",\"directory-contents-owner\"],\"node\":\"ace\",\"stated-at\":\"2026-11-25T10:00:00Z\",\"v\":1}", wire: "{\"manifest-reads\":[\"want:version\",\"directory-contents-owner\"],\"node\":\"ace\",\"stated-at\":\"2026-11-25T10:00:00Z\",\"v\":1}",
decode: func(b []byte) (any, error) { var v ManifestReadsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "manifest-reads of an engine built before it said them is the baseline", subject: "", given: "{\"node\":\"g14\",\"stated-at\":\"2026-11-04T10:05:00Z\",\"v\":1}", wire: "{\"node\":\"g14\",\"stated-at\":\"2026-11-04T10:05:00Z\",\"v\":1}",
decode: func(b []byte) (any, error) { var v ManifestReadsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "compose-candidate asks the candidate and, as a boolean, its composition input", subject: "", given: "{\"candidate\":\"mesh-host.0123abcd\",\"input\":true}", wire: "{\"candidate\":\"mesh-host.0123abcd\",\"input\":true}",
+13
View File
@@ -12,6 +12,19 @@
"stated-at": "2026-11-04T10:00:00Z"
}
},
{
"name": "manifest-reads names the words want:version and directory-contents-owner",
"of": "verb:manifest-reads.answer",
"given": {
"v": 1,
"node": "ace",
"manifest-reads": [
"want:version",
"directory-contents-owner"
],
"stated-at": "2026-11-25T10:00:00Z"
}
},
{
"name": "manifest-reads of an engine built before it said them is the baseline",
"of": "verb:manifest-reads.answer",
+3 -2
View File
@@ -2082,9 +2082,10 @@
"ManifestReadWord": {
"type": "string",
"enum": [
"want:version"
"want:version",
"directory-contents-owner"
],
"description": "the word a node-engine states in manifest-reads when it reads a want by version and not by digests (design 47 H 772, H-A-45); the assigner holds a node whose engine does not state it. Other words in manifest-reads are free"
"description": "a word a node-engine states in manifest-reads: want:version when it reads a want by version and not by digests (design 47 H 772, H-A-45); directory-contents-owner when it sets the owner of a declared directory's contents (design 47 H2, H-A-622, H-A-640). The assigner holds a node whose engine does not state the word it needs. Other words in manifest-reads are free"
},
"ManifestReadsChanged": {
"type": "object",
+2 -2
View File
@@ -409,8 +409,8 @@ export interface LoginFallback {
"why": string;
}
/** the word a node-engine states in manifest-reads when it reads a want by version and not by digests (design 47 H 772, H-A-45); the assigner holds a node whose engine does not state it. Other words in manifest-reads are free */
export type ManifestReadWord = "want:version";
/** a word a node-engine states in manifest-reads: want:version when it reads a want by version and not by digests (design 47 H 772, H-A-45); directory-contents-owner when it sets the owner of a declared directory's contents (design 47 H2, H-A-622, H-A-640). The assigner holds a node whose engine does not state the word it needs. Other words in manifest-reads are free */
export type ManifestReadWord = "want:version" | "directory-contents-owner";
/** what a node-engine says when what it reads changed or its node returned (ADR 0618 §4) */
export interface ManifestReadsChanged {