From 181dd3263d99cfd6676556e5593a0ff6133a1856 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 11:35:10 +0100 Subject: [PATCH] G A-230: the seat mesh-recovery's restore point says names, the bus names it took MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Point gains names, one per bus object as Aside's (required, at least one), regenerated with seatgen; the kept-points fixture names its point's bus name, so the fixture test fails without the field. Builds: design 47 G A-230, §554, §565 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- go/seats/meshrecovery/contract.go | 2 ++ go/seats/meshrecovery/contract_test.go | 2 +- seats/mesh-recovery/fixtures/verbs.json | 3 +++ seats/mesh-recovery/seat.json | 11 ++++++++++- ts/seats/meshrecovery/index.d.ts | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/go/seats/meshrecovery/contract.go b/go/seats/meshrecovery/contract.go index ecc32b3..e028a54 100644 --- a/go/seats/meshrecovery/contract.go +++ b/go/seats/meshrecovery/contract.go @@ -165,6 +165,8 @@ type Point struct { Kept string `json:"kept"` // the module Module string `json:"module"` + // the bus names it took, one per bus object (design 47 G A-230) + Names []string `json:"names"` // its bytes Size int64 `json:"size"` // the point's name, also its directory's diff --git a/go/seats/meshrecovery/contract_test.go b/go/seats/meshrecovery/contract_test.go index 7f8e825..8111f7e 100644 --- a/go/seats/meshrecovery/contract_test.go +++ b/go/seats/meshrecovery/contract_test.go @@ -45,7 +45,7 @@ func TestFixtures(t *testing.T) { decode: func(b []byte) (any, error) { var v RestoreKeptInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "restore-kept answers an error naming why", subject: "", given: "{\"error\":\"aside-only is the operator's hand tool alone\"}", wire: "{\"error\":\"aside-only is the operator's hand tool alone\"}", decode: func(b []byte) (any, error) { var v RestoreKeptAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, - {name: "kept-points lists a point, an aside and the act that runs", subject: "", given: "{\"asides\":[{\"id\":\"20261111T121200Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":4096}],\"points\":[{\"at\":\"2026-11-11T10:00:00Z\",\"catch-up\":{\"tool\":\"knowledge_catch_up\"},\"consumers\":[{\"name\":\"c1\",\"sequence\":42,\"stream\":\"KV_x\"}],\"digests\":[{\"digest\":\"sha256:00\",\"name\":\"KV_x\"}],\"fingerprint\":\"0123456789ab\",\"form\":2,\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"size\":2048,\"snapshot\":\"2-0123456789ab\"}],\"running\":{\"act\":\"a-1\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"waiting on the dump\",\"waits-on\":\"item-ended of the bus item\"},\"unrestored\":[{\"id\":\"20261110T080000Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":1024}]}", wire: "{\"asides\":[{\"id\":\"20261111T121200Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":4096}],\"points\":[{\"at\":\"2026-11-11T10:00:00Z\",\"catch-up\":{\"tool\":\"knowledge_catch_up\"},\"consumers\":[{\"name\":\"c1\",\"sequence\":42,\"stream\":\"KV_x\"}],\"digests\":[{\"digest\":\"sha256:00\",\"name\":\"KV_x\"}],\"fingerprint\":\"0123456789ab\",\"form\":2,\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"size\":2048,\"snapshot\":\"2-0123456789ab\"}],\"running\":{\"act\":\"a-1\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"waiting on the dump\",\"waits-on\":\"item-ended of the bus item\"},\"unrestored\":[{\"id\":\"20261110T080000Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":1024}]}", + {name: "kept-points lists a point, an aside and the act that runs", subject: "", given: "{\"asides\":[{\"id\":\"20261111T121200Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":4096}],\"points\":[{\"at\":\"2026-11-11T10:00:00Z\",\"catch-up\":{\"tool\":\"knowledge_catch_up\"},\"consumers\":[{\"name\":\"c1\",\"sequence\":42,\"stream\":\"KV_x\"}],\"digests\":[{\"digest\":\"sha256:00\",\"name\":\"KV_x\"}],\"fingerprint\":\"0123456789ab\",\"form\":2,\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":2048,\"snapshot\":\"2-0123456789ab\"}],\"running\":{\"act\":\"a-1\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"waiting on the dump\",\"waits-on\":\"item-ended of the bus item\"},\"unrestored\":[{\"id\":\"20261110T080000Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":1024}]}", wire: "{\"asides\":[{\"id\":\"20261111T121200Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":4096}],\"points\":[{\"at\":\"2026-11-11T10:00:00Z\",\"catch-up\":{\"tool\":\"knowledge_catch_up\"},\"consumers\":[{\"name\":\"c1\",\"sequence\":42,\"stream\":\"KV_x\"}],\"digests\":[{\"digest\":\"sha256:00\",\"name\":\"KV_x\"}],\"fingerprint\":\"0123456789ab\",\"form\":2,\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":2048,\"snapshot\":\"2-0123456789ab\"}],\"running\":{\"act\":\"a-1\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"waiting on the dump\",\"waits-on\":\"item-ended of the bus item\"},\"unrestored\":[{\"id\":\"20261110T080000Z\",\"names\":[\"mesh-knowledge_ledger\"],\"size\":1024}]}", decode: func(b []byte) (any, error) { var v KeptPointsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "restore-aside names the aside", subject: "", given: "{\"asker\":\"operator@workstation\",\"id\":\"20261111T121200Z\",\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"why\":\"an aside left at removed\"}", wire: "{\"asker\":\"operator@workstation\",\"id\":\"20261111T121200Z\",\"kept\":\"ledger\",\"module\":\"mesh-knowledge\",\"why\":\"an aside left at removed\"}", decode: func(b []byte) (any, error) { var v RestoreAsideInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, diff --git a/seats/mesh-recovery/fixtures/verbs.json b/seats/mesh-recovery/fixtures/verbs.json index 4120766..66fa8f6 100644 --- a/seats/mesh-recovery/fixtures/verbs.json +++ b/seats/mesh-recovery/fixtures/verbs.json @@ -78,6 +78,9 @@ "name": "KV_x", "digest": "sha256:00" } + ], + "names": [ + "mesh-knowledge_ledger" ] } ], diff --git a/seats/mesh-recovery/seat.json b/seats/mesh-recovery/seat.json index 78e88a9..6b7546d 100644 --- a/seats/mesh-recovery/seat.json +++ b/seats/mesh-recovery/seat.json @@ -1080,6 +1080,14 @@ "$ref": "#/defs/Digest" }, "description": "the digest of each object's bytes, checked before a restore (design 47 G 567)" + }, + "names": { + "type": "array", + "description": "the bus names it took, one per bus object (design 47 G A-230)", + "items": { + "type": "string" + }, + "minItems": 1 } }, "required": [ @@ -1089,7 +1097,8 @@ "fingerprint", "snapshot", "size", - "at" + "at", + "names" ] }, "Aside": { diff --git a/ts/seats/meshrecovery/index.d.ts b/ts/seats/meshrecovery/index.d.ts index df35b04..a7b4310 100644 --- a/ts/seats/meshrecovery/index.d.ts +++ b/ts/seats/meshrecovery/index.d.ts @@ -115,6 +115,8 @@ export interface Point { "kept": string; /** the module */ "module": string; + /** the bus names it took, one per bus object (design 47 G A-230) */ + "names": string[]; /** its bytes */ "size": number; /** the point's name, also its directory's */