C1: the build-step part says imports-reported, so a build module can report a module's import set
The build seats gain the event imports-reported.<node> (part build-step, form 4), body
{node, module, fingerprint, commit, imports}, all required, imports possibly empty, kept as
toolchain-reported (90 days, 16 MiB). Fixtures on node-build-go and node-build-node; the
image build module says none.
Builds: design 47 H2 H-A-517, H-A-518, H-A-532 DQ-2, DQ-13
This commit is contained in:
@@ -17,13 +17,13 @@ const Seat = "node-build-go"
|
||||
const Form = 1
|
||||
|
||||
// FormBuildStep is the form of what the part build-step adds.
|
||||
const FormBuildStep = 3
|
||||
const FormBuildStep = 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 = "1 build-step:3"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckRunAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
generatedForms = "1 build-step:4"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckRunAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c ImportsReported=c5960405236e ImportsReportedEvent=1615a3e4797e InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -49,6 +49,7 @@ const (
|
||||
const (
|
||||
EventStepEnded = "step-ended"
|
||||
EventToolchainReported = "toolchain-reported"
|
||||
EventImportsReported = "imports-reported"
|
||||
EventStepProgress = "step-progress"
|
||||
EventAskTaken = "ask-taken"
|
||||
)
|
||||
@@ -84,7 +85,7 @@ func VerbDescription(verb string) string {
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
func Events() []string {
|
||||
return []string{EventStepEnded, EventToolchainReported, EventStepProgress, EventAskTaken}
|
||||
return []string{EventStepEnded, EventToolchainReported, EventImportsReported, EventStepProgress, EventAskTaken}
|
||||
}
|
||||
|
||||
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
||||
@@ -113,6 +114,17 @@ func SubjectToolchainReported(node string) string {
|
||||
// SubjectToolchainReportedAll hears every toolchain-reported.
|
||||
const SubjectToolchainReportedAll = "mesh.seat.node-build-go.event.toolchain-reported.*"
|
||||
|
||||
// StreamImportsReported is the stream imports-reported is kept in.
|
||||
const StreamImportsReported = "SEAT_node-build-go_imports-reported"
|
||||
|
||||
// SubjectImportsReported is where imports-reported is published, on mesh.seat.node-build-go.event.imports-reported.<node>.
|
||||
func SubjectImportsReported(node string) string {
|
||||
return "mesh.seat.node-build-go.event.imports-reported." + node
|
||||
}
|
||||
|
||||
// SubjectImportsReportedAll hears every imports-reported.
|
||||
const SubjectImportsReportedAll = "mesh.seat.node-build-go.event.imports-reported.*"
|
||||
|
||||
// SubjectStepProgress is where step-progress is published, on mesh.seat.node-build-go.event.step-progress.<node>.
|
||||
func SubjectStepProgress(node string) string {
|
||||
return "mesh.seat.node-build-go.event.step-progress." + node
|
||||
@@ -586,6 +598,22 @@ type FetchRefusal struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// ImportsReported is the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2).
|
||||
type ImportsReported struct {
|
||||
// the commit the build was made from
|
||||
Commit string `json:"commit"`
|
||||
// the fingerprint the build was asked for
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
Form int64 `json:"form,omitempty"`
|
||||
// each mesh package the module's programs import, by its import path; empty when they import none
|
||||
Imports []string `json:"imports"`
|
||||
// the module built
|
||||
Module string `json:"module"`
|
||||
// the node the build ran on
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// InstallAsk is the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers.
|
||||
type InstallAsk struct {
|
||||
// who asked it
|
||||
@@ -1246,6 +1274,9 @@ type StepEndedEvent = StepEnded
|
||||
// ToolchainReportedEvent is the body of the event toolchain-reported.
|
||||
type ToolchainReportedEvent = ToolchainReported
|
||||
|
||||
// ImportsReportedEvent is the body of the event imports-reported.
|
||||
type ImportsReportedEvent = ImportsReported
|
||||
|
||||
// StepProgressEvent is the body of the event step-progress.
|
||||
type StepProgressEvent = StepProgress
|
||||
|
||||
@@ -1363,6 +1394,15 @@ func DecodeToolchainReportedEvent(raw []byte) (ToolchainReportedEvent, int, erro
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeImportsReportedEvent reads a ImportsReportedEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeImportsReportedEvent(raw []byte) (ImportsReportedEvent, int, error) {
|
||||
var v ImportsReportedEvent
|
||||
if err := json.Unmarshal(raw, &v); err != nil {
|
||||
return v, 0, err
|
||||
}
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeStepProgressEvent reads a StepProgressEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeStepProgressEvent(raw []byte) (StepProgressEvent, int, error) {
|
||||
var v StepProgressEvent
|
||||
|
||||
@@ -23,6 +23,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.event\\.step-ended\\.[^.*> ]+$")},
|
||||
{name: "a node's toolchain reported", subject: "mesh.seat.node-build-go.event.toolchain-reported.anchor", given: "{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"language\":\"go\",\"node\":\"anchor\",\"recipe\":\"1\",\"version\":\"1.26.0\"}", wire: "{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"language\":\"go\",\"node\":\"anchor\",\"recipe\":\"1\",\"version\":\"1.26.0\"}",
|
||||
decode: func(b []byte) (any, error) { var v ToolchainReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.event\\.toolchain-reported\\.[^.*> ]+$")},
|
||||
{name: "a module's import set said at its build's end (design 47 H2 H-A-517)", subject: "mesh.seat.node-build-go.event.imports-reported.anchor", given: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"imports\":[\"git.novox.be/novox/mesh-sdk/go/bus\",\"git.novox.be/novox/mesh-sdk/go/catalogue\"],\"module\":\"nats\",\"node\":\"anchor\"}", wire: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"imports\":[\"git.novox.be/novox/mesh-sdk/go/bus\",\"git.novox.be/novox/mesh-sdk/go/catalogue\"],\"module\":\"nats\",\"node\":\"anchor\"}",
|
||||
decode: func(b []byte) (any, error) { var v ImportsReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.event\\.imports-reported\\.[^.*> ]+$")},
|
||||
{name: "a module whose programs import no mesh package says an empty set (H-A-532 DQ-2)", subject: "mesh.seat.node-build-go.event.imports-reported.anchor", given: "{\"commit\":\"89abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-4567\",\"imports\":[],\"module\":\"feh\",\"node\":\"anchor\"}", wire: "{\"commit\":\"89abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-4567\",\"imports\":[],\"module\":\"feh\",\"node\":\"anchor\"}",
|
||||
decode: func(b []byte) (any, error) { var v ImportsReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.event\\.imports-reported\\.[^.*> ]+$")},
|
||||
{name: "a running ask says its progress", subject: "mesh.seat.node-build-go.event.step-progress.anchor", given: "{\"ask\":\"a1b2\",\"asker\":\"runner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"fetch\"}", wire: "{\"ask\":\"a1b2\",\"asker\":\"runner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"fetch\"}",
|
||||
decode: func(b []byte) (any, error) { var v StepProgressEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.event\\.step-progress\\.[^.*> ]+$")},
|
||||
{name: "a builder's build ended, naming its asker and no commit or fingerprint (G 548)", subject: "mesh.seat.node-build-go.event.step-ended.anchor", given: "{\"ask\":\"m2kx9a1b3c4d6a\",\"asker\":\"mesh-delivery-builder\",\"at\":\"2026-11-11T10:03:00Z\",\"id\":\"m2kx9a1b3c4d6a\",\"node\":\"anchor\",\"outcome\":\"failed\",\"said\":\"the build failed\",\"v\":1}", wire: "{\"ask\":\"m2kx9a1b3c4d6a\",\"asker\":\"mesh-delivery-builder\",\"at\":\"2026-11-11T10:03:00Z\",\"id\":\"m2kx9a1b3c4d6a\",\"node\":\"anchor\",\"outcome\":\"failed\",\"said\":\"the build failed\",\"v\":1}",
|
||||
|
||||
@@ -17,13 +17,13 @@ const Seat = "node-build-image"
|
||||
const Form = 1
|
||||
|
||||
// FormBuildStep is the form of what the part build-step adds.
|
||||
const FormBuildStep = 3
|
||||
const FormBuildStep = 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 = "1 build-step:3"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
generatedForms = "1 build-step:4"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c ImportsReported=c5960405236e ImportsReportedEvent=1615a3e4797e InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -48,6 +48,7 @@ const (
|
||||
const (
|
||||
EventStepEnded = "step-ended"
|
||||
EventToolchainReported = "toolchain-reported"
|
||||
EventImportsReported = "imports-reported"
|
||||
EventStepProgress = "step-progress"
|
||||
EventAskTaken = "ask-taken"
|
||||
)
|
||||
@@ -83,7 +84,7 @@ func VerbDescription(verb string) string {
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
func Events() []string {
|
||||
return []string{EventStepEnded, EventToolchainReported, EventStepProgress, EventAskTaken}
|
||||
return []string{EventStepEnded, EventToolchainReported, EventImportsReported, EventStepProgress, EventAskTaken}
|
||||
}
|
||||
|
||||
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
||||
@@ -114,6 +115,17 @@ func SubjectToolchainReported(node string) string {
|
||||
// SubjectToolchainReportedAll hears every toolchain-reported.
|
||||
const SubjectToolchainReportedAll = "mesh.seat.node-build-image.event.toolchain-reported.*"
|
||||
|
||||
// StreamImportsReported is the stream imports-reported is kept in.
|
||||
const StreamImportsReported = "SEAT_node-build-image_imports-reported"
|
||||
|
||||
// SubjectImportsReported is where imports-reported is published, on mesh.seat.node-build-image.event.imports-reported.<node>.
|
||||
func SubjectImportsReported(node string) string {
|
||||
return "mesh.seat.node-build-image.event.imports-reported." + node
|
||||
}
|
||||
|
||||
// SubjectImportsReportedAll hears every imports-reported.
|
||||
const SubjectImportsReportedAll = "mesh.seat.node-build-image.event.imports-reported.*"
|
||||
|
||||
// SubjectStepProgress is where step-progress is published, on mesh.seat.node-build-image.event.step-progress.<node>.
|
||||
func SubjectStepProgress(node string) string {
|
||||
return "mesh.seat.node-build-image.event.step-progress." + node
|
||||
@@ -584,6 +596,22 @@ type FetchRefusal struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// ImportsReported is the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2).
|
||||
type ImportsReported struct {
|
||||
// the commit the build was made from
|
||||
Commit string `json:"commit"`
|
||||
// the fingerprint the build was asked for
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
Form int64 `json:"form,omitempty"`
|
||||
// each mesh package the module's programs import, by its import path; empty when they import none
|
||||
Imports []string `json:"imports"`
|
||||
// the module built
|
||||
Module string `json:"module"`
|
||||
// the node the build ran on
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// InstallAsk is the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers.
|
||||
type InstallAsk struct {
|
||||
// who asked it
|
||||
@@ -1241,6 +1269,9 @@ type StepEndedEvent = StepEnded
|
||||
// ToolchainReportedEvent is the body of the event toolchain-reported.
|
||||
type ToolchainReportedEvent = ToolchainReported
|
||||
|
||||
// ImportsReportedEvent is the body of the event imports-reported.
|
||||
type ImportsReportedEvent = ImportsReported
|
||||
|
||||
// StepProgressEvent is the body of the event step-progress.
|
||||
type StepProgressEvent = StepProgress
|
||||
|
||||
@@ -1358,6 +1389,15 @@ func DecodeToolchainReportedEvent(raw []byte) (ToolchainReportedEvent, int, erro
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeImportsReportedEvent reads a ImportsReportedEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeImportsReportedEvent(raw []byte) (ImportsReportedEvent, int, error) {
|
||||
var v ImportsReportedEvent
|
||||
if err := json.Unmarshal(raw, &v); err != nil {
|
||||
return v, 0, err
|
||||
}
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeStepProgressEvent reads a StepProgressEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeStepProgressEvent(raw []byte) (StepProgressEvent, int, error) {
|
||||
var v StepProgressEvent
|
||||
|
||||
@@ -17,13 +17,13 @@ const Seat = "node-build-node"
|
||||
const Form = 1
|
||||
|
||||
// FormBuildStep is the form of what the part build-step adds.
|
||||
const FormBuildStep = 3
|
||||
const FormBuildStep = 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 = "1 build-step:3"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c InstallAccept=ef89c6962ae4 InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
generatedForms = "1 build-step:4"
|
||||
generatedFieldsDigest = "AnswerAnswer=a3b42bd5e791 AskArtifact=35eb85c27e97 AskTaken=8c917075eed4 AskTakenEvent=e4fc9b81e066 BuiltArtifact=b5fcef7a8b58 BuiltArtifactResolvedItem=3bcbbcfd1a1f Capacity=b40cca7ccdfa CheckAccept=ef89c6962ae4 CheckStepAccept=ef89c6962ae4 CurrentAnswer=e39824e012cb CurrentAsk=ac167e5ee11f DeliveryAccept=ef89c6962ae4 DeliveryStepAccept=ef89c6962ae4 DetectedStep=a6fcd7d0eca4 DetectedSteps=05198185c776 DetectedStepsByModuleArtifactValue=cb35b5775cc6 Drop=fb4637978e86 DropAnswer=7538f2f5e68e FailingTest=f3fb3f1a3ca8 Fetch=6e12677bbc2c FetchAnswer=46fc3d5bd7ee FetchBesideItem=774b4bf88ba4 FetchBuildsItem=aee5adc97246 FetchPackage=20d1668a0eee FetchRefusal=de1518848b4c ImportsReported=c5960405236e ImportsReportedEvent=1615a3e4797e InstallAccept=ef89c6962ae4 InstallAsk=9f965aa5b30b KeptArtifactAnswer=706729f8ccb9 KeptResult=8657683cdcd7 LevelAnswer=143c69c28a6a LevelAnswerDigest=d54b7fd7b1da LevelAnswerDigestNeedsItem=946b37d1d4a1 LevelAnswerDigestPackagesItem=a7d30558470d LevelAnswerKeptItem=85d3c2f78632 LevelAnswerUnmetItem=946b37d1d4a1 ModuleTree=00bb59e9f262 NotRun=d322fb1eb153 OutputAnswer=97ba4bd92bf9 Pause=d6521e0cdd1e PauseAnswer=7538f2f5e68e PausesByCapacityNodeValue=5392cf505c80 PausesByDroppedIDValue=0e15ac9cacbd PausesByPausedNodeValue=d111aad0f0cf PlacedBeside=53479337ff18 Program=b48ae74f34e0 RecheckAccept=ef89c6962ae4 ResumeAnswer=7538f2f5e68e RunHead=774b4bf88ba4 RunInput=3dc41505a4b7 RunJob=88af2a7f432b RunProgram=6fd636999d54 Step=75190430d510 StepAsk=f0d09ea1670e StepAskBuild=de784b6c05da StepAskCheck=b77941df6dea StepAskCompose=4c6a08e10231 StepEnded=9bc24593a47d StepEndedEvent=207787118dac StepProgress=d25781cc895a StepProgressEvent=179344ce0ca2 StepResult=67f88be36d0e StepRun=a7a81f25515f StepsAnswer=2c02cac2df23 StepsByAskerNodeIDValue=50ccfd4cebd8 StepsByNodeIDValue=50ccfd4cebd8 TakenVersion=1b8d0547f61e TestCounts=9c1332427159 Toolchain=8ecb7debf9ad ToolchainReported=d26392767c50 ToolchainReportedEvent=fa0a431c9c7b ToolchainUsed=6cc7ccabc9f8 ToolchainsByNodeLanguageValue=f97d1dd27613"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -49,6 +49,7 @@ const (
|
||||
const (
|
||||
EventStepEnded = "step-ended"
|
||||
EventToolchainReported = "toolchain-reported"
|
||||
EventImportsReported = "imports-reported"
|
||||
EventStepProgress = "step-progress"
|
||||
EventAskTaken = "ask-taken"
|
||||
)
|
||||
@@ -84,7 +85,7 @@ func VerbDescription(verb string) string {
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
func Events() []string {
|
||||
return []string{EventStepEnded, EventToolchainReported, EventStepProgress, EventAskTaken}
|
||||
return []string{EventStepEnded, EventToolchainReported, EventImportsReported, EventStepProgress, EventAskTaken}
|
||||
}
|
||||
|
||||
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
||||
@@ -115,6 +116,17 @@ func SubjectToolchainReported(node string) string {
|
||||
// SubjectToolchainReportedAll hears every toolchain-reported.
|
||||
const SubjectToolchainReportedAll = "mesh.seat.node-build-node.event.toolchain-reported.*"
|
||||
|
||||
// StreamImportsReported is the stream imports-reported is kept in.
|
||||
const StreamImportsReported = "SEAT_node-build-node_imports-reported"
|
||||
|
||||
// SubjectImportsReported is where imports-reported is published, on mesh.seat.node-build-node.event.imports-reported.<node>.
|
||||
func SubjectImportsReported(node string) string {
|
||||
return "mesh.seat.node-build-node.event.imports-reported." + node
|
||||
}
|
||||
|
||||
// SubjectImportsReportedAll hears every imports-reported.
|
||||
const SubjectImportsReportedAll = "mesh.seat.node-build-node.event.imports-reported.*"
|
||||
|
||||
// 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
|
||||
@@ -588,6 +600,22 @@ type FetchRefusal struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// ImportsReported is the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2).
|
||||
type ImportsReported struct {
|
||||
// the commit the build was made from
|
||||
Commit string `json:"commit"`
|
||||
// the fingerprint the build was asked for
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
Form int64 `json:"form,omitempty"`
|
||||
// each mesh package the module's programs import, by its import path; empty when they import none
|
||||
Imports []string `json:"imports"`
|
||||
// the module built
|
||||
Module string `json:"module"`
|
||||
// the node the build ran on
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// InstallAsk is the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers.
|
||||
type InstallAsk struct {
|
||||
// who asked it
|
||||
@@ -1248,6 +1276,9 @@ type StepEndedEvent = StepEnded
|
||||
// ToolchainReportedEvent is the body of the event toolchain-reported.
|
||||
type ToolchainReportedEvent = ToolchainReported
|
||||
|
||||
// ImportsReportedEvent is the body of the event imports-reported.
|
||||
type ImportsReportedEvent = ImportsReported
|
||||
|
||||
// StepProgressEvent is the body of the event step-progress.
|
||||
type StepProgressEvent = StepProgress
|
||||
|
||||
@@ -1365,6 +1396,15 @@ func DecodeToolchainReportedEvent(raw []byte) (ToolchainReportedEvent, int, erro
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeImportsReportedEvent reads a ImportsReportedEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeImportsReportedEvent(raw []byte) (ImportsReportedEvent, int, error) {
|
||||
var v ImportsReportedEvent
|
||||
if err := json.Unmarshal(raw, &v); err != nil {
|
||||
return v, 0, err
|
||||
}
|
||||
return v, formRead(raw), nil
|
||||
}
|
||||
|
||||
// DecodeStepProgressEvent reads a StepProgressEvent as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
|
||||
func DecodeStepProgressEvent(raw []byte) (StepProgressEvent, int, error) {
|
||||
var v StepProgressEvent
|
||||
|
||||
@@ -23,6 +23,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.event\\.step-ended\\.[^.*> ]+$")},
|
||||
{name: "a node's toolchain reported", subject: "mesh.seat.node-build-node.event.toolchain-reported.anchor", given: "{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"language\":\"go\",\"node\":\"anchor\",\"recipe\":\"1\",\"version\":\"1.26.0\"}", wire: "{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"language\":\"go\",\"node\":\"anchor\",\"recipe\":\"1\",\"version\":\"1.26.0\"}",
|
||||
decode: func(b []byte) (any, error) { var v ToolchainReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.event\\.toolchain-reported\\.[^.*> ]+$")},
|
||||
{name: "a module's import set said at its build's end (design 47 H2 H-A-517)", subject: "mesh.seat.node-build-node.event.imports-reported.anchor", given: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"imports\":[\"@novox/mesh-sdk\"],\"module\":\"nats\",\"node\":\"anchor\"}", wire: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"imports\":[\"@novox/mesh-sdk\"],\"module\":\"nats\",\"node\":\"anchor\"}",
|
||||
decode: func(b []byte) (any, error) { var v ImportsReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.event\\.imports-reported\\.[^.*> ]+$")},
|
||||
{name: "a module whose programs import no mesh package says an empty set (H-A-532 DQ-2)", subject: "mesh.seat.node-build-node.event.imports-reported.anchor", given: "{\"commit\":\"89abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-4567\",\"imports\":[],\"module\":\"feh\",\"node\":\"anchor\"}", wire: "{\"commit\":\"89abcdef0123456789abcdef0123456789abcdef\",\"fingerprint\":\"fp-4567\",\"imports\":[],\"module\":\"feh\",\"node\":\"anchor\"}",
|
||||
decode: func(b []byte) (any, error) { var v ImportsReportedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.event\\.imports-reported\\.[^.*> ]+$")},
|
||||
{name: "a running ask says its progress", subject: "mesh.seat.node-build-node.event.step-progress.anchor", given: "{\"ask\":\"a1b2\",\"asker\":\"runner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"fetch\"}", wire: "{\"ask\":\"a1b2\",\"asker\":\"runner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"fetch\"}",
|
||||
decode: func(b []byte) (any, error) { var v StepProgressEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.event\\.step-progress\\.[^.*> ]+$")},
|
||||
{name: "a builder's build ended, naming its asker and no commit or fingerprint (G 548)", subject: "mesh.seat.node-build-node.event.step-ended.anchor", given: "{\"ask\":\"m2kx9a1b3c4d6a\",\"asker\":\"mesh-delivery-builder\",\"at\":\"2026-11-11T10:03:00Z\",\"id\":\"m2kx9a1b3c4d6a\",\"node\":\"anchor\",\"outcome\":\"failed\",\"said\":\"the build failed\",\"v\":1}", wire: "{\"ask\":\"m2kx9a1b3c4d6a\",\"asker\":\"mesh-delivery-builder\",\"at\":\"2026-11-11T10:03:00Z\",\"id\":\"m2kx9a1b3c4d6a\",\"node\":\"anchor\",\"outcome\":\"failed\",\"said\":\"the build failed\",\"v\":1}",
|
||||
|
||||
@@ -2059,6 +2059,42 @@
|
||||
"fingerprint",
|
||||
"lock"
|
||||
]
|
||||
},
|
||||
"ImportsReported": {
|
||||
"type": "object",
|
||||
"description": "the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2)",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string",
|
||||
"description": "the node the build ran on"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module built"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the fingerprint the build was asked for"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the commit the build was made from"
|
||||
},
|
||||
"imports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "each mesh package the module's programs import, by its import path; empty when they import none"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module",
|
||||
"fingerprint",
|
||||
"commit",
|
||||
"imports"
|
||||
]
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
@@ -2084,6 +2120,17 @@
|
||||
"max-mib": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "imports-reported",
|
||||
"subject": "imports-reported.<node>",
|
||||
"body": {
|
||||
"$ref": "#/defs/ImportsReported"
|
||||
},
|
||||
"keep": {
|
||||
"max-age-days": 90,
|
||||
"max-mib": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "step-progress",
|
||||
"subject": "step-progress.<node>",
|
||||
@@ -2099,5 +2146,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"form": 3
|
||||
"form": 4
|
||||
}
|
||||
|
||||
@@ -72,6 +72,33 @@
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module's import set said at its build's end (design 47 H2 H-A-517)",
|
||||
"of": "event:imports-reported",
|
||||
"subject": "mesh.seat.node-build-go.event.imports-reported.anchor",
|
||||
"given": {
|
||||
"node": "anchor",
|
||||
"module": "nats",
|
||||
"fingerprint": "fp-0123",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"imports": [
|
||||
"git.novox.be/novox/mesh-sdk/go/bus",
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module whose programs import no mesh package says an empty set (H-A-532 DQ-2)",
|
||||
"of": "event:imports-reported",
|
||||
"subject": "mesh.seat.node-build-go.event.imports-reported.anchor",
|
||||
"given": {
|
||||
"node": "anchor",
|
||||
"module": "feh",
|
||||
"fingerprint": "fp-4567",
|
||||
"commit": "89abcdef0123456789abcdef0123456789abcdef",
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a running ask says its progress",
|
||||
"of": "event:step-progress",
|
||||
|
||||
@@ -72,6 +72,32 @@
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module's import set said at its build's end (design 47 H2 H-A-517)",
|
||||
"of": "event:imports-reported",
|
||||
"subject": "mesh.seat.node-build-node.event.imports-reported.anchor",
|
||||
"given": {
|
||||
"node": "anchor",
|
||||
"module": "nats",
|
||||
"fingerprint": "fp-0123",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"imports": [
|
||||
"@novox/mesh-sdk"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module whose programs import no mesh package says an empty set (H-A-532 DQ-2)",
|
||||
"of": "event:imports-reported",
|
||||
"subject": "mesh.seat.node-build-node.event.imports-reported.anchor",
|
||||
"given": {
|
||||
"node": "anchor",
|
||||
"module": "feh",
|
||||
"fingerprint": "fp-4567",
|
||||
"commit": "89abcdef0123456789abcdef0123456789abcdef",
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a running ask says its progress",
|
||||
"of": "event:step-progress",
|
||||
|
||||
@@ -29,6 +29,7 @@ export declare const accepts: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -47,6 +48,12 @@ export declare function toolchainReportedSubject(node: string): string;
|
||||
|
||||
export declare const toolchainReportedSubjectAll: "mesh.seat.node-build-go.event.toolchain-reported.*";
|
||||
|
||||
export declare const importsReportedStream: "SEAT_node-build-go_imports-reported";
|
||||
|
||||
export declare function importsReportedSubject(node: string): string;
|
||||
|
||||
export declare const importsReportedSubjectAll: "mesh.seat.node-build-go.event.imports-reported.*";
|
||||
|
||||
export declare function stepProgressSubject(node: string): string;
|
||||
|
||||
export declare const stepProgressSubjectAll: "mesh.seat.node-build-go.event.step-progress.*";
|
||||
@@ -142,6 +149,8 @@ export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchBuildsItem = buildStep.FetchBuildsItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type ImportsReported = buildStep.ImportsReported;
|
||||
export type ImportsReportedEvent = buildStep.ImportsReportedEvent;
|
||||
export type InstallAsk = buildStep.InstallAsk;
|
||||
export type KeptArtifactAnswer = buildStep.KeptArtifactAnswer;
|
||||
export type KeptArtifactInput = buildStep.KeptArtifactInput;
|
||||
|
||||
@@ -27,6 +27,7 @@ export const accepts = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
@@ -49,6 +50,14 @@ export function toolchainReportedSubject(node) {
|
||||
|
||||
export const toolchainReportedSubjectAll = "mesh.seat.node-build-go.event.toolchain-reported.*";
|
||||
|
||||
export const importsReportedStream = "SEAT_node-build-go_imports-reported";
|
||||
|
||||
export function importsReportedSubject(node) {
|
||||
return "mesh.seat.node-build-go.event.imports-reported." + node;
|
||||
}
|
||||
|
||||
export const importsReportedSubjectAll = "mesh.seat.node-build-go.event.imports-reported.*";
|
||||
|
||||
export function stepProgressSubject(node) {
|
||||
return "mesh.seat.node-build-go.event.step-progress." + node;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export declare const verbs: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -215,6 +216,22 @@ export interface FetchRefusal {
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2) */
|
||||
export interface ImportsReported {
|
||||
/** the commit the build was made from */
|
||||
"commit": string;
|
||||
/** the fingerprint the build was asked for */
|
||||
"fingerprint": string;
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
"form"?: number;
|
||||
/** each mesh package the module's programs import, by its import path; empty when they import none */
|
||||
"imports": string[];
|
||||
/** the module built */
|
||||
"module": string;
|
||||
/** the node the build ran on */
|
||||
"node": string;
|
||||
}
|
||||
|
||||
/** the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers */
|
||||
export interface InstallAsk {
|
||||
/** who asked it */
|
||||
@@ -797,6 +814,9 @@ export type StepEndedEvent = StepEnded;
|
||||
/** is the body of the event toolchain-reported. */
|
||||
export type ToolchainReportedEvent = ToolchainReported;
|
||||
|
||||
/** is the body of the event imports-reported. */
|
||||
export type ImportsReportedEvent = ImportsReported;
|
||||
|
||||
/** is the body of the event step-progress. */
|
||||
export type StepProgressEvent = StepProgress;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export const verbs = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@ export declare const accepts: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -46,6 +47,12 @@ export declare function toolchainReportedSubject(node: string): string;
|
||||
|
||||
export declare const toolchainReportedSubjectAll: "mesh.seat.node-build-image.event.toolchain-reported.*";
|
||||
|
||||
export declare const importsReportedStream: "SEAT_node-build-image_imports-reported";
|
||||
|
||||
export declare function importsReportedSubject(node: string): string;
|
||||
|
||||
export declare const importsReportedSubjectAll: "mesh.seat.node-build-image.event.imports-reported.*";
|
||||
|
||||
export declare function stepProgressSubject(node: string): string;
|
||||
|
||||
export declare const stepProgressSubjectAll: "mesh.seat.node-build-image.event.step-progress.*";
|
||||
@@ -139,6 +146,8 @@ export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchBuildsItem = buildStep.FetchBuildsItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type ImportsReported = buildStep.ImportsReported;
|
||||
export type ImportsReportedEvent = buildStep.ImportsReportedEvent;
|
||||
export type InstallAsk = buildStep.InstallAsk;
|
||||
export type KeptArtifactAnswer = buildStep.KeptArtifactAnswer;
|
||||
export type KeptArtifactInput = buildStep.KeptArtifactInput;
|
||||
|
||||
@@ -26,6 +26,7 @@ export const accepts = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
@@ -48,6 +49,14 @@ export function toolchainReportedSubject(node) {
|
||||
|
||||
export const toolchainReportedSubjectAll = "mesh.seat.node-build-image.event.toolchain-reported.*";
|
||||
|
||||
export const importsReportedStream = "SEAT_node-build-image_imports-reported";
|
||||
|
||||
export function importsReportedSubject(node) {
|
||||
return "mesh.seat.node-build-image.event.imports-reported." + node;
|
||||
}
|
||||
|
||||
export const importsReportedSubjectAll = "mesh.seat.node-build-image.event.imports-reported.*";
|
||||
|
||||
export function stepProgressSubject(node) {
|
||||
return "mesh.seat.node-build-image.event.step-progress." + node;
|
||||
}
|
||||
|
||||
+20
@@ -16,6 +16,7 @@ export declare const verbs: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -215,6 +216,22 @@ export interface FetchRefusal {
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2) */
|
||||
export interface ImportsReported {
|
||||
/** the commit the build was made from */
|
||||
"commit": string;
|
||||
/** the fingerprint the build was asked for */
|
||||
"fingerprint": string;
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
"form"?: number;
|
||||
/** each mesh package the module's programs import, by its import path; empty when they import none */
|
||||
"imports": string[];
|
||||
/** the module built */
|
||||
"module": string;
|
||||
/** the node the build ran on */
|
||||
"node": string;
|
||||
}
|
||||
|
||||
/** the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers */
|
||||
export interface InstallAsk {
|
||||
/** who asked it */
|
||||
@@ -797,6 +814,9 @@ export type StepEndedEvent = StepEnded;
|
||||
/** is the body of the event toolchain-reported. */
|
||||
export type ToolchainReportedEvent = ToolchainReported;
|
||||
|
||||
/** is the body of the event imports-reported. */
|
||||
export type ImportsReportedEvent = ImportsReported;
|
||||
|
||||
/** is the body of the event step-progress. */
|
||||
export type StepProgressEvent = StepProgress;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export const verbs = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@ export declare const accepts: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -47,6 +48,12 @@ export declare function toolchainReportedSubject(node: string): string;
|
||||
|
||||
export declare const toolchainReportedSubjectAll: "mesh.seat.node-build-node.event.toolchain-reported.*";
|
||||
|
||||
export declare const importsReportedStream: "SEAT_node-build-node_imports-reported";
|
||||
|
||||
export declare function importsReportedSubject(node: string): string;
|
||||
|
||||
export declare const importsReportedSubjectAll: "mesh.seat.node-build-node.event.imports-reported.*";
|
||||
|
||||
export declare function stepProgressSubject(node: string): string;
|
||||
|
||||
export declare const stepProgressSubjectAll: "mesh.seat.node-build-node.event.step-progress.*";
|
||||
@@ -142,6 +149,8 @@ export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchBuildsItem = buildStep.FetchBuildsItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type ImportsReported = buildStep.ImportsReported;
|
||||
export type ImportsReportedEvent = buildStep.ImportsReportedEvent;
|
||||
export type InstallAsk = buildStep.InstallAsk;
|
||||
export type KeptArtifactAnswer = buildStep.KeptArtifactAnswer;
|
||||
export type KeptArtifactInput = buildStep.KeptArtifactInput;
|
||||
|
||||
@@ -27,6 +27,7 @@ export const accepts = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
@@ -49,6 +50,14 @@ export function toolchainReportedSubject(node) {
|
||||
|
||||
export const toolchainReportedSubjectAll = "mesh.seat.node-build-node.event.toolchain-reported.*";
|
||||
|
||||
export const importsReportedStream = "SEAT_node-build-node_imports-reported";
|
||||
|
||||
export function importsReportedSubject(node) {
|
||||
return "mesh.seat.node-build-node.event.imports-reported." + node;
|
||||
}
|
||||
|
||||
export const importsReportedSubjectAll = "mesh.seat.node-build-node.event.imports-reported.*";
|
||||
|
||||
export function stepProgressSubject(node) {
|
||||
return "mesh.seat.node-build-node.event.step-progress." + node;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export declare const verbs: {
|
||||
export declare const events: {
|
||||
readonly stepEnded: "step-ended";
|
||||
readonly toolchainReported: "toolchain-reported";
|
||||
readonly importsReported: "imports-reported";
|
||||
readonly stepProgress: "step-progress";
|
||||
readonly askTaken: "ask-taken";
|
||||
};
|
||||
@@ -215,6 +216,22 @@ export interface FetchRefusal {
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** the mesh packages a module's programs import, said by the build module at a build's end (design 47 H2 H-A-517, H-A-532 DQ-2): the import closure without tests, each package by its import path, the union over the module's programs (H-A-518); the indexer keeps it only for the fingerprint main's modules state holds (H-A-532 DMC-2) */
|
||||
export interface ImportsReported {
|
||||
/** the commit the build was made from */
|
||||
"commit": string;
|
||||
/** the fingerprint the build was asked for */
|
||||
"fingerprint": string;
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
"form"?: number;
|
||||
/** each mesh package the module's programs import, by its import path; empty when they import none */
|
||||
"imports": string[];
|
||||
/** the module built */
|
||||
"module": string;
|
||||
/** the node the build ran on */
|
||||
"node": string;
|
||||
}
|
||||
|
||||
/** the job of an ask of the kind install (design 47 H2 §800, H-A-367 (4), H-A-403): the npm tree a module's package lock names, installed with an integrity-checked install and no install scripts, and published to the artifact store (the seat oci-artifact-registry) as the module's archive <module>:node-modules under the ask's version, which the builder's reservation covers */
|
||||
export interface InstallAsk {
|
||||
/** who asked it */
|
||||
@@ -797,6 +814,9 @@ export type StepEndedEvent = StepEnded;
|
||||
/** is the body of the event toolchain-reported. */
|
||||
export type ToolchainReportedEvent = ToolchainReported;
|
||||
|
||||
/** is the body of the event imports-reported. */
|
||||
export type ImportsReportedEvent = ImportsReported;
|
||||
|
||||
/** is the body of the event step-progress. */
|
||||
export type StepProgressEvent = StepProgress;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export const verbs = {
|
||||
export const events = {
|
||||
stepEnded: "step-ended",
|
||||
toolchainReported: "toolchain-reported",
|
||||
importsReported: "imports-reported",
|
||||
stepProgress: "step-progress",
|
||||
askTaken: "ask-taken",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user