O-2: C-S3, C-S5: stateobjects.Values over a bundle's runtime, values of any size, a replace removes the object it replaced, a deleted key leaves its object listed key-gone (milestone 47/G, issue 1966, ADR 0666 section 16)

The runtime's channel carries 16 MiB a message, so a value over the 8 MiB a put takes is split over objects (Ref.Parts).

Builds: design 47 G §57, §138

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 10:51:06 +01:00
parent b1391867a8
commit 7863970251
5 changed files with 804 additions and 1 deletions
+4 -1
View File
@@ -27,6 +27,9 @@ type Ref struct {
Object string `json:"object"`
// Size is the object's size in bytes.
Size int64 `json:"size"`
// Parts is how many objects the bytes are split over, named `<Object>.<n>` from 0, when the store takes no object as
// large as the value (a bundle's runtime carries a message of 16 MiB); zero is one object named Object.
Parts int `json:"parts,omitempty"`
// Digest is the hex SHA-256 of the object's bytes; a reader checks it after the read.
Digest string `json:"sha256"`
// Form is FormVersion.
@@ -34,7 +37,7 @@ type Ref struct {
}
func (r Ref) valid() bool {
if r.Store == "" || r.Object == "" || r.Size < 0 || r.Form != FormVersion || len(r.Digest) != 64 {
if r.Store == "" || r.Object == "" || r.Size < 0 || r.Parts < 0 || r.Form != FormVersion || len(r.Digest) != 64 {
return false
}
_, err := hex.DecodeString(r.Digest)