CT12: the build seats' ask carries its version, every ask says ask-taken and step-ended (issue 1966)
The builder's reserved version reaches the build in the ask; a holder says when it takes and ends any ask, a builder's build included, so the watchman times every ask; the toolchains key names its program's digest; the checker may drop its own asks until its removal. step-progress and ask-taken name no keep and go on the shared events stream. The delivery SDK's neutral forms follow the part. Builds: design 47 G §472, §548, §549, §552, §573, §602, §603 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -35,6 +35,7 @@ const (
|
||||
EventStepEnded = "step-ended"
|
||||
EventToolchainReported = "toolchain-reported"
|
||||
EventStepProgress = "step-progress"
|
||||
EventAskTaken = "ask-taken"
|
||||
)
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
@@ -44,7 +45,7 @@ func Verbs() []string {
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
func Events() []string {
|
||||
return []string{EventStepEnded, EventToolchainReported, EventStepProgress}
|
||||
return []string{EventStepEnded, EventToolchainReported, EventStepProgress, EventAskTaken}
|
||||
}
|
||||
|
||||
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
||||
@@ -75,9 +76,6 @@ func SubjectToolchainReported(node string) string {
|
||||
// SubjectToolchainReportedAll hears every toolchain-reported.
|
||||
const SubjectToolchainReportedAll = "mesh.seat.node-build-node.event.toolchain-reported.*"
|
||||
|
||||
// StreamStepProgress is the stream step-progress is kept in.
|
||||
const StreamStepProgress = "SEAT_node-build-node_step-progress"
|
||||
|
||||
// SubjectStepProgress is where step-progress is published, on mesh.seat.node-build-node.event.step-progress.<node>.
|
||||
func SubjectStepProgress(node string) string {
|
||||
return "mesh.seat.node-build-node.event.step-progress." + node
|
||||
@@ -86,6 +84,12 @@ func SubjectStepProgress(node string) string {
|
||||
// SubjectStepProgressAll hears every step-progress.
|
||||
const SubjectStepProgressAll = "mesh.seat.node-build-node.event.step-progress.*"
|
||||
|
||||
// SubjectAskTaken is where ask-taken is published, on mesh.seat.node-build-node.event.ask-taken.<node>.
|
||||
func SubjectAskTaken(node string) string { return "mesh.seat.node-build-node.event.ask-taken." + node }
|
||||
|
||||
// SubjectAskTakenAll hears every ask-taken.
|
||||
const SubjectAskTakenAll = "mesh.seat.node-build-node.event.ask-taken.*"
|
||||
|
||||
// AcceptSubjectDelivery is where delivery is sent.
|
||||
const AcceptSubjectDelivery = "mesh.seat.node-build-node.accept.delivery"
|
||||
|
||||
@@ -370,6 +374,16 @@ type AskArtifact struct {
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// AskTaken is an ask a build seat's holder took, said when it takes any ask, whatever its asker (design 47 G section 602).
|
||||
type AskTaken struct {
|
||||
// the ask's id
|
||||
Ask string `json:"ask"`
|
||||
Asker string `json:"asker"`
|
||||
At time.Time `json:"at"`
|
||||
// the node that took it, as in the subject
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// BuildAnswer is a type of the contract.
|
||||
type BuildAnswer struct {
|
||||
Artifacts []BuiltArtifact `json:"artifacts"`
|
||||
@@ -759,23 +773,31 @@ type StepAsk struct {
|
||||
Step *StepRun `json:"step,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
// the version MAJOR.MINOR.PATCH the builder reserved for the build, passed to it as MESH_VERSION; empty for a build that reserves none, which stamps none (design 47 G section 573)
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// StepEnded is a pipeline step's end, said by the build seat's holder on the node that ran it (ADR 0666 sections 7, 21): the runner takes it only from that holder's account, naming the ask, the commit and the fingerprint it was asked at.
|
||||
// StepEnded is an ask's end, said by the build seat's holder on the node that ran it, whatever its asker (design 47 G section 602): a pipeline step's end names the pipeline, the commit and the fingerprint it was asked at, which the runner takes only from that holder's account (ADR 0666 sections 7, 21); the end of any other ask names its asker, the ask, the node, the outcome and when, and neither commit nor fingerprint (design 47 G section 548).
|
||||
type StepEnded struct {
|
||||
Artifact string `json:"artifact"`
|
||||
Artifact string `json:"artifact,omitempty"`
|
||||
// the ask's id, by which a reader takes only its own asks
|
||||
Ask string `json:"ask"`
|
||||
// who asked it
|
||||
Asker string `json:"asker"`
|
||||
// when it ended (RFC 3339 time)
|
||||
At time.Time `json:"at"`
|
||||
// for a rerun, the caller the runtime proved
|
||||
By string `json:"by,omitempty"`
|
||||
// the packages not run because the ask's kept results held them
|
||||
Carried []KeptResult `json:"carried,omitempty"`
|
||||
Commit string `json:"commit"`
|
||||
Commit string `json:"commit,omitempty"`
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the ask's id
|
||||
ID string `json:"id"`
|
||||
// the packages that passed at their digest, for the runner to keep
|
||||
Kept []KeptResult `json:"kept,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Module string `json:"module,omitempty"`
|
||||
// the node that ran it, as in the subject
|
||||
Node string `json:"node"`
|
||||
// never passed for a step that ran nothing
|
||||
@@ -784,12 +806,12 @@ type StepEnded struct {
|
||||
Output string `json:"output,omitempty"`
|
||||
// the output's object in the sender's sent store, when over the per-message limit (ADR 0666 section 16)
|
||||
OutputObject string `json:"output-object,omitempty"`
|
||||
Pipeline string `json:"pipeline"`
|
||||
Pipeline string `json:"pipeline,omitempty"`
|
||||
Rerun bool `json:"rerun,omitempty"`
|
||||
// why it failed or could not run, naming the part not heard
|
||||
Said string `json:"said,omitempty"`
|
||||
Started *time.Time `json:"started,omitempty"`
|
||||
Step string `json:"step"`
|
||||
Step string `json:"step,omitempty"`
|
||||
Tests *TestCounts `json:"tests,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
@@ -910,6 +932,8 @@ type TestCounts struct {
|
||||
type Toolchain struct {
|
||||
// when (RFC 3339 time)
|
||||
At *time.Time `json:"at,omitempty"`
|
||||
// the sha256: digest of the language's toolchain program as the build module runs it: the program of the module that provides that language's toolchain, never the build module's own (design 47 G section 472)
|
||||
Digest string `json:"digest,omitempty"`
|
||||
// go or typescript
|
||||
Language string `json:"language"`
|
||||
Recipe string `json:"recipe"`
|
||||
@@ -1062,6 +1086,9 @@ type ToolchainReportedEvent = ToolchainReported
|
||||
// StepProgressEvent is the body of the event step-progress.
|
||||
type StepProgressEvent = StepProgress
|
||||
|
||||
// AskTakenEvent is the body of the event ask-taken.
|
||||
type AskTakenEvent = AskTaken
|
||||
|
||||
// StepsByAskerNodeIDValue is one value of the state steps under the key <asker>.<node>.<id>.
|
||||
type StepsByAskerNodeIDValue = Step
|
||||
|
||||
|
||||
Reference in New Issue
Block a user