From 7fead3b364a1c251d4188429f60613e1d6693926 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 18:07:15 +0100 Subject: [PATCH] P1 log-entry-revisions: LogEntry gains revision and passed-over, both optional (same form 13 of mesh-pipeline-runner) Builds: design 47 H2 H-A-743, H-A-577 (3) --- .../go/seats/meshpipelinerunner/contract.go | 12 ++++++++---- .../go/seats/meshpipelinerunner/contract_test.go | 2 +- .../seats/mesh-pipeline-runner/fixtures/verbs.json | 10 ++++++++++ .../seats/mesh-pipeline-runner/seat.json | 8 ++++++++ .../ts/seats/meshpipelinerunner/index.d.ts | 4 ++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract.go b/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract.go index 5d4766a17..2c0d5d6b8 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract.go +++ b/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract.go @@ -20,7 +20,7 @@ const Form = 13 // whose fields changed while its forms did not (design 47 H2 ยง780). const ( generatedForms = "13" - generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 FailedStep=cd7184342136 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=284210b3c054 LogEntry=b059967b2ae4 Member=8a103baec01f Mover=5db376275bcf MoverAdded=6966283f6909 MoverAddedEvent=b24ae82030ab MoverEnded=4b35095f6829 MoverRow=6de094f5329f Pipeline=2663792125bf PipelineEnded=e3f4c58f93c8 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineRow=397a8219a855 PipelineStarted=d5fc3ee236c7 PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionAgainNValue=693580eed498 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=69998ea62147 PlaceUnfinishedAnswerFailedItem=d9b89913b9bf PlaceUnfinishedAnswerPlacedItem=9ff9288125e5 Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=8609ff359791 StandsAnswer=e05cecdde456 StartAnswer=ed94ced4513a StartedMover=4450a94e6ca3 StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepResult=9db5cfcb26bb StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=90066504aaa7 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466" + generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 FailedStep=cd7184342136 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=284210b3c054 LogEntry=e2c9486343d2 Member=8a103baec01f Mover=5db376275bcf MoverAdded=6966283f6909 MoverAddedEvent=b24ae82030ab MoverEnded=4b35095f6829 MoverRow=6de094f5329f Pipeline=2663792125bf PipelineEnded=e3f4c58f93c8 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineRow=397a8219a855 PipelineStarted=d5fc3ee236c7 PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionAgainNValue=693580eed498 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=69998ea62147 PlaceUnfinishedAnswerFailedItem=d9b89913b9bf PlaceUnfinishedAnswerPlacedItem=9ff9288125e5 Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=8609ff359791 StandsAnswer=e05cecdde456 StartAnswer=ed94ced4513a StartedMover=4450a94e6ca3 StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepResult=9db5cfcb26bb StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=90066504aaa7 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466" ) const ( @@ -650,9 +650,13 @@ type LogEntry struct { // the keys of the kept results the step wrote or carried, ., which the runner ages by their last-read (design 47 G sections 330, 470) Kept []string `json:"kept,omitempty"` // the module of the mover whose step the entry is of (H-A-190) - Module string `json:"module,omitempty"` - Outcome string `json:"outcome,omitempty"` - Pipeline string `json:"pipeline"` + Module string `json:"module,omitempty"` + Outcome string `json:"outcome,omitempty"` + // the revision the passed-over end named, present with revision (design 47 H2 H-A-743) + PassedOver int64 `json:"passed-over,omitempty"` + Pipeline string `json:"pipeline"` + // the pipeline's own revision, present on the entry of a step asked again after an end the runner passed over (design 47 H2 H-A-743) + Revision int64 `json:"revision,omitempty"` Step string `json:"step"` What string `json:"what"` } diff --git a/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract_test.go b/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract_test.go index 1ad030227..25aef886c 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract_test.go +++ b/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner/contract_test.go @@ -115,7 +115,7 @@ func TestFixtures(t *testing.T) { decode: func(b []byte) (any, error) { var v ReviewInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "review answers its step", subject: "", given: "{\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}", wire: "{\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}", decode: func(b []byte) (any, error) { var v ReviewAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, - {name: "show answers a pipeline with its log and fill", subject: "", given: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"}],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}", wire: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"}],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}", + {name: "show answers a pipeline with its log and fill", subject: "", given: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"},{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:05:00Z\",\"module\":\"nats\",\"passed-over\":13,\"pipeline\":\"main.3589\",\"revision\":14,\"step\":\"build\",\"what\":\"started\"}],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}", wire: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"},{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:05:00Z\",\"module\":\"nats\",\"passed-over\":13,\"pipeline\":\"main.3589\",\"revision\":14,\"step\":\"build\",\"what\":\"started\"}],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}", decode: func(b []byte) (any, error) { var v ShowAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "rerun names the mover's module", subject: "", given: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}", wire: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}", decode: func(b []byte) (any, error) { var v RerunInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, diff --git a/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/fixtures/verbs.json b/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/fixtures/verbs.json index 970199d9b..d470118f2 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/fixtures/verbs.json +++ b/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/fixtures/verbs.json @@ -86,6 +86,16 @@ "artifact": "nats:program", "what": "started", "at": "2026-11-10T10:00:00Z" + }, + { + "pipeline": "main.3589", + "module": "nats", + "step": "build", + "artifact": "nats:program", + "what": "started", + "at": "2026-11-10T10:05:00Z", + "revision": 14, + "passed-over": 13 } ], "fill": [ diff --git a/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/seat.json b/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/seat.json index a68c17d11..67dacf25f 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/seat.json +++ b/modules/mesh-delivery-contracts/seats/mesh-pipeline-runner/seat.json @@ -2085,6 +2085,14 @@ "type": "string" }, "description": "the keys of the kept results the step wrote or carried, ., which the runner ages by their last-read (design 47 G sections 330, 470)" + }, + "revision": { + "type": "integer", + "description": "the pipeline's own revision, present on the entry of a step asked again after an end the runner passed over (design 47 H2 H-A-743)" + }, + "passed-over": { + "type": "integer", + "description": "the revision the passed-over end named, present with revision (design 47 H2 H-A-743)" } }, "description": "one entry of the step log", diff --git a/modules/mesh-delivery-contracts/ts/seats/meshpipelinerunner/index.d.ts b/modules/mesh-delivery-contracts/ts/seats/meshpipelinerunner/index.d.ts index 8b467b173..1d564fed7 100644 --- a/modules/mesh-delivery-contracts/ts/seats/meshpipelinerunner/index.d.ts +++ b/modules/mesh-delivery-contracts/ts/seats/meshpipelinerunner/index.d.ts @@ -227,7 +227,11 @@ export interface LogEntry { /** the module of the mover whose step the entry is of (H-A-190) */ "module"?: string; "outcome"?: "running" | "waiting" | "passed" | "failed" | "nothing to run" | "bypassed" | "carried" | "could not run" | "waiting for a build node" | "did not build" | "accepted" | "declined" | "superseded" | "cancelled"; + /** the revision the passed-over end named, present with revision (design 47 H2 H-A-743) */ + "passed-over"?: number; "pipeline": string; + /** the pipeline's own revision, present on the entry of a step asked again after an end the runner passed over (design 47 H2 H-A-743) */ + "revision"?: number; "step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval"; "what": "started" | "ended"; }