SD-M2a: a publish-part chunk is at most 760 KiB, so its message stays under the bus's 1 MiB with its fields

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:26:44 +01:00
parent 5b4239e6d9
commit 88972faf08
5 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ type PublishAnswer struct {
// PublishPartInput is what publish-part takes.
type PublishPartInput struct {
// the chunk's bytes, base64 (at most 768 KiB before encoding)
// the chunk's bytes, base64 (at most 760 KiB before encoding)
Data string `json:"data"`
// this chunk is the part's last
Last bool `json:"last"`
+8 -8
View File
@@ -386,8 +386,8 @@ func List() []Seat {
{Name: "publish", Description: "Open a transfer, naming the artifact and the digest of every part; answers the digests the holder lacks, which the caller then sends by publish-part. A transfer already open answers the parts held, so a cut transfer goes on from there. With no parts and a version, the held digest is published under that version and nothing is stored (the trunk's claim).",
Input: map[string]any{"properties": map[string]any{"commit": map[string]any{"description": "the source commit it was built from", "type": "string"}, "digest": map[string]any{"description": "its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record)", "type": "string"}, "fingerprint": map[string]any{"description": "the build's fingerprint", "type": "string"}, "kind": map[string]any{"description": "what it is", "enum": []string{"package", "image", "bundle", "archive", "upstream"}, "type": "string"}, "name": map[string]any{"description": "the package's, image's, bundle's or archive's name", "type": "string"}, "parts": map[string]any{"description": "every part's digest and size; none when the digest is already held", "items": map[string]any{"description": "one part of a transfer", "properties": map[string]any{"digest": map[string]any{"description": "the part's digest, sha256:<hex>: an image's layer or config, a package's file, a bundle's blob", "type": "string"}, "size": map[string]any{"description": "its size in bytes", "type": "integer"}}, "required": []string{"digest", "size"}, "type": "object"}, "type": "array"}, "tag": map[string]any{"description": "the tag it carries, for a tagged version", "type": "string"}, "transfer": map[string]any{"description": "the transfer's name, the caller's own; the same name opens the same transfer again", "type": "string"}, "version": map[string]any{"description": "the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone", "type": "string"}}, "required": []string{"transfer", "name", "kind", "digest"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"held": map[string]any{"description": "the digest is held already: nothing to send; the outcome follows as an event", "type": "boolean"}, "lacks": map[string]any{"description": "the digests of the parts the holder lacks, to send by publish-part", "items": map[string]any{"type": "string"}, "type": "array"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer"}, "type": "object"}},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"complete": map[string]any{"description": "the part is whole and its bytes match its digest", "type": "boolean"}, "part": map[string]any{"description": "the part", "type": "string"}, "received": map[string]any{"description": "the chunks of the part held so far", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part"}, "type": "object"}},
{Name: "versions", Description: "The versions the seat holds of one name, newest first: each one's version, tag, digest, kind and when it was published.",
Input: map[string]any{"properties": map[string]any{"kind": map[string]any{"description": "narrowed to one kind (optional)", "type": "string"}, "name": map[string]any{"description": "the name", "type": "string"}}, "required": []string{"name"}, "type": "object"},
@@ -401,8 +401,8 @@ func List() []Seat {
{Name: "publish", Description: "Open a transfer, naming the artifact and the digest of every part; answers the digests the holder lacks, which the caller then sends by publish-part. A transfer already open answers the parts held, so a cut transfer goes on from there. With no parts and a version, the held digest is published under that version and nothing is stored (the trunk's claim).",
Input: map[string]any{"properties": map[string]any{"commit": map[string]any{"description": "the source commit it was built from", "type": "string"}, "digest": map[string]any{"description": "its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record)", "type": "string"}, "fingerprint": map[string]any{"description": "the build's fingerprint", "type": "string"}, "kind": map[string]any{"description": "what it is", "enum": []string{"package", "image", "bundle", "archive", "upstream"}, "type": "string"}, "name": map[string]any{"description": "the package's, image's, bundle's or archive's name", "type": "string"}, "parts": map[string]any{"description": "every part's digest and size; none when the digest is already held", "items": map[string]any{"description": "one part of a transfer", "properties": map[string]any{"digest": map[string]any{"description": "the part's digest, sha256:<hex>: an image's layer or config, a package's file, a bundle's blob", "type": "string"}, "size": map[string]any{"description": "its size in bytes", "type": "integer"}}, "required": []string{"digest", "size"}, "type": "object"}, "type": "array"}, "tag": map[string]any{"description": "the tag it carries, for a tagged version", "type": "string"}, "transfer": map[string]any{"description": "the transfer's name, the caller's own; the same name opens the same transfer again", "type": "string"}, "version": map[string]any{"description": "the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone", "type": "string"}}, "required": []string{"transfer", "name", "kind", "digest"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"held": map[string]any{"description": "the digest is held already: nothing to send; the outcome follows as an event", "type": "boolean"}, "lacks": map[string]any{"description": "the digests of the parts the holder lacks, to send by publish-part", "items": map[string]any{"type": "string"}, "type": "array"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer"}, "type": "object"}},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"complete": map[string]any{"description": "the part is whole and its bytes match its digest", "type": "boolean"}, "part": map[string]any{"description": "the part", "type": "string"}, "received": map[string]any{"description": "the chunks of the part held so far", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part"}, "type": "object"}},
{Name: "versions", Description: "The versions the seat holds of one name, newest first: each one's version, tag, digest, kind and when it was published.",
Input: map[string]any{"properties": map[string]any{"kind": map[string]any{"description": "narrowed to one kind (optional)", "type": "string"}, "name": map[string]any{"description": "the name", "type": "string"}}, "required": []string{"name"}, "type": "object"},
@@ -416,8 +416,8 @@ func List() []Seat {
{Name: "publish", Description: "Open a transfer, naming the artifact and the digest of every part; answers the digests the holder lacks, which the caller then sends by publish-part. A transfer already open answers the parts held, so a cut transfer goes on from there. With no parts and a version, the held digest is published under that version and nothing is stored (the trunk's claim).",
Input: map[string]any{"properties": map[string]any{"commit": map[string]any{"description": "the source commit it was built from", "type": "string"}, "digest": map[string]any{"description": "its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record)", "type": "string"}, "fingerprint": map[string]any{"description": "the build's fingerprint", "type": "string"}, "kind": map[string]any{"description": "what it is", "enum": []string{"package", "image", "bundle", "archive", "upstream"}, "type": "string"}, "name": map[string]any{"description": "the package's, image's, bundle's or archive's name", "type": "string"}, "parts": map[string]any{"description": "every part's digest and size; none when the digest is already held", "items": map[string]any{"description": "one part of a transfer", "properties": map[string]any{"digest": map[string]any{"description": "the part's digest, sha256:<hex>: an image's layer or config, a package's file, a bundle's blob", "type": "string"}, "size": map[string]any{"description": "its size in bytes", "type": "integer"}}, "required": []string{"digest", "size"}, "type": "object"}, "type": "array"}, "tag": map[string]any{"description": "the tag it carries, for a tagged version", "type": "string"}, "transfer": map[string]any{"description": "the transfer's name, the caller's own; the same name opens the same transfer again", "type": "string"}, "version": map[string]any{"description": "the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone", "type": "string"}}, "required": []string{"transfer", "name", "kind", "digest"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"held": map[string]any{"description": "the digest is held already: nothing to send; the outcome follows as an event", "type": "boolean"}, "lacks": map[string]any{"description": "the digests of the parts the holder lacks, to send by publish-part", "items": map[string]any{"type": "string"}, "type": "array"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer"}, "type": "object"}},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"complete": map[string]any{"description": "the part is whole and its bytes match its digest", "type": "boolean"}, "part": map[string]any{"description": "the part", "type": "string"}, "received": map[string]any{"description": "the chunks of the part held so far", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part"}, "type": "object"}},
{Name: "versions", Description: "The versions the seat holds of one name, newest first: each one's version, tag, digest, kind and when it was published.",
Input: map[string]any{"properties": map[string]any{"kind": map[string]any{"description": "narrowed to one kind (optional)", "type": "string"}, "name": map[string]any{"description": "the name", "type": "string"}}, "required": []string{"name"}, "type": "object"},
@@ -443,8 +443,8 @@ func List() []Seat {
{Name: "publish", Description: "Open a transfer, naming the artifact and the digest of every part; answers the digests the holder lacks, which the caller then sends by publish-part. A transfer already open answers the parts held, so a cut transfer goes on from there. With no parts and a version, the held digest is published under that version and nothing is stored (the trunk's claim).",
Input: map[string]any{"properties": map[string]any{"commit": map[string]any{"description": "the source commit it was built from", "type": "string"}, "digest": map[string]any{"description": "its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record)", "type": "string"}, "fingerprint": map[string]any{"description": "the build's fingerprint", "type": "string"}, "kind": map[string]any{"description": "what it is", "enum": []string{"package", "image", "bundle", "archive", "upstream"}, "type": "string"}, "name": map[string]any{"description": "the package's, image's, bundle's or archive's name", "type": "string"}, "parts": map[string]any{"description": "every part's digest and size; none when the digest is already held", "items": map[string]any{"description": "one part of a transfer", "properties": map[string]any{"digest": map[string]any{"description": "the part's digest, sha256:<hex>: an image's layer or config, a package's file, a bundle's blob", "type": "string"}, "size": map[string]any{"description": "its size in bytes", "type": "integer"}}, "required": []string{"digest", "size"}, "type": "object"}, "type": "array"}, "tag": map[string]any{"description": "the tag it carries, for a tagged version", "type": "string"}, "transfer": map[string]any{"description": "the transfer's name, the caller's own; the same name opens the same transfer again", "type": "string"}, "version": map[string]any{"description": "the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone", "type": "string"}}, "required": []string{"transfer", "name", "kind", "digest"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"held": map[string]any{"description": "the digest is held already: nothing to send; the outcome follows as an event", "type": "boolean"}, "lacks": map[string]any{"description": "the digests of the parts the holder lacks, to send by publish-part", "items": map[string]any{"type": "string"}, "type": "array"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer"}, "type": "object"}},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
{Name: "publish-part", Description: "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
Input: map[string]any{"properties": map[string]any{"data": map[string]any{"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)", "type": "string"}, "last": map[string]any{"description": "this chunk is the part's last", "type": "boolean"}, "part": map[string]any{"description": "the part's digest", "type": "string"}, "sequence": map[string]any{"description": "the chunk's place in its part, from 0", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part", "sequence", "last", "data"}, "type": "object"},
Output: map[string]any{"properties": map[string]any{"complete": map[string]any{"description": "the part is whole and its bytes match its digest", "type": "boolean"}, "part": map[string]any{"description": "the part", "type": "string"}, "received": map[string]any{"description": "the chunks of the part held so far", "type": "integer"}, "transfer": map[string]any{"description": "the transfer", "type": "string"}}, "required": []string{"transfer", "part"}, "type": "object"}},
{Name: "versions", Description: "The versions the seat holds of one name, newest first: each one's version, tag, digest, kind and when it was published.",
Input: map[string]any{"properties": map[string]any{"kind": map[string]any{"description": "narrowed to one kind (optional)", "type": "string"}, "name": map[string]any{"description": "the name", "type": "string"}}, "required": []string{"name"}, "type": "object"},
+2 -2
View File
@@ -90,7 +90,7 @@
},
{
"name": "publish-part",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
"callers": "the build modules, and only the proved caller that opened the transfer",
"input": {
"type": "object",
@@ -113,7 +113,7 @@
},
"data": {
"type": "string",
"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)"
"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)"
}
},
"required": [
+1 -1
View File
@@ -101,7 +101,7 @@ export interface PublishAnswer {
/** is what publish-part takes. */
export interface PublishPartInput {
/** the chunk's bytes, base64 (at most 768 KiB before encoding) */
/** the chunk's bytes, base64 (at most 760 KiB before encoding) */
"data": string;
/** this chunk is the part's last */
"last": boolean;
+8 -8
View File
@@ -2980,11 +2980,11 @@ export const list: readonly Seat[] = [
}
},
{
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
"input": {
"properties": {
"data": {
"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)",
"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)",
"type": "string"
},
"last": {
@@ -3332,11 +3332,11 @@ export const list: readonly Seat[] = [
}
},
{
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
"input": {
"properties": {
"data": {
"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)",
"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)",
"type": "string"
},
"last": {
@@ -3686,11 +3686,11 @@ export const list: readonly Seat[] = [
}
},
{
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
"input": {
"properties": {
"data": {
"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)",
"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)",
"type": "string"
},
"last": {
@@ -4213,11 +4213,11 @@ export const list: readonly Seat[] = [
}
},
{
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 768 KiB of data, base64.",
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
"input": {
"properties": {
"data": {
"description": "the chunk's bytes, base64 (at most 768 KiB before encoding)",
"description": "the chunk's bytes, base64 (at most 760 KiB before encoding)",
"type": "string"
},
"last": {