I6 (2a): the seat mesh-catalog's seat-list hands the seat list's bytes in chunks
seat-list is a chunked read verb, as input is: input call (128 random bits), answer digest (the list's sha256, its object's name in seat-lists), size and chunks, then the bytes on the call's chunk subject. The object name leaves the answer. The seat's form rises to 4; regenerated with seatgen, -check clean; the fixtures read so. Builds: design 47 H2 §814, §820; H-A-441, H-A-443 (1)
This commit is contained in:
@@ -14,13 +14,13 @@ const Seat = "mesh-catalog"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 3
|
||||
const Form = 4
|
||||
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "3"
|
||||
generatedFieldsDigest = "ActingRule=8a83ce7e0457 Artifact=78b05c1a9ec3 ArtifactPackage=2a3a660a934d ArtifactRef=a2f06147f4b6 BuildEdge=76f0684e254a BuildEdges=d2b95000259e BuildEdgesByModuleBranchValue=4fdf7cc1e723 CandidatesByGroupValue=9ea8c6c580d2 CandidatesByGroupValuePullsItem=90fb03643258 CandidatesByGroupValuePullsItemFpsValue=4c6783201aa3 CatalogEntry=c0a4ea25d523 CatalogRevision=d1ecaaa484af CatalogRevisionDefinitionsItem=77fcff620d48 CatalogRevisionEvent=710cbc5bfff1 CatalogRevisionsByBranchRevisionValue=17e54f635d35 CatalogRevisionsByCandidateGroupHeadsValue=17e54f635d35 CatalogRevisionsByEntryDigestValue=8755036a3051 DependentsAnswer=7538f2f5e68e Edge=7242732afaef EntryAnswer=805c2ff28e1c EntryInputs=76a7f8690dd2 EntryRef=ff109e5089e1 Fill=80f442916429 FillingEvent=5bd4df78ed84 FingerprintInputs=99a6df7f991f FullEvent=5bd4df78ed84 Head=774b4bf88ba4 InputAnswer=cd41ee65565d InputsByTimeDigestValue=a2f06147f4b6 ManifestsByDigestValue=51b3822b29c6 ModuleAnswer=499a03ce9b27 ModuleAnswerModule=c0f679e09f08 ModulesAnswer=6d119571c69e ModulesAnswerModulesItem=a70f39c60b67 ModulesByModuleValue=fc7530ba893a ModulesByModuleValueInputs2=99a6df7f991f Outdated=e820214f66bc OutdatedAnswer=275fb25266b9 OutdatedDependency=dc35dca1b683 PackagesByModuleValue=2b62574b709f PackagesByModuleValuePackagesItem=a7d30558470d PackagesByPackageSeriesValue=07421d8d3411 PackagesByPackageSeriesValueNewest=aba144994370 PackagesByPackageSeriesValueNewestContents=eca2ccf56913 PackagesByPackageSeriesValueNewestContentsPackagesItem=a7d30558470d PackagesByPackageSeriesValueNumbered=c8ffc628599c PackagesByPackageSeriesValueNumberedContents=0def6c0794ee PackagesByPackageSeriesValueNumberedContentsPackagesItem=a7d30558470d Policy=719e2f460c6f PolicyAnswer=46cdf8430557 PredefinedByListValue=ec8e3febe8ac ProvidesAnswer=7538f2f5e68e RegisterAnswer=46cdf8430557 Registration=ef03d1b2e73f RegistrationAsked=55adba349c24 RegistrationChangedEvent=99a3268edf41 RegistrationHistoryByModuleVersionValue=0999b5bb7dc7 RegistrationHistoryBySourceOwnerNameVersionValue=0999b5bb7dc7 RegistrationsAnswer=8849ef618cf3 RegistrationsByModuleValue=0999b5bb7dc7 RegistrationsBySourceOwnerNameValue=0999b5bb7dc7 RevisionAnswer=258ea5124931 RoomEvent=5bd4df78ed84 SeatDefinitionChangedEvent=e271d24d58f7 SeatDefinitionRemovedEvent=f7d6171111e6 SeatDefinitionsAnswer=0fd6a59fec59 SeatDefinitionsAnswerEntry=d006f68d2be5 SeatDefinitionsAnswerSeatsItem=e271d24d58f7 SeatListAnswer=912c0cebcf0a SourceCheck=d1ed7cbbd579 StepStatuses=4f50aa633e61 TakeInEntry=545ec1528499 ToolchainUsed=43b6d42376fb UnwatchAnswer=46cdf8430557 VersionArtifact=438c49a392b0 VersionEdge=b0f80e83f4dc VersionEntry=33f5b00dbda9 VersionReleasedEvent=4ccf1ea90e7f VersionsAnswer=b59e6e057e7b VersionsByModuleVersionValue=e546dfadb913 VersionsFilledEvent=4cc437912dc3 WatchAnswer=46cdf8430557"
|
||||
generatedForms = "4"
|
||||
generatedFieldsDigest = "ActingRule=8a83ce7e0457 Artifact=78b05c1a9ec3 ArtifactPackage=2a3a660a934d ArtifactRef=a2f06147f4b6 BuildEdge=76f0684e254a BuildEdges=d2b95000259e BuildEdgesByModuleBranchValue=4fdf7cc1e723 CandidatesByGroupValue=9ea8c6c580d2 CandidatesByGroupValuePullsItem=90fb03643258 CandidatesByGroupValuePullsItemFpsValue=4c6783201aa3 CatalogEntry=c0a4ea25d523 CatalogRevision=d1ecaaa484af CatalogRevisionDefinitionsItem=77fcff620d48 CatalogRevisionEvent=710cbc5bfff1 CatalogRevisionsByBranchRevisionValue=17e54f635d35 CatalogRevisionsByCandidateGroupHeadsValue=17e54f635d35 CatalogRevisionsByEntryDigestValue=8755036a3051 DependentsAnswer=7538f2f5e68e Edge=7242732afaef EntryAnswer=805c2ff28e1c EntryInputs=76a7f8690dd2 EntryRef=ff109e5089e1 Fill=80f442916429 FillingEvent=5bd4df78ed84 FingerprintInputs=99a6df7f991f FullEvent=5bd4df78ed84 Head=774b4bf88ba4 InputAnswer=cd41ee65565d InputsByTimeDigestValue=a2f06147f4b6 ManifestsByDigestValue=51b3822b29c6 ModuleAnswer=499a03ce9b27 ModuleAnswerModule=c0f679e09f08 ModulesAnswer=6d119571c69e ModulesAnswerModulesItem=a70f39c60b67 ModulesByModuleValue=fc7530ba893a ModulesByModuleValueInputs2=99a6df7f991f Outdated=e820214f66bc OutdatedAnswer=275fb25266b9 OutdatedDependency=dc35dca1b683 PackagesByModuleValue=2b62574b709f PackagesByModuleValuePackagesItem=a7d30558470d PackagesByPackageSeriesValue=07421d8d3411 PackagesByPackageSeriesValueNewest=aba144994370 PackagesByPackageSeriesValueNewestContents=eca2ccf56913 PackagesByPackageSeriesValueNewestContentsPackagesItem=a7d30558470d PackagesByPackageSeriesValueNumbered=c8ffc628599c PackagesByPackageSeriesValueNumberedContents=0def6c0794ee PackagesByPackageSeriesValueNumberedContentsPackagesItem=a7d30558470d Policy=719e2f460c6f PolicyAnswer=46cdf8430557 PredefinedByListValue=ec8e3febe8ac ProvidesAnswer=7538f2f5e68e RegisterAnswer=46cdf8430557 Registration=ef03d1b2e73f RegistrationAsked=55adba349c24 RegistrationChangedEvent=99a3268edf41 RegistrationHistoryByModuleVersionValue=0999b5bb7dc7 RegistrationHistoryBySourceOwnerNameVersionValue=0999b5bb7dc7 RegistrationsAnswer=8849ef618cf3 RegistrationsByModuleValue=0999b5bb7dc7 RegistrationsBySourceOwnerNameValue=0999b5bb7dc7 RevisionAnswer=258ea5124931 RoomEvent=5bd4df78ed84 SeatDefinitionChangedEvent=e271d24d58f7 SeatDefinitionRemovedEvent=f7d6171111e6 SeatDefinitionsAnswer=0fd6a59fec59 SeatDefinitionsAnswerEntry=d006f68d2be5 SeatDefinitionsAnswerSeatsItem=e271d24d58f7 SeatListAnswer=04477a8044b1 SourceCheck=d1ed7cbbd579 StepStatuses=4f50aa633e61 TakeInEntry=545ec1528499 ToolchainUsed=43b6d42376fb UnwatchAnswer=46cdf8430557 VersionArtifact=438c49a392b0 VersionEdge=b0f80e83f4dc VersionEntry=33f5b00dbda9 VersionReleasedEvent=4ccf1ea90e7f VersionsAnswer=b59e6e057e7b VersionsByModuleVersionValue=e546dfadb913 VersionsFilledEvent=4cc437912dc3 WatchAnswer=46cdf8430557"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -1232,17 +1232,19 @@ type SeatDefinitionsAnswer struct {
|
||||
|
||||
// SeatListInput is what seat-list takes.
|
||||
type SeatListInput struct {
|
||||
// 128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements
|
||||
Call string `json:"call"`
|
||||
}
|
||||
|
||||
// SeatListAnswer is what seat-list answers.
|
||||
type SeatListAnswer struct {
|
||||
// the seat list's digest
|
||||
// how many chunks are sent
|
||||
Chunks int64 `json:"chunks"`
|
||||
// the seat list's sha256, the object's name in seat-lists
|
||||
Digest string `json:"digest"`
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
Form int64 `json:"form,omitempty"`
|
||||
// the object's name in seat-lists
|
||||
Object string `json:"object"`
|
||||
// the object's size in bytes
|
||||
// the seat list's size in bytes
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,9 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v RegistrationsInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "registrations answers a capped page with a source-only registration and the next cursor", subject: "", given: "{\"capped\":true,\"next\":\"c-121\",\"registrations\":[{\"at\":\"2026-11-22T00:10:00Z\",\"branches\":[\"main\"],\"by\":\"operator@workstation\",\"check\":{\"seat\":\"node-build-go\",\"step\":\"unit\"},\"origin\":\"novox/hq\",\"policy\":{\"steps\":{\"approval\":\"bypass\",\"review\":\"optional\",\"unit\":\"required\"}},\"v\":1,\"version\":1,\"warrant\":\"ask-m2kx9a1b3c4d6a\"}],\"total\":118}", wire: "{\"capped\":true,\"next\":\"c-121\",\"registrations\":[{\"at\":\"2026-11-22T00:10:00Z\",\"branches\":[\"main\"],\"by\":\"operator@workstation\",\"check\":{\"seat\":\"node-build-go\",\"step\":\"unit\"},\"origin\":\"novox/hq\",\"policy\":{\"steps\":{\"approval\":\"bypass\",\"review\":\"optional\",\"unit\":\"required\"}},\"v\":1,\"version\":1,\"warrant\":\"ask-m2kx9a1b3c4d6a\"}],\"total\":118}",
|
||||
decode: func(b []byte) (any, error) { var v RegistrationsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "seat-list answers the seat list's object by its digest", subject: "", given: "{\"digest\":\"sha256:eeee\",\"object\":\"sha256-eeee\",\"size\":412345}", wire: "{\"digest\":\"sha256:eeee\",\"object\":\"sha256-eeee\",\"size\":412345}",
|
||||
{name: "seat-list asks the seat list's bytes on a call's chunks", subject: "", given: "{\"call\":\"0123456789abcdef0123456789abcdef\"}", wire: "{\"call\":\"0123456789abcdef0123456789abcdef\"}",
|
||||
decode: func(b []byte) (any, error) { var v SeatListInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "seat-list answers the seat list's digest, size and how many chunks carry its bytes", subject: "", given: "{\"chunks\":1,\"digest\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"size\":412345}", wire: "{\"chunks\":1,\"digest\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"size\":412345}",
|
||||
decode: func(b []byte) (any, error) { var v SeatListAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
|
||||
@@ -485,12 +485,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "seat-list answers the seat list's object by its digest",
|
||||
"name": "seat-list asks the seat list's bytes on a call's chunks",
|
||||
"of": "verb:seat-list.input",
|
||||
"given": {
|
||||
"call": "0123456789abcdef0123456789abcdef"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "seat-list answers the seat list's digest, size and how many chunks carry its bytes",
|
||||
"of": "verb:seat-list.answer",
|
||||
"given": {
|
||||
"digest": "sha256:eeee",
|
||||
"size": 412345,
|
||||
"object": "sha256-eeee"
|
||||
"chunks": 1,
|
||||
"digest": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
||||
"size": 412345
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -256,34 +256,45 @@
|
||||
{
|
||||
"name": "seat-list",
|
||||
"class": "read",
|
||||
"description": "The seat list the mesh holds, as one object in the holder's objects seat-lists, one object per digest (design 47 H2 §814): the manifest validator program takes it by address, so a run by hand reads what the live validate reads. Reads only.",
|
||||
"description": "The trunk's seat list as the mesh holds it, the object of the holder's objects seat-lists of that digest (design 47 H2 §814, §820; H-A-441, H-A-443): its digest and size, then its bytes (the definitions resolved, a JSON array in the form of a composer request's seats, sorted by seat) in chunks of at most 512 KiB on the chunk subject of the call, each acknowledged by the caller on the ack subject within 30 seconds. A validate run's asker fills the request's seats from these bytes. Reads only.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
"properties": {
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"call"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the seat list's digest"
|
||||
"description": "the seat list's sha256, the object's name in seat-lists"
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "the object's size in bytes"
|
||||
"description": "the seat list's size in bytes"
|
||||
},
|
||||
"object": {
|
||||
"type": "string",
|
||||
"description": "the object's name in seat-lists"
|
||||
"chunks": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "how many chunks are sent"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest",
|
||||
"size",
|
||||
"object"
|
||||
"chunks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"chunks": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
@@ -2725,5 +2736,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"form": 3
|
||||
"form": 4
|
||||
}
|
||||
|
||||
@@ -699,17 +699,19 @@ export interface SeatDefinitionsAnswer {
|
||||
|
||||
/** is what seat-list takes. */
|
||||
export interface SeatListInput {
|
||||
/** 128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements */
|
||||
"call": string;
|
||||
}
|
||||
|
||||
/** is what seat-list answers. */
|
||||
export interface SeatListAnswer {
|
||||
/** the seat list's digest */
|
||||
/** how many chunks are sent */
|
||||
"chunks": number;
|
||||
/** the seat list's sha256, the object's name in seat-lists */
|
||||
"digest": string;
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
"form"?: number;
|
||||
/** the object's name in seat-lists */
|
||||
"object": string;
|
||||
/** the object's size in bytes */
|
||||
/** the seat list's size in bytes */
|
||||
"size": number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user