DC5 published-names-fingerprint: package-published gains the reservation's fingerprint (mesh-builds stays at form 4, one raise per seat)

Builds: design 47 H2 H-A-707 (6), H-A-717 (DQ-52)
This commit is contained in:
2026-11-25 17:09:01 +01:00
parent c8f9e1b8d3
commit 8865d61bec
5 changed files with 41 additions and 1 deletions
@@ -19,7 +19,7 @@ const Form = 4
// whose fields changed while its forms did not (design 47 H2 §780).
const (
generatedForms = "4"
generatedFieldsDigest = "AskTakenEvent=6d5d3da7ac39 BuildEntry=3c829a0a3d58 Dependency=90a32b07c563 DropAnswer=7538f2f5e68e PackagePublished=34dd069a6aab PackagePublishedEvent=8e12888c1559 PublishQueueAnswer=0f1326e35e17 PublishQueueAnswerCountsItem=b770db2f0920 PublishQueueAnswerQueueItem=b1eebc09f41e PublishedAnswer=69a801982819 ReservedAnswer=2272a4d6f0f4 ReservedAnswerArtifactsItem=d74eb6e00abb Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 StepAccept=18efeefb6c34 StepEnded=be571d4ff16f StepEndedEvent=207787118dac StepProgressEvent=8215e490ea8d StepRun=dc5893aef7e5 ToolchainAgreed=f3d9ce993734 ToolchainAgreedDigestsItem=1d42893a96b9 ToolchainAgreedEvent=e3502d6f194d VersionReservedEvent=984547d6ad07"
generatedFieldsDigest = "AskTakenEvent=6d5d3da7ac39 BuildEntry=3c829a0a3d58 Dependency=90a32b07c563 DropAnswer=7538f2f5e68e PackagePublished=7e20050c6260 PackagePublishedEvent=8e12888c1559 PublishQueueAnswer=0f1326e35e17 PublishQueueAnswerCountsItem=b770db2f0920 PublishQueueAnswerQueueItem=b1eebc09f41e PublishedAnswer=69a801982819 ReservedAnswer=2272a4d6f0f4 ReservedAnswerArtifactsItem=d74eb6e00abb Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 StepAccept=18efeefb6c34 StepEnded=be571d4ff16f StepEndedEvent=207787118dac StepProgressEvent=8215e490ea8d StepRun=dc5893aef7e5 ToolchainAgreed=f3d9ce993734 ToolchainAgreedDigestsItem=1d42893a96b9 ToolchainAgreedEvent=e3502d6f194d VersionReservedEvent=984547d6ad07"
)
const (
@@ -146,6 +146,8 @@ type PackagePublished struct {
Dependencies []Dependency `json:"dependencies,omitempty"`
// the published artifact's digest
Digest string `json:"digest"`
// the fingerprint of the build the reservation holds, so the runner marks every running pipeline of the branch that moves the module at it; absent from a publish whose reservation names none; the builder, the assigner and the indexer read it not and decode it tolerantly (design 47 H2 H-A-707 (6))
Fingerprint string `json:"fingerprint,omitempty"`
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
Form int64 `json:"form,omitempty"`
// the module
@@ -37,6 +37,8 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v StepProgressEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-builds\\.event\\.step-progress\\.[^.*> ]+$")},
{name: "the step ended superseded in form 4: revision present exactly when superseded (H-A-574, H-A-650)", subject: "mesh.seat.mesh-builds.event.step-ended.laptop", given: "{\"entries\":[{\"fingerprint\":\"fp-0123\",\"module\":\"nats\"}],\"form\":4,\"id\":\"m2kx9a1b3c4d6f\",\"node\":\"laptop\",\"outcome\":\"superseded\",\"pipeline\":\"main.12.nats\",\"revision\":14,\"said\":\"nats at fp-0123 is superseded by fp-0456, the newest entry heard on its first branch\",\"step\":\"build\",\"v\":1}", wire: "{\"entries\":[{\"fingerprint\":\"fp-0123\",\"module\":\"nats\"}],\"form\":4,\"id\":\"m2kx9a1b3c4d6f\",\"node\":\"laptop\",\"outcome\":\"superseded\",\"pipeline\":\"main.12.nats\",\"revision\":14,\"said\":\"nats at fp-0123 is superseded by fp-0456, the newest entry heard on its first branch\",\"step\":\"build\",\"v\":1}",
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-builds\\.event\\.step-ended\\.[^.*> ]+$")},
{name: "a package published, naming the build's fingerprint (H-A-707 (6))", subject: "mesh.seat.mesh-builds.event.package-published", given: "{\"artifact\":\"mesh-sdk:go\",\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"dependencies\":[{\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"kind\":1,\"part\":\"mesh-contracts:go-nodeengine\",\"version\":\"0.1.4\"},{\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"kind\":3,\"part\":\"mesh-build-go:toolchain\",\"version\":\"1.26.0\"}],\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"source\":3589,\"v\":1,\"version\":\"0.1.15\"}", wire: "{\"artifact\":\"mesh-sdk:go\",\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"dependencies\":[{\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"kind\":1,\"part\":\"mesh-contracts:go-nodeengine\",\"version\":\"0.1.4\"},{\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"kind\":3,\"part\":\"mesh-build-go:toolchain\",\"version\":\"1.26.0\"}],\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"source\":3589,\"v\":1,\"version\":\"0.1.15\"}",
decode: func(b []byte) (any, error) { var v PackagePublishedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-builds\\.event\\.package-published$")},
{name: "reserved asks a module", subject: "", given: "{\"module\":\"mesh-sdk\"}", wire: "{\"module\":\"mesh-sdk\"}",
decode: func(b []byte) (any, error) { var v ReservedInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "reserved asks a package by its name", subject: "", given: "{\"name\":\"git.novox.be/novox/mesh-sdk/go\",\"version\":\"0.1.15\"}", wire: "{\"name\":\"git.novox.be/novox/mesh-sdk/go\",\"version\":\"0.1.15\"}",
@@ -195,5 +195,35 @@
"said": "nats at fp-0123 is superseded by fp-0456, the newest entry heard on its first branch",
"revision": 14
}
},
{
"name": "a package published, naming the build's fingerprint (H-A-707 (6))",
"of": "event:package-published",
"subject": "mesh.seat.mesh-builds.event.package-published",
"given": {
"v": 1,
"artifact": "mesh-sdk:go",
"module": "mesh-sdk",
"version": "0.1.15",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"branch": "main",
"source": 3589,
"dependencies": [
{
"kind": 1,
"version": "0.1.4",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"part": "mesh-contracts:go-nodeengine"
},
{
"kind": 3,
"version": "1.26.0",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"part": "mesh-build-go:toolchain"
}
],
"at": "2026-11-10T10:00:00Z",
"fingerprint": "fp-sdk"
}
}
]
@@ -524,6 +524,10 @@
"type": "integer",
"description": "the catalog revision number of that branch the build was made from, the indexer's count (design 47 H-A-218, H-A-220); absent from a reservation made before the field"
},
"fingerprint": {
"type": "string",
"description": "the fingerprint of the build the reservation holds, so the runner marks every running pipeline of the branch that moves the module at it; absent from a publish whose reservation names none; the builder, the assigner and the indexer read it not and decode it tolerantly (design 47 H2 H-A-707 (6))"
},
"dependencies": {
"type": "array",
"items": {
@@ -83,6 +83,8 @@ export interface PackagePublished {
"dependencies"?: Dependency[];
/** the published artifact's digest */
"digest": string;
/** the fingerprint of the build the reservation holds, so the runner marks every running pipeline of the branch that moves the module at it; absent from a publish whose reservation names none; the builder, the assigner and the indexer read it not and decode it tolerantly (design 47 H2 H-A-707 (6)) */
"fingerprint"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
/** the module */