Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecad0c688b | ||
|
|
aa89032f02 | ||
|
|
44422f21db | ||
|
|
67e1c7594f | ||
|
|
4d75646bf4 | ||
|
|
c2e7249897 | ||
|
|
35c3f5dd2f |
@@ -2,9 +2,3 @@ vendor/
|
||||
# A compiled program never enters a commit (issue 1577): `go build .` in a command directory leaves one there.
|
||||
modules/*/cmd/*/mesh-*
|
||||
!modules/*/cmd/*/mesh-*.go
|
||||
# `go build .` at a module's root leaves its program there too (the view's, met a second time).
|
||||
modules/*/mesh-*
|
||||
# The delivery SDK's commands (design 47 G §464), built in their own directory or at the SDK's root.
|
||||
/modules/mesh-delivery-sdk/cmd/seatgen/seatgen
|
||||
/modules/mesh-delivery-sdk/seatgen/seatgen
|
||||
/modules/mesh-delivery-sdk/mesh-pack
|
||||
|
||||
@@ -18,7 +18,6 @@ const (
|
||||
VerbCurrent = "current"
|
||||
VerbPause = "pause"
|
||||
VerbResume = "resume"
|
||||
VerbDrop = "drop"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -29,7 +28,7 @@ const (
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
func Verbs() []string {
|
||||
return []string{VerbCurrent, VerbPause, VerbResume, VerbDrop}
|
||||
return []string{VerbCurrent, VerbPause, VerbResume}
|
||||
}
|
||||
|
||||
// AcceptSubjectDelivery is where delivery is sent.
|
||||
@@ -118,41 +117,6 @@ func DecodePausesByPausedNodeValue(raw []byte) (PausesByPausedNodeValue, error)
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByDroppedIDKey is the key of one value of the state pauses under the form "dropped.<id>".
|
||||
func PausesByDroppedIDKey(id string) string { return "dropped." + id }
|
||||
|
||||
// ParsePausesByDroppedIDKey reads the parts of a key of the form "dropped.<id>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePausesByDroppedIDKey(key string) (string, bool) {
|
||||
rest := key
|
||||
if !strings.HasPrefix(rest, "dropped.") {
|
||||
return "", false
|
||||
}
|
||||
rest = rest[8:]
|
||||
if rest == "" {
|
||||
return "", false
|
||||
}
|
||||
v1 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", false
|
||||
}
|
||||
return v1, true
|
||||
}
|
||||
|
||||
// DecodePausesByDroppedIDValue reads one value of the state pauses under the form "dropped.<id>", refusing a field PausesByDroppedIDValue does not know and any text after the value.
|
||||
func DecodePausesByDroppedIDValue(raw []byte) (PausesByDroppedIDValue, error) {
|
||||
var v PausesByDroppedIDValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByCapacityNodeKey is the key of one value of the state pauses under the form "capacity.<node>".
|
||||
func PausesByCapacityNodeKey(node string) string { return "capacity." + node }
|
||||
|
||||
@@ -281,16 +245,6 @@ type ComposeAnswer struct {
|
||||
Verdict any `json:"verdict,omitempty"`
|
||||
}
|
||||
|
||||
// Drop is an ask a caller no longer waits for.
|
||||
type Drop struct {
|
||||
// when (RFC 3339 time)
|
||||
At *time.Time `json:"at,omitempty"`
|
||||
By string `json:"by,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// FetchBesideItem is a type of the contract.
|
||||
type FetchBesideItem struct {
|
||||
Commit string `json:"commit"`
|
||||
@@ -479,25 +433,19 @@ type RunProgram struct {
|
||||
|
||||
// Step is one step a build module runs on a node.
|
||||
type Step struct {
|
||||
// when the bus gives the ask again, for the state again (RFC 3339 time)
|
||||
AgainAt *time.Time `json:"again-at,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Node string `json:"node"`
|
||||
Owner string `json:"owner,omitempty"`
|
||||
// true when the step ended on a fault that passes (a transport fault), so a failed end after the last run says so
|
||||
Passing bool `json:"passing,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
PhaseAt *time.Time `json:"phase-at,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Result *StepResult `json:"result,omitempty"`
|
||||
// which run of the ask this is, counted by the bus's delivery count (1 for the first)
|
||||
Run int64 `json:"run,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Started time.Time `json:"started"`
|
||||
// running, again (ended on a transport fault, to be given again by the bus after again-at), passed, failed, refused or dropped (ended by the verb drop, its cause the reason)
|
||||
// running, passed, failed or refused
|
||||
State string `json:"state"`
|
||||
Tool string `json:"tool"`
|
||||
// the layout version
|
||||
@@ -537,7 +485,7 @@ type StepAskCompose struct {
|
||||
Fetch Fetch `json:"fetch"`
|
||||
Package string `json:"package"`
|
||||
Reader string `json:"reader,omitempty"`
|
||||
// the compose-candidate request, in one of two forms: the request as a JSON object, or, for one near the bus's message limit, a JSON string "gzip+base64:" followed by the base64 of the request object gzip-compressed; a holder that does not know the packed form refuses it, naming that it holds no request object
|
||||
// the compose-candidate request
|
||||
Request any `json:"request"`
|
||||
}
|
||||
|
||||
@@ -640,19 +588,6 @@ type ResumeInput struct {
|
||||
// ResumeAnswer is what resume answers.
|
||||
type ResumeAnswer = map[string]any
|
||||
|
||||
// DropInput is what drop takes.
|
||||
type DropInput struct {
|
||||
// who drops it
|
||||
By string `json:"by,omitempty"`
|
||||
// the ask's id
|
||||
ID string `json:"id"`
|
||||
// why the caller no longer waits
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// DropAnswer is what drop answers.
|
||||
type DropAnswer = map[string]any
|
||||
|
||||
// DeliveryAccept is the body of delivery.
|
||||
type DeliveryAccept = StepAsk
|
||||
|
||||
@@ -668,9 +603,6 @@ type StepsByNodeIDValue = Step
|
||||
// PausesByPausedNodeValue is one value of the state pauses under the key paused.<node>.
|
||||
type PausesByPausedNodeValue = Pause
|
||||
|
||||
// PausesByDroppedIDValue is one value of the state pauses under the key dropped.<id>.
|
||||
type PausesByDroppedIDValue = Drop
|
||||
|
||||
// PausesByCapacityNodeValue is one value of the state pauses under the key capacity.<node>.
|
||||
type PausesByCapacityNodeValue = Capacity
|
||||
|
||||
|
||||
@@ -53,12 +53,6 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v CheckAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.check$")},
|
||||
{name: "a finished run step whose program exited non-zero", subject: "", given: "{\"ended\":\"2026-11-05T10:01:00Z\",\"id\":\"r5e6\",\"node\":\"ace\",\"result\":{\"built\":true,\"exit\":2,\"key\":\"program-0123456789abcdef\",\"said\":\"the facts name no head\"},\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"failed\",\"tool\":\"check\",\"v\":1}", wire: "{\"ended\":\"2026-11-05T10:01:00Z\",\"id\":\"r5e6\",\"node\":\"ace\",\"result\":{\"built\":true,\"exit\":2,\"key\":\"program-0123456789abcdef\",\"said\":\"the facts name no head\"},\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"failed\",\"tool\":\"check\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a step ended on a transport fault, given again by the bus", subject: "", given: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}", wire: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "drop names the ask and why", subject: "", given: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v DropInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -18,7 +18,6 @@ const (
|
||||
VerbCurrent = "current"
|
||||
VerbPause = "pause"
|
||||
VerbResume = "resume"
|
||||
VerbDrop = "drop"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -29,7 +28,7 @@ const (
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
func Verbs() []string {
|
||||
return []string{VerbCurrent, VerbPause, VerbResume, VerbDrop}
|
||||
return []string{VerbCurrent, VerbPause, VerbResume}
|
||||
}
|
||||
|
||||
// AcceptSubjectDelivery is where delivery is sent.
|
||||
@@ -118,41 +117,6 @@ func DecodePausesByPausedNodeValue(raw []byte) (PausesByPausedNodeValue, error)
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByDroppedIDKey is the key of one value of the state pauses under the form "dropped.<id>".
|
||||
func PausesByDroppedIDKey(id string) string { return "dropped." + id }
|
||||
|
||||
// ParsePausesByDroppedIDKey reads the parts of a key of the form "dropped.<id>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePausesByDroppedIDKey(key string) (string, bool) {
|
||||
rest := key
|
||||
if !strings.HasPrefix(rest, "dropped.") {
|
||||
return "", false
|
||||
}
|
||||
rest = rest[8:]
|
||||
if rest == "" {
|
||||
return "", false
|
||||
}
|
||||
v1 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", false
|
||||
}
|
||||
return v1, true
|
||||
}
|
||||
|
||||
// DecodePausesByDroppedIDValue reads one value of the state pauses under the form "dropped.<id>", refusing a field PausesByDroppedIDValue does not know and any text after the value.
|
||||
func DecodePausesByDroppedIDValue(raw []byte) (PausesByDroppedIDValue, error) {
|
||||
var v PausesByDroppedIDValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByCapacityNodeKey is the key of one value of the state pauses under the form "capacity.<node>".
|
||||
func PausesByCapacityNodeKey(node string) string { return "capacity." + node }
|
||||
|
||||
@@ -281,16 +245,6 @@ type ComposeAnswer struct {
|
||||
Verdict any `json:"verdict,omitempty"`
|
||||
}
|
||||
|
||||
// Drop is an ask a caller no longer waits for.
|
||||
type Drop struct {
|
||||
// when (RFC 3339 time)
|
||||
At *time.Time `json:"at,omitempty"`
|
||||
By string `json:"by,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// FetchBesideItem is a type of the contract.
|
||||
type FetchBesideItem struct {
|
||||
Commit string `json:"commit"`
|
||||
@@ -479,25 +433,19 @@ type RunProgram struct {
|
||||
|
||||
// Step is one step a build module runs on a node.
|
||||
type Step struct {
|
||||
// when the bus gives the ask again, for the state again (RFC 3339 time)
|
||||
AgainAt *time.Time `json:"again-at,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Node string `json:"node"`
|
||||
Owner string `json:"owner,omitempty"`
|
||||
// true when the step ended on a fault that passes (a transport fault), so a failed end after the last run says so
|
||||
Passing bool `json:"passing,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
PhaseAt *time.Time `json:"phase-at,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Result *StepResult `json:"result,omitempty"`
|
||||
// which run of the ask this is, counted by the bus's delivery count (1 for the first)
|
||||
Run int64 `json:"run,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Started time.Time `json:"started"`
|
||||
// running, again (ended on a transport fault, to be given again by the bus after again-at), passed, failed, refused or dropped (ended by the verb drop, its cause the reason)
|
||||
// running, passed, failed or refused
|
||||
State string `json:"state"`
|
||||
Tool string `json:"tool"`
|
||||
// the layout version
|
||||
@@ -537,7 +485,7 @@ type StepAskCompose struct {
|
||||
Fetch Fetch `json:"fetch"`
|
||||
Package string `json:"package"`
|
||||
Reader string `json:"reader,omitempty"`
|
||||
// the compose-candidate request, in one of two forms: the request as a JSON object, or, for one near the bus's message limit, a JSON string "gzip+base64:" followed by the base64 of the request object gzip-compressed; a holder that does not know the packed form refuses it, naming that it holds no request object
|
||||
// the compose-candidate request
|
||||
Request any `json:"request"`
|
||||
}
|
||||
|
||||
@@ -640,19 +588,6 @@ type ResumeInput struct {
|
||||
// ResumeAnswer is what resume answers.
|
||||
type ResumeAnswer = map[string]any
|
||||
|
||||
// DropInput is what drop takes.
|
||||
type DropInput struct {
|
||||
// who drops it
|
||||
By string `json:"by,omitempty"`
|
||||
// the ask's id
|
||||
ID string `json:"id"`
|
||||
// why the caller no longer waits
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// DropAnswer is what drop answers.
|
||||
type DropAnswer = map[string]any
|
||||
|
||||
// DeliveryAccept is the body of delivery.
|
||||
type DeliveryAccept = StepAsk
|
||||
|
||||
@@ -668,9 +603,6 @@ type StepsByNodeIDValue = Step
|
||||
// PausesByPausedNodeValue is one value of the state pauses under the key paused.<node>.
|
||||
type PausesByPausedNodeValue = Pause
|
||||
|
||||
// PausesByDroppedIDValue is one value of the state pauses under the key dropped.<id>.
|
||||
type PausesByDroppedIDValue = Drop
|
||||
|
||||
// PausesByCapacityNodeValue is one value of the state pauses under the key capacity.<node>.
|
||||
type PausesByCapacityNodeValue = Capacity
|
||||
|
||||
|
||||
@@ -39,12 +39,6 @@ func TestFixtures(t *testing.T) {
|
||||
}, subjectIs: nil},
|
||||
{name: "a build ask", subject: "mesh.seat.node-build-image.accept.delivery", given: "{\"asker\":\"mesh-delivery-builder\",\"build\":{\"artifacts\":[{\"artifact\":\"go\"}],\"module\":\"nats\"},\"id\":\"a1b2\",\"kind\":\"build\",\"language\":\"go\"}", wire: "{\"asker\":\"mesh-delivery-builder\",\"build\":{\"artifacts\":[{\"artifact\":\"go\"}],\"module\":\"nats\"},\"id\":\"a1b2\",\"kind\":\"build\",\"language\":\"go\"}",
|
||||
decode: func(b []byte) (any, error) { var v DeliveryAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-image\\.accept\\.delivery$")},
|
||||
{name: "a step ended on a transport fault, given again by the bus", subject: "", given: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}", wire: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "drop names the ask and why", subject: "", given: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v DropInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -18,7 +18,6 @@ const (
|
||||
VerbCurrent = "current"
|
||||
VerbPause = "pause"
|
||||
VerbResume = "resume"
|
||||
VerbDrop = "drop"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -29,7 +28,7 @@ const (
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
func Verbs() []string {
|
||||
return []string{VerbCurrent, VerbPause, VerbResume, VerbDrop}
|
||||
return []string{VerbCurrent, VerbPause, VerbResume}
|
||||
}
|
||||
|
||||
// AcceptSubjectDelivery is where delivery is sent.
|
||||
@@ -118,41 +117,6 @@ func DecodePausesByPausedNodeValue(raw []byte) (PausesByPausedNodeValue, error)
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByDroppedIDKey is the key of one value of the state pauses under the form "dropped.<id>".
|
||||
func PausesByDroppedIDKey(id string) string { return "dropped." + id }
|
||||
|
||||
// ParsePausesByDroppedIDKey reads the parts of a key of the form "dropped.<id>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePausesByDroppedIDKey(key string) (string, bool) {
|
||||
rest := key
|
||||
if !strings.HasPrefix(rest, "dropped.") {
|
||||
return "", false
|
||||
}
|
||||
rest = rest[8:]
|
||||
if rest == "" {
|
||||
return "", false
|
||||
}
|
||||
v1 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", false
|
||||
}
|
||||
return v1, true
|
||||
}
|
||||
|
||||
// DecodePausesByDroppedIDValue reads one value of the state pauses under the form "dropped.<id>", refusing a field PausesByDroppedIDValue does not know and any text after the value.
|
||||
func DecodePausesByDroppedIDValue(raw []byte) (PausesByDroppedIDValue, error) {
|
||||
var v PausesByDroppedIDValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PausesByCapacityNodeKey is the key of one value of the state pauses under the form "capacity.<node>".
|
||||
func PausesByCapacityNodeKey(node string) string { return "capacity." + node }
|
||||
|
||||
@@ -281,16 +245,6 @@ type ComposeAnswer struct {
|
||||
Verdict any `json:"verdict,omitempty"`
|
||||
}
|
||||
|
||||
// Drop is an ask a caller no longer waits for.
|
||||
type Drop struct {
|
||||
// when (RFC 3339 time)
|
||||
At *time.Time `json:"at,omitempty"`
|
||||
By string `json:"by,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// FetchBesideItem is a type of the contract.
|
||||
type FetchBesideItem struct {
|
||||
Commit string `json:"commit"`
|
||||
@@ -479,25 +433,19 @@ type RunProgram struct {
|
||||
|
||||
// Step is one step a build module runs on a node.
|
||||
type Step struct {
|
||||
// when the bus gives the ask again, for the state again (RFC 3339 time)
|
||||
AgainAt *time.Time `json:"again-at,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Node string `json:"node"`
|
||||
Owner string `json:"owner,omitempty"`
|
||||
// true when the step ended on a fault that passes (a transport fault), so a failed end after the last run says so
|
||||
Passing bool `json:"passing,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
PhaseAt *time.Time `json:"phase-at,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Result *StepResult `json:"result,omitempty"`
|
||||
// which run of the ask this is, counted by the bus's delivery count (1 for the first)
|
||||
Run int64 `json:"run,omitempty"`
|
||||
// when (RFC 3339 time)
|
||||
Started time.Time `json:"started"`
|
||||
// running, again (ended on a transport fault, to be given again by the bus after again-at), passed, failed, refused or dropped (ended by the verb drop, its cause the reason)
|
||||
// running, passed, failed or refused
|
||||
State string `json:"state"`
|
||||
Tool string `json:"tool"`
|
||||
// the layout version
|
||||
@@ -537,7 +485,7 @@ type StepAskCompose struct {
|
||||
Fetch Fetch `json:"fetch"`
|
||||
Package string `json:"package"`
|
||||
Reader string `json:"reader,omitempty"`
|
||||
// the compose-candidate request, in one of two forms: the request as a JSON object, or, for one near the bus's message limit, a JSON string "gzip+base64:" followed by the base64 of the request object gzip-compressed; a holder that does not know the packed form refuses it, naming that it holds no request object
|
||||
// the compose-candidate request
|
||||
Request any `json:"request"`
|
||||
}
|
||||
|
||||
@@ -640,19 +588,6 @@ type ResumeInput struct {
|
||||
// ResumeAnswer is what resume answers.
|
||||
type ResumeAnswer = map[string]any
|
||||
|
||||
// DropInput is what drop takes.
|
||||
type DropInput struct {
|
||||
// who drops it
|
||||
By string `json:"by,omitempty"`
|
||||
// the ask's id
|
||||
ID string `json:"id"`
|
||||
// why the caller no longer waits
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// DropAnswer is what drop answers.
|
||||
type DropAnswer = map[string]any
|
||||
|
||||
// DeliveryAccept is the body of delivery.
|
||||
type DeliveryAccept = StepAsk
|
||||
|
||||
@@ -668,9 +603,6 @@ type StepsByNodeIDValue = Step
|
||||
// PausesByPausedNodeValue is one value of the state pauses under the key paused.<node>.
|
||||
type PausesByPausedNodeValue = Pause
|
||||
|
||||
// PausesByDroppedIDValue is one value of the state pauses under the key dropped.<id>.
|
||||
type PausesByDroppedIDValue = Drop
|
||||
|
||||
// PausesByCapacityNodeValue is one value of the state pauses under the key capacity.<node>.
|
||||
type PausesByCapacityNodeValue = Capacity
|
||||
|
||||
|
||||
@@ -43,12 +43,6 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v CheckAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.accept\\.check$")},
|
||||
{name: "a finished check step of a TypeScript merge preview", subject: "", given: "{\"ended\":\"2026-11-05T10:01:00Z\",\"id\":\"c3d6\",\"node\":\"ace\",\"result\":{\"fetch\":{\"base\":\"abcdef0123456789abcdef0123456789abcdef01\",\"changed\":[\"modules/m/package.json\"],\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"merge\":\"0123456789abcdef0123456789abcdef01234567\",\"modules\":[\"modules/m\"],\"trees\":{\"modules/m\":{\"manifest\":\"0581b699d9d05517e69b21f5cedbeb2eee8aba2b205280b561be731594d7feef\",\"tree\":\"0123456789abcdef0123456789abcdef01234567\"}},\"workspace\":\"mvii1sxt979f67\"}},\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"passed\",\"tool\":\"check\",\"v\":1}", wire: "{\"ended\":\"2026-11-05T10:01:00Z\",\"id\":\"c3d6\",\"node\":\"ace\",\"result\":{\"fetch\":{\"base\":\"abcdef0123456789abcdef0123456789abcdef01\",\"changed\":[\"modules/m/package.json\"],\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"merge\":\"0123456789abcdef0123456789abcdef01234567\",\"modules\":[\"modules/m\"],\"trees\":{\"modules/m\":{\"manifest\":\"0581b699d9d05517e69b21f5cedbeb2eee8aba2b205280b561be731594d7feef\",\"tree\":\"0123456789abcdef0123456789abcdef01234567\"}},\"workspace\":\"mvii1sxt979f67\"}},\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"passed\",\"tool\":\"check\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a step ended on a transport fault, given again by the bus", subject: "", given: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}", wire: "{\"again-at\":\"2026-11-05T10:01:30Z\",\"ended\":\"2026-11-05T10:00:30Z\",\"id\":\"a1b2\",\"node\":\"ace\",\"passing\":true,\"reason\":\"fetching the commit: kex_exchange_identification: read: Connection reset by peer\",\"run\":1,\"started\":\"2026-11-05T10:00:00Z\",\"state\":\"again\",\"tool\":\"build\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "drop names the ask and why", subject: "", given: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"by\":\"mesh-delivery-builder\",\"id\":\"a1b2\",\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v DropInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"module": "mesh-delivery-contracts",
|
||||
"version": "0.1",
|
||||
"version": "1",
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
@@ -306,26 +306,6 @@
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "go-meshdeliveryview",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/seats/meshdeliveryview"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "ts-meshdeliveryview",
|
||||
"kind": "package",
|
||||
"language": "typescript",
|
||||
"paths": [
|
||||
"ts/seats/meshdeliveryview"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "go-meshwantsclient",
|
||||
"kind": "package",
|
||||
@@ -334,84 +314,6 @@
|
||||
"go/clients/meshwantsclient"
|
||||
],
|
||||
"series": "0.1"
|
||||
},
|
||||
{
|
||||
"name": "go-meshbuildsclient",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/clients/meshbuildsclient"
|
||||
],
|
||||
"series": "0.1"
|
||||
},
|
||||
{
|
||||
"name": "go-meshbuilds",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/seats/meshbuilds"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "go-meshpipelinerunner",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/seats/meshpipelinerunner"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "ts-meshbuilds",
|
||||
"kind": "package",
|
||||
"language": "typescript",
|
||||
"paths": [
|
||||
"ts/seats/meshbuilds"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "ts-meshpipelinerunner",
|
||||
"kind": "package",
|
||||
"language": "typescript",
|
||||
"paths": [
|
||||
"ts/seats/meshpipelinerunner"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "go-git",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/seats/git"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "ts-git",
|
||||
"kind": "package",
|
||||
"language": "typescript",
|
||||
"paths": [
|
||||
"ts/seats/git"
|
||||
],
|
||||
"series": "0.1",
|
||||
"generated-from": "."
|
||||
},
|
||||
{
|
||||
"name": "go-meshpipelinerunnerclient",
|
||||
"kind": "package",
|
||||
"language": "go",
|
||||
"paths": [
|
||||
"go/clients/meshpipelinerunnerclient"
|
||||
],
|
||||
"series": "0.1"
|
||||
}
|
||||
]
|
||||
},
|
||||
File diff suppressed because it is too large
Load Diff
+5
-18
@@ -6,11 +6,7 @@
|
||||
{
|
||||
"name": "publish",
|
||||
"description": "Open a transfer, naming the artifact and the digest of every part; answers the digests the holder lacks, which the caller then sends by publish-part. A transfer already open answers the parts held, so a cut transfer goes on from there. With no parts and a version, the held digest is published under that version and nothing is stored (the trunk's claim).",
|
||||
"callers": [
|
||||
"seat:node-build-go",
|
||||
"seat:node-build-node",
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"callers": "the build modules",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -96,11 +92,7 @@
|
||||
{
|
||||
"name": "publish-part",
|
||||
"description": "Send one chunk of one part of an open transfer; the last chunk of the last part ends the transfer, and the holder hashes what it received, asks builder_versions, stores it and says published or refused. A chunk's message stays under the bus's largest message (1 MiB), so at most 760 KiB of data, base64.",
|
||||
"callers": [
|
||||
"seat:node-build-go",
|
||||
"seat:node-build-node",
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"callers": "the build modules, and only the proved caller that opened the transfer",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -163,9 +155,7 @@
|
||||
{
|
||||
"name": "versions",
|
||||
"description": "The versions the seat holds of one name, newest first: each one's version, tag, digest, kind and when it was published.",
|
||||
"callers": [
|
||||
"invokers"
|
||||
],
|
||||
"callers": "any caller whose role grants it",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -207,10 +197,7 @@
|
||||
{
|
||||
"name": "remove",
|
||||
"description": "Remove one tagged version; the holder refuses an untagged one but for the retention removal of a bundle, archive or copied base by the artifact sweep's holder. Every removal emits removed with its reason. A tagged version the store cannot remove alone, because another tag names its digest, stays whole, its tag and bytes kept: the answer says kept with the reason shared-digest and the tags still naming the digest, removed false, and kept is emitted, never removed; the caller ends there without a retry.",
|
||||
"callers": [
|
||||
"seat:mesh-builds",
|
||||
"seat:mesh-artifact-sweep"
|
||||
],
|
||||
"callers": "the builder, for a tagged version; the artifact sweep's holder, for retention",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -423,7 +410,7 @@
|
||||
},
|
||||
"reference": {
|
||||
"type": "string",
|
||||
"description": "the reference the seat answers: <registry>/<module>/<artifact>@sha256:<digest>, or <name>@<version> for a package (ADR 0605 \u00a79)"
|
||||
"description": "the reference the seat answers: <registry>/<module>/<artifact>@sha256:<digest>, or <name>@<version> for a package (ADR 0605 §9)"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
"name": "base",
|
||||
"kind": "base",
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"by": "operator@workstation",
|
||||
"by": "operator@shanks",
|
||||
"since": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
@@ -18,10 +18,10 @@
|
||||
"name": "mesh-delivery-builder",
|
||||
"open": true,
|
||||
"holding": [
|
||||
"anchor"
|
||||
"ace"
|
||||
],
|
||||
"since": {
|
||||
"anchor": "2026-11-05T10:00:00Z"
|
||||
"ace": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-17
@@ -13,9 +13,7 @@
|
||||
{
|
||||
"name": "mirror",
|
||||
"description": "Copy an outside image into the store by its pinned digest; emits published or refused.",
|
||||
"callers": [
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"callers": "mesh-build-image's holder of the image build seat",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -60,9 +58,7 @@
|
||||
{
|
||||
"name": "tags",
|
||||
"description": "The tags of one image and the digest each names.",
|
||||
"callers": [
|
||||
"invokers"
|
||||
],
|
||||
"callers": "any caller whose role grants it",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -113,10 +109,8 @@
|
||||
},
|
||||
{
|
||||
"name": "hold",
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 \u00a72); never an image of the holder's own. Emits held.",
|
||||
"callers": [
|
||||
"seat:mesh-artifact-sweep"
|
||||
],
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 §2); never an image of the holder's own. Emits held.",
|
||||
"callers": "the module that runs the artifact sweep alone",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -160,9 +154,7 @@
|
||||
{
|
||||
"name": "release",
|
||||
"description": "Let a hold go; emits released. A release of what is not held answers released false and emits nothing, never an error: the outcome asked holds already. By hand only through the holder's own tool, the operator's session as the proved caller, recorded as a hand act.",
|
||||
"callers": [
|
||||
"seat:mesh-artifact-sweep"
|
||||
],
|
||||
"callers": "the module that runs the artifact sweep; the operator's session through the holder's tool",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -201,10 +193,8 @@
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every image manifest and index, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 \u00a73).",
|
||||
"callers": [
|
||||
"invokers"
|
||||
],
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every image manifest and index, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 §3).",
|
||||
"callers": "any caller whose role grants it",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "git",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0111",
|
||||
"delivers": "git"
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
[
|
||||
{
|
||||
"name": "a manifest (xclip, read through mesh-catalog.module)",
|
||||
"of": "state:manifests/<digest>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"module": "xclip",
|
||||
"manifest": "{\"build\":{\"artifacts\":[{\"binary\":\"xclip-tools\",\"from\":\"cmd/xclip-tools\",\"kind\":\"bundle\",\"language\":\"go\",\"loads\":[\"xclip-tools\"],\"name\":\"tools\",\"system\":\"arch\"}]},\"capabilities\":[\"package-manager\"],\"module\":\"xclip\",\"resources\":[{\"id\":\"package\",\"package\":\"xclip\",\"type\":\"package\"}],\"tools\":[\"xclip_copy\",\"xclip_paste\",\"xclip_targets\",\"xclip_session\"],\"version\":\"1\"}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module (xclip, read through mesh-catalog.modules; the inputs and toolchains no tool reads are not here)",
|
||||
"of": "state:modules/<module>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "f469eb387a3015569d9b16c66ed418e9dd098f64",
|
||||
"path": "modules/xclip",
|
||||
"fp2": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a candidate",
|
||||
"of": "state:candidates/<group>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "feat/registry",
|
||||
"base": 3,
|
||||
"heads": "0123456789ab",
|
||||
"pulls": [
|
||||
{
|
||||
"repository": "novox/mesh-sdk",
|
||||
"number": 1,
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"modules": [
|
||||
"nats"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a refused verdict (nats, read through the indexer's verdicts tool)",
|
||||
"of": "state:verdicts/<digest>",
|
||||
"given": {
|
||||
"module": "nats",
|
||||
"state": "refused",
|
||||
"problems": [
|
||||
"this is not a module manifest: a state is either a name or {name, history, ttl-seconds, per-machine, key-ttl}: json: unknown field \"read-only\" (read without state[2].read-only)"
|
||||
],
|
||||
"judge": "exe:661e6fb424d7ffea",
|
||||
"at": "2026-11-04T18:51:12.614583047+01:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "the predefined list",
|
||||
"of": "state:predefined/list",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"commit": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"list": {
|
||||
"streams": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pull request's configuration",
|
||||
"of": "state:config-candidates/<pull>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"pull": "novox/mesh-catalog#1",
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"declares": {
|
||||
"nats": {
|
||||
"limit": {
|
||||
"kind": "setting",
|
||||
"default": 1,
|
||||
"why": "a bound"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pull request's configuration state whose bounds are declared 0 (a zero is a bound, not none)",
|
||||
"of": "state:config-candidates/<pull>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"pull": "novox/mesh-catalog#1",
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"declares": {
|
||||
"nats": {
|
||||
"limit": {
|
||||
"kind": "setting",
|
||||
"default": 0,
|
||||
"why": "a bound",
|
||||
"minimum": 0,
|
||||
"maximum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a published Go module",
|
||||
"of": "state:packages/<module>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"module": "git.novox.be/novox/mesh-sdk/go",
|
||||
"repository": "novox/mesh-sdk",
|
||||
"commit": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"packages": [
|
||||
{
|
||||
"package": "git.novox.be/novox/mesh-sdk/go/keys",
|
||||
"digest": "ab"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a package series",
|
||||
"of": "state:packages/<package>.<series>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"name": "go-keys",
|
||||
"series": "0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module with its toolchain",
|
||||
"of": "state:modules/<module>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "f469eb387a3015569d9b16c66ed418e9dd098f64",
|
||||
"fp2": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56",
|
||||
"toolchains": {
|
||||
"go": {
|
||||
"language": "go",
|
||||
"version": "1.26.0",
|
||||
"recipe": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "the modules verb (captured: the first three modules)",
|
||||
"of": "verb:modules.answer",
|
||||
"given": {
|
||||
"modules": [
|
||||
{
|
||||
"commit": "f469eb387a3015569d9b16c66ed418e9dd098f64",
|
||||
"fp": "src2:5e4a1b4ad4ea6175c05e4655ce58aeb957547149d4c9805eb27636efd50c1c87",
|
||||
"module": "adwaita",
|
||||
"path": "modules/adwaita",
|
||||
"repository": "novox/mesh-catalog"
|
||||
},
|
||||
{
|
||||
"commit": "b112adcecc41d18f54190cbd2fc864199b70c518",
|
||||
"fp": "src2:7dd0db8e98224f46121a5ae05c0b9c5a430eff531a5120aa40b1a59237853a3f",
|
||||
"module": "amqp-email-forwarder",
|
||||
"path": ".",
|
||||
"repository": "jschoubben/amqp-email-forwarder"
|
||||
},
|
||||
{
|
||||
"commit": "dd458cb155f5f5fa3ed824a23728e444be5b156a",
|
||||
"fp": "src2:a98f8152f0a837dd5ba883a15efaf110ba88100193157e4bdb1a93ba55209371",
|
||||
"module": "artifact-store-tools",
|
||||
"path": "modules/artifact-store-tools",
|
||||
"repository": "novox/mesh-catalog"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "the module verb (captured: xclip)",
|
||||
"of": "verb:module.answer",
|
||||
"given": {
|
||||
"module": {
|
||||
"commit": "f469eb387a3015569d9b16c66ed418e9dd098f64",
|
||||
"fp": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56",
|
||||
"manifest": {
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
"binary": "xclip-tools",
|
||||
"from": "cmd/xclip-tools",
|
||||
"kind": "bundle",
|
||||
"language": "go",
|
||||
"loads": [
|
||||
"xclip-tools"
|
||||
],
|
||||
"name": "tools",
|
||||
"system": "arch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"capabilities": [
|
||||
"package-manager"
|
||||
],
|
||||
"module": "xclip",
|
||||
"resources": [
|
||||
{
|
||||
"id": "package",
|
||||
"package": "xclip",
|
||||
"type": "package"
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
"xclip_copy",
|
||||
"xclip_paste",
|
||||
"xclip_targets",
|
||||
"xclip_session"
|
||||
],
|
||||
"version": "1"
|
||||
},
|
||||
"module": "xclip",
|
||||
"path": "modules/xclip",
|
||||
"repository": "novox/mesh-catalog"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
[
|
||||
{
|
||||
"name": "verdict on the checker's own family",
|
||||
"of": "holder-event:verdict",
|
||||
"subject": "mesh.stream.mesh-delivery-checker.event.verdict",
|
||||
"given": {
|
||||
"repository": "novox/mesh-contracts",
|
||||
"pull": 3,
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"verdict": "fail",
|
||||
"out-of-step": [
|
||||
"go/seats/meshbroker/contract.go"
|
||||
],
|
||||
"series": [
|
||||
{
|
||||
"module": "mesh-contracts",
|
||||
"artifact": "go",
|
||||
"from": "0.1",
|
||||
"to": "0.2"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tag-wanted on the checker's own family",
|
||||
"of": "holder-event:tag-wanted",
|
||||
"subject": "mesh.stream.mesh-delivery-checker.event.tag-wanted",
|
||||
"given": {
|
||||
"repository": "novox/mesh-sdk",
|
||||
"pull": 170,
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc",
|
||||
"branch": "feat/registry",
|
||||
"module": "mesh-sdk",
|
||||
"package": "go",
|
||||
"tag": "registry-1966"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "preview.written on the checker's stream",
|
||||
"of": "holder-event:preview.written",
|
||||
"subject": "mesh.stream.mesh-delivery-checker.event.preview.written",
|
||||
"given": {}
|
||||
}
|
||||
]
|
||||
+47
-159
@@ -176,79 +176,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The merge check's tries: start one, read one, end one. The seat says each check's end as checked and what the checker owes the forge as owed; the checker's other events stay under its own subjects (ADR 0620 §2).",
|
||||
"family": {
|
||||
"name": "mesh-delivery-checker.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"name": "checked",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "a candidate checked: its entries judged at the group's heads (design 47 *What each step says*)",
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the group, its branch"
|
||||
},
|
||||
"heads": {
|
||||
"type": "string",
|
||||
"description": "the heads checked, 12 hex digits, as the candidate's revisions are keyed"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision the heads are merged onto"
|
||||
},
|
||||
"catalog": {
|
||||
"type": "integer",
|
||||
"description": "the candidate's catalog graph revision judged, by its number on the seat mesh-catalog"
|
||||
},
|
||||
"verdict": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail",
|
||||
"could not run"
|
||||
],
|
||||
"description": "pass, fail, or could not run when a part the check needs did not answer"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "what failed first, or the part not heard"
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/CheckedEntry"
|
||||
},
|
||||
"description": "the entries checked"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads",
|
||||
"verdict"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "owed",
|
||||
"subject": "owed.<repository>.<number>",
|
||||
"body": {
|
||||
"$ref": "#/defs/Owed"
|
||||
},
|
||||
"keep": {
|
||||
"max-age-days": 7,
|
||||
"max-mib": 64
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The merge check's tries: start one, read one, end one. The checker's own events stay under its own subjects (ADR 0620 §2).",
|
||||
"holder-events": [
|
||||
{
|
||||
"name": "verdict",
|
||||
@@ -319,6 +247,51 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tag-wanted",
|
||||
"subject": "mesh.stream.<holder>.event.tag-wanted",
|
||||
"family": "checker.asks",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "owner/repo"
|
||||
},
|
||||
"pull": {
|
||||
"type": "integer",
|
||||
"description": "the pull request"
|
||||
},
|
||||
"head": {
|
||||
"type": "string",
|
||||
"description": "its head"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the pull request's branch: its tag is removed when the branch ends"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the group member"
|
||||
},
|
||||
"package": {
|
||||
"type": "string",
|
||||
"description": "the package it declares"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string",
|
||||
"description": "the tag wanted"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"head",
|
||||
"branch",
|
||||
"module",
|
||||
"package"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "preview.written",
|
||||
"subject": "mesh.stream.<holder>.event.preview.written",
|
||||
@@ -773,90 +746,5 @@
|
||||
"description": "the previews of a head merged onto a trunk",
|
||||
"history": 5
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Owed": {
|
||||
"type": "object",
|
||||
"description": "the status the checker owes the forge for a head, said under its id and safe to repeat (a status replaces what stands); the forge bridge performs it through the seat git's verb status (design 47 *What the gate owes the forge*)",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the act's id, the same each time it is said again"
|
||||
},
|
||||
"act": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"status"
|
||||
],
|
||||
"description": "the act: always status"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "the repository, <owner>/<name>",
|
||||
"minLength": 1
|
||||
},
|
||||
"number": {
|
||||
"type": "integer",
|
||||
"description": "the pull request's number"
|
||||
},
|
||||
"head": {
|
||||
"type": "string",
|
||||
"description": "the pull request's head the status is on",
|
||||
"pattern": "^[0-9a-f]{40}$"
|
||||
},
|
||||
"context": {
|
||||
"type": "string",
|
||||
"description": "its context, mesh/check"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "pending, success, failure or error"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "what it says"
|
||||
},
|
||||
"target": {
|
||||
"type": "string",
|
||||
"description": "the page it links to"
|
||||
},
|
||||
"said": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when the checker first said it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"act",
|
||||
"repository",
|
||||
"number",
|
||||
"head",
|
||||
"context",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"CheckedEntry": {
|
||||
"type": "object",
|
||||
"description": "one entry of the candidate checked: a module at its fingerprint",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string",
|
||||
"description": "the entry's fingerprint"
|
||||
},
|
||||
"node": {
|
||||
"type": "string",
|
||||
"description": "the node it was composed for, when the check composed it on one"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"fp"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+19
-19
@@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"name": "the source revision",
|
||||
"of": "state:source/<branch>",
|
||||
"of": "state:source/main",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "feat/registry",
|
||||
@@ -27,6 +27,24 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an ask",
|
||||
"of": "state:asks/merge.<group>.<heads>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "feat/registry",
|
||||
"heads": [
|
||||
{
|
||||
"repository": "novox/mesh-sdk",
|
||||
"number": 1,
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
],
|
||||
"ask": {
|
||||
"headline": "merge"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an act owed",
|
||||
"of": "state:owed/<repository>.<number>.<head>.<act>",
|
||||
@@ -50,23 +68,5 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an ask",
|
||||
"of": "state:asks/merge.<group>.<heads>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "feat/registry",
|
||||
"heads": [
|
||||
{
|
||||
"repository": "novox/mesh-sdk",
|
||||
"number": 1,
|
||||
"head": "cccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
],
|
||||
"ask": {
|
||||
"headline": "merge"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,574 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-delivery",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0239",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "deliveries",
|
||||
"description": "Every delivery not final, and those that ended in the last day, one line each: its id (owner/repository@commit), its state, its group, what it waits for and since when. Narrowed by state, repository or group.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"all": {
|
||||
"description": "\"true\": the final ones of the last thirty days too",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "a group's id (its branch name)",
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"description": "owner/repository",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "one state, e.g. delivering or held",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what deliveries answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "times",
|
||||
"description": "Removed in R6 (ADR 0539): refused by name, naming its replacement: the delivery view (nox-delivery): each machine's want and have, and since when",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what times answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "show",
|
||||
"description": "One delivery or group whole: its delivery plan (what it builds, what each machine receives, what is not an ordinary send), every transition with when and why, the machine steps of its walk, its group and its order.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "a delivery's id, or a group's",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what show answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "groups",
|
||||
"description": "Every delivery group: its members in order, why each pair is ordered (declared, built by, version skew, engine before controller, by name), its composed check and its state, derived from its members.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"all": {
|
||||
"description": "\"true\": the groups that ended too",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what groups answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "what-if",
|
||||
"description": "Removed in R6 (ADR 0539): refused by name, naming its replacement: the merge check's composition, which composes every machine a change touches",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what what-if answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "checks",
|
||||
"description": "What the mesh's checks said of a pull request's head or of one commit: each of the commit's mesh statuses (mesh/check, the one a main requires from R4e, hq's mesh/repo-check, mesh/delivery, …) with its state, description and when it was set; the merge check's full verdict as the controller said it — each layer's summary, the machine that ran it, when, its build id and its report; and whether the branch's protection would let it merge, every required status being success.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"commit": {
|
||||
"description": "a commit's sha, or the start of one, instead of a pull request",
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"description": "a pull request's number: its head is read",
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"description": "owner/repository",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what checks answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "table",
|
||||
"description": "The state table every delivery runs by: each transition with its guard, each state's bound and what healer H2 may do once it has passed; and the machine steps' table.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what table answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stalled",
|
||||
"description": "Every delivery held past its state's bound, with the transition the table lets healer H2 take for it, or none.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stalled answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "recheck",
|
||||
"description": "Check a rejected or ready delivery again: it goes back to proposed and the controller is asked for its check. With why.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the delivery's id",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, kept with the transition",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what recheck answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"description": "Removed in R6 (ADR 0539): refused by name, naming its replacement: the assigner's asks (hold, restore, backup, record), answered on the phone or in the delivery view",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what release answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stop",
|
||||
"description": "Removed in R6 (ADR 0539): refused by name, naming its replacement: a bad fingerprint is held and its canary set back by the assigner (ADR 0429 §6, ADR 0539 clause 18)",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stop answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "close",
|
||||
"description": "Healer H2's verb: take the one transition the table names for a delivery held past its bound. Refused for any other.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the delivery's id",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "the condition it answers",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what close answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "retire-history",
|
||||
"description": "Removed in R6 (ADR 0539): refused by name, naming its replacement: nothing to retire: the gate keeps no delivery after its merge",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what retire-history answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "settle",
|
||||
"description": "Ask the operator to settle deliveries held because their merge reached the trunk without a passing check: one ask on the operator's channel for all of them, as an Approve is asked. The verb moves nothing; on the operator's answer each goes to merged, and whether it is on the machines is derived as for any merge (novox/hq ADR 0556). Refused for a delivery not held, or held for another reason, naming why.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"ids": {
|
||||
"description": "the held deliveries' ids (owner/repository@commit)",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
},
|
||||
"why": {
|
||||
"description": "why they may be settled, shown to the operator",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ids",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what settle answers, as its description says"
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The delivery gate: reads and steers deliveries, merges and the checks that decide them; the merge is made on the operator's Approve once both checks passed.",
|
||||
"states": [
|
||||
{
|
||||
"name": "source",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "main",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the group that moved it"
|
||||
},
|
||||
"heads": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "repository to the merged head, a full commit"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads"
|
||||
],
|
||||
"description": "every repository's merged head; its revision is the mesh's source revision"
|
||||
},
|
||||
"description": "the one key, written by the holder alone by compare-and-set"
|
||||
}
|
||||
],
|
||||
"description": "the mesh's source revision",
|
||||
"history": 64
|
||||
},
|
||||
{
|
||||
"name": "merges",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<group>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the ask key"
|
||||
},
|
||||
"approved": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "<repository>@<number> to the approved head"
|
||||
},
|
||||
"pulls": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"head": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "merging, merged or refused"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"head",
|
||||
"state"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"ask",
|
||||
"pulls"
|
||||
],
|
||||
"description": "one group's merge and how far each pull request is"
|
||||
},
|
||||
"description": "a group's merge"
|
||||
}
|
||||
],
|
||||
"description": "the merges",
|
||||
"history": 10
|
||||
},
|
||||
{
|
||||
"name": "asks",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "merge.<group>.<heads>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"heads": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "<owner>/<name>"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"head": {
|
||||
"type": "string",
|
||||
"description": "the full commit"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"head"
|
||||
]
|
||||
}
|
||||
},
|
||||
"ask": {
|
||||
"description": "the operator-channel ask as raised"
|
||||
},
|
||||
"asking": {
|
||||
"type": "integer",
|
||||
"description": "the number of times it was asked"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads",
|
||||
"ask"
|
||||
]
|
||||
},
|
||||
"description": "the ask of the operator for one group at one set of heads"
|
||||
}
|
||||
],
|
||||
"description": "the asks of the operator for a merge",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "owed",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<repository>.<number>.<head>.<act>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"act": {
|
||||
"type": "string",
|
||||
"description": "status=<context>, view, note or comment.<seq>"
|
||||
},
|
||||
"context": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"ref": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"act"
|
||||
],
|
||||
"description": "one act owed to the forge, written by its owner and done by the forge bridge"
|
||||
},
|
||||
"description": "one act owed to the forge"
|
||||
}
|
||||
],
|
||||
"description": "the acts the gate owes the forge",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "turns",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<repository>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"waiting": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"heads": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"approved": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string"
|
||||
},
|
||||
"waits-since": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"step": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads",
|
||||
"approved",
|
||||
"since"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"waiting"
|
||||
],
|
||||
"description": "the merges of a repository in the order they wait for their turn"
|
||||
},
|
||||
"description": "the merges waiting on a repository"
|
||||
}
|
||||
],
|
||||
"description": "which merge waits for which",
|
||||
"history": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"name": "a want",
|
||||
"of": "state:wants/want.<node>.<module>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"fp": "ab12",
|
||||
"rule": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's own want",
|
||||
"of": "state:wants/want.<node>.node",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"composed": "sha256:aa",
|
||||
"self": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a held fingerprint",
|
||||
"of": "state:wants/held.<module>.<fingerprint>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"node": "ace"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a difference",
|
||||
"of": "state:differences/<node>.<module>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"want": "ab12",
|
||||
"unexplained": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a composition",
|
||||
"of": "state:compositions/<group>.<heads>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "g1",
|
||||
"heads": "0123456789ab",
|
||||
"state": "pass"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,284 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-wants",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0565, ADR 0634, ADR 0635",
|
||||
"description": "The seat that says what each node should run and whether each module's new builds wait for a person (ADR 0565, ADR 0539).",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "upgrade",
|
||||
"description": "Whether each module's new builds wait for a person: its policy (roll, together or record) and where it comes from (a person, the module, the bus, its irreplaceable data, the default); the bus is never rolled. With module, that one; with module, policy and why, a person's choice for it, recorded as a hand act; with policy default, the choice taken back. With compare, each node's own composition and the assigner's findings.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"compare": {
|
||||
"description": "\"true\": each node's own composition, by its digest, and the assigner's findings",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"description": "one module",
|
||||
"type": "string"
|
||||
},
|
||||
"policy": {
|
||||
"description": "with module: roll, together, record, or default to take a person's choice back",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "with policy: why, required and kept",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "each module's policy, or the one chosen, or the comparison"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bus",
|
||||
"description": "What a bus upgrade would do: the fingerprint of the bus module each node runs against the indexer's newest, and the last bus steps from the hand-act log and the assigner's puts of the bus. Read-only: the step itself is the put on the operator's warrant.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what a bus upgrade would do, read only"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "policy-changed",
|
||||
"body": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-wants.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "wants",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "want.<node>.<module>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a node's want for a module",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string"
|
||||
},
|
||||
"composed": {
|
||||
"type": "string"
|
||||
},
|
||||
"removed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"newest": {
|
||||
"type": "string"
|
||||
},
|
||||
"rule": {
|
||||
"type": "integer",
|
||||
"description": "the rule that holds the node back, 1 to 10"
|
||||
},
|
||||
"backup": {
|
||||
"type": "string",
|
||||
"description": "again or skip",
|
||||
"enum": [
|
||||
"again",
|
||||
"skip"
|
||||
]
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"put": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hold": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"yes": {
|
||||
"type": "string"
|
||||
},
|
||||
"release": {
|
||||
"type": "string"
|
||||
},
|
||||
"self": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "a node's want for a module"
|
||||
},
|
||||
{
|
||||
"key": "want.<node>.node",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a node's own want",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"composed": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"self": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"composed"
|
||||
]
|
||||
},
|
||||
"description": "a node's own want, naming the digest of its own composition"
|
||||
},
|
||||
{
|
||||
"key": "held.<module>.<fingerprint>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a fingerprint the assigner holds",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"description": "a module's fingerprint the assigner holds"
|
||||
}
|
||||
],
|
||||
"history": 20,
|
||||
"description": "what each node should run, and the fingerprints held back"
|
||||
},
|
||||
{
|
||||
"name": "differences",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<module>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the difference between a want and what is sent",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"want": {
|
||||
"type": "string"
|
||||
},
|
||||
"want-removed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sent": {
|
||||
"type": "string"
|
||||
},
|
||||
"sent-build": {
|
||||
"type": "string"
|
||||
},
|
||||
"rule": {
|
||||
"type": "integer"
|
||||
},
|
||||
"unexplained": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "a module on a node"
|
||||
}
|
||||
],
|
||||
"history": 64,
|
||||
"description": "differences between a want and what the node-engine is sent"
|
||||
},
|
||||
{
|
||||
"name": "compositions",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<group>.<heads>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the composition verdict of a group's check at its heads",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"heads": {
|
||||
"type": "string",
|
||||
"description": "12 lowercase hex digits"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "pass, fail or waits"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"sdk": {
|
||||
"type": "string"
|
||||
},
|
||||
"machines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"warnings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"took": {
|
||||
"type": "integer",
|
||||
"description": "milliseconds"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"description": "a group's check at its heads"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "composition verdicts of a group's check; the checker reads them"
|
||||
}
|
||||
]
|
||||
}
|
||||
+9
-254
@@ -6,7 +6,7 @@
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "running",
|
||||
"started": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
"given": {
|
||||
"v": 1,
|
||||
"paused": true,
|
||||
"by": "operator@workstation",
|
||||
"by": "operator@shanks",
|
||||
"at": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
@@ -41,17 +41,6 @@
|
||||
"recipe": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's toolchain with its program's digest (G 472)",
|
||||
"of": "state:toolchains/<node>.<language>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"language": "go",
|
||||
"version": "1.26.0",
|
||||
"recipe": "1",
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a build ask",
|
||||
"of": "accept:delivery",
|
||||
@@ -71,26 +60,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a build ask with the version the builder reserved (G 573)",
|
||||
"of": "accept:delivery",
|
||||
"subject": "mesh.seat.node-build-go.accept.delivery",
|
||||
"given": {
|
||||
"id": "a1b3",
|
||||
"kind": "build",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-builder",
|
||||
"version": "1.4.2",
|
||||
"build": {
|
||||
"module": "nats",
|
||||
"artifacts": [
|
||||
{
|
||||
"artifact": "go"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a check ask with its fetch, siblings and levels",
|
||||
"of": "accept:check",
|
||||
@@ -129,8 +98,8 @@
|
||||
"recipe": "2"
|
||||
},
|
||||
"node-names": [
|
||||
"anchor",
|
||||
"home-server"
|
||||
"ace",
|
||||
"g14"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -142,7 +111,7 @@
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:03:00Z",
|
||||
@@ -165,37 +134,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a finished build step that kept its artifact on its node",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "a1b3",
|
||||
"tool": "build",
|
||||
"node": "anchor",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:03:00Z",
|
||||
"result": {
|
||||
"artifacts": [
|
||||
{
|
||||
"artifact": "go",
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"reference": "container-image-registry/nats/go@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
}
|
||||
],
|
||||
"toolchain": {
|
||||
"language": "go",
|
||||
"version": "1.26.0",
|
||||
"recipe": "1"
|
||||
},
|
||||
"imports": [
|
||||
"git.novox.be/novox/mesh-sdk/go"
|
||||
],
|
||||
"kept": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a finished check step with its levels",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
@@ -203,7 +141,7 @@
|
||||
"v": 1,
|
||||
"id": "c3d4",
|
||||
"tool": "check",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:06:00Z",
|
||||
@@ -275,7 +213,7 @@
|
||||
"v": 1,
|
||||
"id": "c3d5",
|
||||
"tool": "check",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "refused",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"result": {
|
||||
@@ -296,7 +234,7 @@
|
||||
"v": 1,
|
||||
"id": "c3d5",
|
||||
"tool": "check",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:01:00Z",
|
||||
@@ -363,7 +301,7 @@
|
||||
"v": 1,
|
||||
"id": "r5e6",
|
||||
"tool": "check",
|
||||
"node": "anchor",
|
||||
"node": "ace",
|
||||
"state": "failed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:01:00Z",
|
||||
@@ -374,188 +312,5 @@
|
||||
"said": "the facts name no head"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a step ended on a transport fault, given again by the bus",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "anchor",
|
||||
"state": "again",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:00:30Z",
|
||||
"reason": "fetching the commit: kex_exchange_identification: read: Connection reset by peer",
|
||||
"run": 1,
|
||||
"again-at": "2026-11-05T10:01:30Z",
|
||||
"passing": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an ask dropped by the caller that no longer waits",
|
||||
"of": "state:pauses/dropped.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"by": "mesh-delivery-builder",
|
||||
"why": "a newer fingerprint supersedes it",
|
||||
"at": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a step ask of the runner with its kept results",
|
||||
"of": "accept:check.step",
|
||||
"subject": "mesh.seat.node-build-go.accept.check",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "m2kx9a1b3c4d5e",
|
||||
"kind": "step",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-pipeline",
|
||||
"at": "2026-11-10T10:00:00Z",
|
||||
"step": {
|
||||
"pipeline": "main.12.nats",
|
||||
"step": "unit",
|
||||
"module": "nats",
|
||||
"artifact": "nats:program",
|
||||
"branch": "main",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"revision": 12,
|
||||
"fingerprint": "fp-0123",
|
||||
"fetch": {
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
"digest": "sha256:bbbb",
|
||||
"level": "unit",
|
||||
"pipeline": "main.11.nats"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a recovery's step ask of the runner, on the stream delivery",
|
||||
"of": "accept:delivery.step",
|
||||
"subject": "mesh.seat.node-build-go.accept.delivery",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "m2kx9a1b3c4d5e",
|
||||
"kind": "step",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-pipeline",
|
||||
"at": "2026-11-10T10:00:00Z",
|
||||
"step": {
|
||||
"pipeline": "main.12.nats",
|
||||
"step": "unit",
|
||||
"module": "nats",
|
||||
"artifact": "nats:program",
|
||||
"branch": "main",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"revision": 12,
|
||||
"fingerprint": "fp-0123",
|
||||
"fetch": {
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
"digest": "sha256:bbbb",
|
||||
"level": "unit",
|
||||
"pipeline": "main.11.nats"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a run ask of the runner, the program built from the change and run over its heads",
|
||||
"of": "accept:check.run",
|
||||
"subject": "mesh.seat.node-build-go.accept.check",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "r5e6",
|
||||
"kind": "run",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-pipeline",
|
||||
"at": "2026-11-05T10:00:00Z",
|
||||
"run": {
|
||||
"program": {
|
||||
"repository": "novox/mesh-delivery",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"dir": "modules/mesh-delivery-checker",
|
||||
"package": "./cmd/mesh-checking-program"
|
||||
},
|
||||
"heads": [
|
||||
{
|
||||
"repository": "novox/mesh-delivery",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
{
|
||||
"repository": "novox/mesh-sdk",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
}
|
||||
],
|
||||
"input": {
|
||||
"verb": "seat:mesh-delivery-checker.input",
|
||||
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"size": 7
|
||||
},
|
||||
"args": [
|
||||
"-verdict"
|
||||
],
|
||||
"reader": "checking program of mesh-delivery head"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an artifact's detected steps",
|
||||
"of": "state:detected-steps/<module>.<artifact>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"fingerprint": "fp-0123",
|
||||
"steps": [
|
||||
{
|
||||
"step": "lint"
|
||||
},
|
||||
{
|
||||
"step": "unit",
|
||||
"packages": [
|
||||
"./modules/nats/a"
|
||||
]
|
||||
}
|
||||
],
|
||||
"at": "2026-11-10T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a step keyed under its asker",
|
||||
"of": "state:steps/<asker>.<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "anchor",
|
||||
"state": "running",
|
||||
"started": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a check's step whose answer is kept as an object (G A-290)",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "c3d4e5f6a7b8c9",
|
||||
"tool": "check",
|
||||
"node": "anchor",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:05:00Z",
|
||||
"output-object": "output.c3d4e5f6a7b8c9"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "node-build-go",
|
||||
"scope": "node",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"accepts": [
|
||||
{
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The Go build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.",
|
||||
"includes": [
|
||||
"build-step"
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "steps",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Step"
|
||||
},
|
||||
"description": "a step on a node"
|
||||
}
|
||||
],
|
||||
"description": "the steps this module runs",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "pauses",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "paused.<node>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Pause"
|
||||
},
|
||||
"description": "whether a node is paused"
|
||||
},
|
||||
{
|
||||
"key": "capacity.<node>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Capacity"
|
||||
},
|
||||
"description": "a node's capacity"
|
||||
}
|
||||
],
|
||||
"description": "the pause and the capacity of each node",
|
||||
"history": 1
|
||||
},
|
||||
{
|
||||
"name": "toolchains",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<language>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Toolchain"
|
||||
},
|
||||
"description": "the toolchain a node reports"
|
||||
}
|
||||
],
|
||||
"description": "the toolchains the nodes report",
|
||||
"history": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
[
|
||||
{
|
||||
"name": "a running step",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "ace",
|
||||
"state": "running",
|
||||
"started": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a paused node",
|
||||
"of": "state:pauses/paused.<node>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"paused": true,
|
||||
"by": "operator@shanks",
|
||||
"at": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's capacity",
|
||||
"of": "state:pauses/capacity.<node>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"effective": 2,
|
||||
"configured": 2,
|
||||
"why": "the configured steps fit the cores"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's toolchain",
|
||||
"of": "state:toolchains/<node>.<language>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"language": "go",
|
||||
"version": "1.26.0",
|
||||
"recipe": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a build ask",
|
||||
"of": "accept:delivery",
|
||||
"subject": "mesh.seat.node-build-image.accept.delivery",
|
||||
"given": {
|
||||
"id": "a1b2",
|
||||
"kind": "build",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-builder",
|
||||
"build": {
|
||||
"module": "nats",
|
||||
"artifacts": [
|
||||
{
|
||||
"artifact": "go"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
+5
-74
@@ -7,60 +7,24 @@
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"acts": [
|
||||
{
|
||||
"step": "build",
|
||||
"on": "kind:image",
|
||||
"bound": "60m"
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
{
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-builds"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-delivery-checker"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"stream": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-pipeline-runner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"stream": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-pipeline-runner"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-delivery-checker"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The image build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.",
|
||||
@@ -72,19 +36,12 @@
|
||||
"name": "steps",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<asker>.<node>.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Step"
|
||||
},
|
||||
"description": "a step on a node, keyed by the asker the bus proves (design 47 G section 467, section 481)"
|
||||
},
|
||||
{
|
||||
"key": "<node>.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Step"
|
||||
},
|
||||
"description": "a step whose ask came on main's subject, with no asker's name (design 47 G section 483)"
|
||||
"description": "a step on a node"
|
||||
}
|
||||
],
|
||||
"description": "the steps this module runs",
|
||||
@@ -101,13 +58,6 @@
|
||||
},
|
||||
"description": "whether a node is paused"
|
||||
},
|
||||
{
|
||||
"key": "dropped.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Drop"
|
||||
},
|
||||
"description": "an ask its caller no longer waits for"
|
||||
},
|
||||
{
|
||||
"key": "capacity.<node>",
|
||||
"value": {
|
||||
@@ -133,25 +83,6 @@
|
||||
],
|
||||
"description": "the toolchains the nodes report",
|
||||
"history": 1
|
||||
},
|
||||
{
|
||||
"name": "detected-steps",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "each artifact's detected steps, one key per artifact (design 47 G section 326, section 414)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<module>.<artifact>",
|
||||
"value": {
|
||||
"$ref": "#/defs/DetectedSteps"
|
||||
},
|
||||
"description": "an artifact's detected steps"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "node-build-image.events",
|
||||
"max-age-days": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
[
|
||||
{
|
||||
"name": "a running step",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "a1b2",
|
||||
"tool": "build",
|
||||
"node": "ace",
|
||||
"state": "running",
|
||||
"started": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a paused node",
|
||||
"of": "state:pauses/paused.<node>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"paused": true,
|
||||
"by": "operator@shanks",
|
||||
"at": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's capacity",
|
||||
"of": "state:pauses/capacity.<node>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"effective": 2,
|
||||
"configured": 2,
|
||||
"why": "the configured steps fit the cores"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a node's toolchain",
|
||||
"of": "state:toolchains/<node>.<language>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"language": "go",
|
||||
"version": "1.26.0",
|
||||
"recipe": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a build ask",
|
||||
"of": "accept:delivery",
|
||||
"subject": "mesh.seat.node-build-node.accept.delivery",
|
||||
"given": {
|
||||
"id": "a1b2",
|
||||
"kind": "build",
|
||||
"language": "go",
|
||||
"asker": "mesh-delivery-builder",
|
||||
"build": {
|
||||
"module": "nats",
|
||||
"artifacts": [
|
||||
{
|
||||
"artifact": "go"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a check ask with the group's tagged package",
|
||||
"of": "accept:check",
|
||||
"subject": "mesh.seat.node-build-node.accept.check",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "c3d5",
|
||||
"kind": "check",
|
||||
"language": "typescript",
|
||||
"asker": "mesh-delivery-checker",
|
||||
"at": "2026-11-05T10:00:00Z",
|
||||
"check": {
|
||||
"fetch": {
|
||||
"repository": "novox/mesh-delivery",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"ref": "refs/pull/7/head",
|
||||
"base": "89abcdef0123456789abcdef0123456789abcdef",
|
||||
"package": {
|
||||
"name": "@novox/mesh-sdk",
|
||||
"version": "0.1.15-feat-x.1"
|
||||
}
|
||||
},
|
||||
"levels": [
|
||||
"unit",
|
||||
"integration"
|
||||
],
|
||||
"kept": true,
|
||||
"toolchain": {
|
||||
"language": "typescript",
|
||||
"version": "26.12.0",
|
||||
"recipe": "1"
|
||||
},
|
||||
"node-names": [
|
||||
"ace",
|
||||
"g14"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a finished check step of a TypeScript merge preview",
|
||||
"of": "state:steps/<node>.<id>",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"id": "c3d6",
|
||||
"tool": "check",
|
||||
"node": "ace",
|
||||
"state": "passed",
|
||||
"started": "2026-11-05T10:00:00Z",
|
||||
"ended": "2026-11-05T10:01:00Z",
|
||||
"result": {
|
||||
"fetch": {
|
||||
"workspace": "mvii1sxt979f67",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"modules": [
|
||||
"modules/m"
|
||||
],
|
||||
"base": "abcdef0123456789abcdef0123456789abcdef01",
|
||||
"merge": "0123456789abcdef0123456789abcdef01234567",
|
||||
"changed": [
|
||||
"modules/m/package.json"
|
||||
],
|
||||
"trees": {
|
||||
"modules/m": {
|
||||
"tree": "0123456789abcdef0123456789abcdef01234567",
|
||||
"manifest": "0581b699d9d05517e69b21f5cedbeb2eee8aba2b205280b561be731594d7feef"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
+5
-74
@@ -7,60 +7,24 @@
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"acts": [
|
||||
{
|
||||
"step": "build",
|
||||
"on": "typescript",
|
||||
"bound": "60m"
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
{
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-builds"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-delivery-checker"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"stream": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-pipeline-runner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"stream": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-pipeline-runner"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
},
|
||||
"callers": [
|
||||
"seat:mesh-delivery-checker"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The Node build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.",
|
||||
@@ -72,19 +36,12 @@
|
||||
"name": "steps",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<asker>.<node>.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Step"
|
||||
},
|
||||
"description": "a step on a node, keyed by the asker the bus proves (design 47 G section 467, section 481)"
|
||||
},
|
||||
{
|
||||
"key": "<node>.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Step"
|
||||
},
|
||||
"description": "a step whose ask came on main's subject, with no asker's name (design 47 G section 483)"
|
||||
"description": "a step on a node"
|
||||
}
|
||||
],
|
||||
"description": "the steps this module runs",
|
||||
@@ -101,13 +58,6 @@
|
||||
},
|
||||
"description": "whether a node is paused"
|
||||
},
|
||||
{
|
||||
"key": "dropped.<id>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Drop"
|
||||
},
|
||||
"description": "an ask its caller no longer waits for"
|
||||
},
|
||||
{
|
||||
"key": "capacity.<node>",
|
||||
"value": {
|
||||
@@ -133,25 +83,6 @@
|
||||
],
|
||||
"description": "the toolchains the nodes report",
|
||||
"history": 1
|
||||
},
|
||||
{
|
||||
"name": "detected-steps",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "each artifact's detected steps, one key per artifact (design 47 G section 326, section 414)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<module>.<artifact>",
|
||||
"value": {
|
||||
"$ref": "#/defs/DetectedSteps"
|
||||
},
|
||||
"description": "an artifact's detected steps"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "node-build-node.events",
|
||||
"max-age-days": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
"name": "base",
|
||||
"kind": "base",
|
||||
"digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"by": "operator@workstation",
|
||||
"by": "operator@shanks",
|
||||
"since": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
},
|
||||
@@ -18,10 +18,10 @@
|
||||
"name": "mesh-delivery-builder",
|
||||
"open": true,
|
||||
"holding": [
|
||||
"anchor"
|
||||
"ace"
|
||||
],
|
||||
"since": {
|
||||
"anchor": "2026-11-05T10:00:00Z"
|
||||
"ace": "2026-11-05T10:00:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-11
@@ -12,10 +12,8 @@
|
||||
"verbs": [
|
||||
{
|
||||
"name": "hold",
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 \u00a72); never an image of the holder's own. Emits held.",
|
||||
"callers": [
|
||||
"seat:mesh-artifact-sweep"
|
||||
],
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 §2); never an image of the holder's own. Emits held.",
|
||||
"callers": "the module that runs the artifact sweep alone",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -59,9 +57,7 @@
|
||||
{
|
||||
"name": "release",
|
||||
"description": "Let a hold go; emits released. A release of what is not held answers released false and emits nothing, never an error: the outcome asked holds already. By hand only through the holder's own tool, the operator's session as the proved caller, recorded as a hand act.",
|
||||
"callers": [
|
||||
"seat:mesh-artifact-sweep"
|
||||
],
|
||||
"callers": "the module that runs the artifact sweep; the operator's session through the holder's tool",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -100,10 +96,8 @@
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every manifest keeping one bundle or archive, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 \u00a73).",
|
||||
"callers": [
|
||||
"invokers"
|
||||
],
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every manifest keeping one bundle or archive, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 §3).",
|
||||
"callers": "any caller whose role grants it",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat container-image-registry, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-container-image-registry",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+61
-35
@@ -4,59 +4,85 @@
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export declare const seat: "container-image-registry";
|
||||
export const seat = "container-image-registry";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
readonly mirror: "mirror";
|
||||
readonly tags: "tags";
|
||||
readonly hold: "hold";
|
||||
readonly release: "release";
|
||||
readonly list: "list";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
mirror: "mirror",
|
||||
tags: "tags",
|
||||
hold: "hold",
|
||||
release: "release",
|
||||
list: "list",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
readonly held: "held";
|
||||
readonly released: "released";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
held: "held",
|
||||
released: "released",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "container-image-registry.events"; readonly maxAgeDays: 7 };
|
||||
export const family = { name: "container-image-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export declare const publishedSubject: "mesh.seat.container-image-registry.event.published";
|
||||
export const publishedSubject = "mesh.seat.container-image-registry.event.published";
|
||||
|
||||
export declare const refusedSubject: "mesh.seat.container-image-registry.event.refused";
|
||||
export const refusedSubject = "mesh.seat.container-image-registry.event.refused";
|
||||
|
||||
export declare const removedSubject: "mesh.seat.container-image-registry.event.removed";
|
||||
export const removedSubject = "mesh.seat.container-image-registry.event.removed";
|
||||
|
||||
export declare const keptSubject: "mesh.seat.container-image-registry.event.kept";
|
||||
export const keptSubject = "mesh.seat.container-image-registry.event.kept";
|
||||
|
||||
export declare const heldSubject: "mesh.seat.container-image-registry.event.held";
|
||||
export const heldSubject = "mesh.seat.container-image-registry.event.held";
|
||||
|
||||
export declare const releasedSubject: "mesh.seat.container-image-registry.event.released";
|
||||
export const releasedSubject = "mesh.seat.container-image-registry.event.released";
|
||||
|
||||
export declare const states: {
|
||||
readonly holds: "holds";
|
||||
readonly windows: "windows";
|
||||
};
|
||||
export const states = {
|
||||
holds: "holds",
|
||||
windows: "windows",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state holds under the form "<seat>.<name>.<digest>". */
|
||||
export declare function holdsBySeatNameDigestKey(seat: string, name: string, digest: string): string;
|
||||
export function holdsBySeatNameDigestKey(seat: string, name: string, digest: string): string {
|
||||
return seat + "." + name + "." + digest;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<seat>.<name>.<digest>", or undefined for a key of another form. */
|
||||
export declare function parseHoldsBySeatNameDigestKey(_key: string): { seat: string; name: string; digest: string } | undefined;
|
||||
export function parseHoldsBySeatNameDigestKey(_key: string): { seat: string; name: string; digest: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const seat = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const name = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const digest = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { seat, name, digest };
|
||||
}
|
||||
|
||||
/** The key of one value of the state windows under the form "<caller>". */
|
||||
export declare function windowsByCallerKey(caller: string): string;
|
||||
export function windowsByCallerKey(caller: string): string {
|
||||
return caller;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<caller>", or undefined for a key of another form. */
|
||||
export declare function parseWindowsByCallerKey(_key: string): { caller: string } | undefined;
|
||||
export function parseWindowsByCallerKey(_key: string): { caller: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const caller = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { caller };
|
||||
}
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type KeptEvent = registry.KeptEvent;
|
||||
+12
-12
@@ -2,19 +2,19 @@
|
||||
|
||||
// The part "registry" several seats include whole: The verbs and events every registry seat shares, written once so the four cannot drift (design 51, design 26). Who may call each verb is the holder's trusted config value listing its callers (ADR 0363's form), checked against the caller the tool runner proved.
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
/** one published thing, as every registry event and answer names it */
|
||||
export interface Artifact {
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat go-package-registry, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-go-package-registry",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+18
-18
@@ -4,31 +4,31 @@
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export declare const seat: "go-package-registry";
|
||||
export const seat = "go-package-registry";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "go-package-registry.events"; readonly maxAgeDays: 7 };
|
||||
export const family = { name: "go-package-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export declare const publishedSubject: "mesh.seat.go-package-registry.event.published";
|
||||
export const publishedSubject = "mesh.seat.go-package-registry.event.published";
|
||||
|
||||
export declare const refusedSubject: "mesh.seat.go-package-registry.event.refused";
|
||||
export const refusedSubject = "mesh.seat.go-package-registry.event.refused";
|
||||
|
||||
export declare const removedSubject: "mesh.seat.go-package-registry.event.removed";
|
||||
export const removedSubject = "mesh.seat.go-package-registry.event.removed";
|
||||
|
||||
export declare const keptSubject: "mesh.seat.go-package-registry.event.kept";
|
||||
export const keptSubject = "mesh.seat.go-package-registry.event.kept";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type KeptEvent = registry.KeptEvent;
|
||||
+12
-12
@@ -2,19 +2,19 @@
|
||||
|
||||
// The part "registry" several seats include whole: The verbs and events every registry seat shares, written once so the four cannot drift (design 51, design 26). Who may call each verb is the holder's trusted config value listing its callers (ADR 0363's form), checked against the caller the tool runner proved.
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
/** one published thing, as every registry event and answer names it */
|
||||
export interface Artifact {
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat mesh-artifact-sweep, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-mesh-artifact-sweep",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+13
-13
@@ -2,23 +2,23 @@
|
||||
|
||||
// The contract of the seat "mesh-artifact-sweep", defined whole (seats/mesh-artifact-sweep/seat.json): no description.
|
||||
|
||||
export declare const seat: "mesh-artifact-sweep";
|
||||
export const seat = "mesh-artifact-sweep";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly artifacts: "artifacts";
|
||||
readonly held: "held";
|
||||
readonly collect: "collect";
|
||||
readonly mirrors: "mirrors";
|
||||
readonly images: "images";
|
||||
};
|
||||
export const verbs = {
|
||||
artifacts: "artifacts",
|
||||
held: "held",
|
||||
collect: "collect",
|
||||
mirrors: "mirrors",
|
||||
images: "images",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly artifactsGone: "artifacts-gone";
|
||||
};
|
||||
export const events = {
|
||||
artifactsGone: "artifacts-gone",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "mesh-artifact-sweep.events"; readonly maxAgeDays: 7 };
|
||||
export const family = { name: "mesh-artifact-sweep.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export declare const artifactsGoneSubject: "mesh.seat.mesh-artifact-sweep.event.artifacts-gone";
|
||||
export const artifactsGoneSubject = "mesh.seat.mesh-artifact-sweep.event.artifacts-gone";
|
||||
|
||||
/** the body of artifacts-gone */
|
||||
export interface ArtifactsGone {
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat mesh-catalog, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-mesh-catalog",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,545 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-catalog", defined whole (seats/mesh-catalog/seat.json): The catalog of the mesh: every module the trunk holds with its manifest, fingerprint and verdict, the packages published, and the seat list (ADR 0636 §1, §4).
|
||||
|
||||
export const seat = "mesh-catalog";
|
||||
|
||||
export const verbs = {
|
||||
modules: "modules",
|
||||
module: "module",
|
||||
provides: "provides",
|
||||
dependents: "dependents",
|
||||
seatDefinitions: "seat-definitions",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
seatDefinitionChanged: "seat-definition-changed",
|
||||
seatDefinitionRemoved: "seat-definition-removed",
|
||||
manifestAccepted: "manifest-accepted",
|
||||
manifestRefused: "manifest-refused",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "mesh-catalog.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const seatDefinitionChangedSubject = "mesh.seat.mesh-catalog.event.seat-definition-changed";
|
||||
|
||||
export const seatDefinitionRemovedSubject = "mesh.seat.mesh-catalog.event.seat-definition-removed";
|
||||
|
||||
export const manifestAcceptedSubject = "mesh.seat.mesh-catalog.event.manifest-accepted";
|
||||
|
||||
export const manifestRefusedSubject = "mesh.seat.mesh-catalog.event.manifest-refused";
|
||||
|
||||
export const states = {
|
||||
manifests: "manifests",
|
||||
modules: "modules",
|
||||
candidates: "candidates",
|
||||
verdicts: "verdicts",
|
||||
predefined: "predefined",
|
||||
configCandidates: "config-candidates",
|
||||
packages: "packages",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state manifests under the form "<digest>". */
|
||||
export function manifestsByDigestKey(digest: string): string {
|
||||
return digest;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<digest>", or undefined for a key of another form. */
|
||||
export function parseManifestsByDigestKey(_key: string): { digest: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const digest = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { digest };
|
||||
}
|
||||
|
||||
/** The key of one value of the state modules under the form "<module>". */
|
||||
export function modulesByModuleKey(module: string): string {
|
||||
return module;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<module>", or undefined for a key of another form. */
|
||||
export function parseModulesByModuleKey(_key: string): { module: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { module };
|
||||
}
|
||||
|
||||
/** The key of one value of the state candidates under the form "<group>". */
|
||||
export function candidatesByGroupKey(group: string): string {
|
||||
return group;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<group>", or undefined for a key of another form. */
|
||||
export function parseCandidatesByGroupKey(_key: string): { group: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const group = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { group };
|
||||
}
|
||||
|
||||
/** The key of one value of the state verdicts under the form "<digest>". */
|
||||
export function verdictsByDigestKey(digest: string): string {
|
||||
return digest;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<digest>", or undefined for a key of another form. */
|
||||
export function parseVerdictsByDigestKey(_key: string): { digest: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const digest = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { digest };
|
||||
}
|
||||
|
||||
/** The key of one value of the state predefined under the form "list". */
|
||||
export function predefinedByListKey(): string {
|
||||
return "list";
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "list", or undefined for a key of another form. */
|
||||
export function parsePredefinedByListKey(_key: string): { } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("list")) return undefined;
|
||||
_rest = _rest.slice(4);
|
||||
if (_rest !== "") return undefined;
|
||||
return { };
|
||||
}
|
||||
|
||||
/** The key of one value of the state config-candidates under the form "<pull>". */
|
||||
export function configCandidatesByPullKey(pull: string): string {
|
||||
return pull;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<pull>", or undefined for a key of another form. */
|
||||
export function parseConfigCandidatesByPullKey(_key: string): { pull: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const pull = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { pull };
|
||||
}
|
||||
|
||||
/** The key of one value of the state packages under the form "<module>". */
|
||||
export function packagesByModuleKey(module: string): string {
|
||||
return module;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<module>", or undefined for a key of another form. */
|
||||
export function parsePackagesByModuleKey(_key: string): { module: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { module };
|
||||
}
|
||||
|
||||
/** The key of one value of the state packages under the form "<package>.<series>". */
|
||||
export function packagesByPackageSeriesKey(packagePart: string, series: string): string {
|
||||
return packagePart + "." + series;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<package>.<series>", or undefined for a key of another form. */
|
||||
export function parsePackagesByPackageSeriesKey(_key: string): { packagePart: string; series: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const packagePart = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const series = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { packagePart, series };
|
||||
}
|
||||
|
||||
/** a toolchain a fingerprint was computed with (ADR 0405 clause 7) */
|
||||
export interface ToolchainUsed {
|
||||
"language": string;
|
||||
/** the build module's recipe version */
|
||||
"recipe": string;
|
||||
/** the installed toolchain's version */
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** is what modules takes. */
|
||||
export interface ModulesInput {
|
||||
}
|
||||
|
||||
export interface ModulesAnswerModulesItem {
|
||||
/** the merge commit it was last changed at */
|
||||
"commit": string;
|
||||
/** its fingerprint (src2: and 64 hex digits); absent when it has none */
|
||||
"fp"?: string;
|
||||
"module": string;
|
||||
/** why it has none */
|
||||
"none"?: string;
|
||||
/** the module's directory in its repository, '.' for a root */
|
||||
"path"?: string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** is what modules answers. */
|
||||
export interface ModulesAnswer {
|
||||
"modules": ModulesAnswerModulesItem[];
|
||||
}
|
||||
|
||||
/** is what module takes. */
|
||||
export interface ModuleInput {
|
||||
/** the module's name */
|
||||
"module": string;
|
||||
}
|
||||
|
||||
export interface ModuleAnswerModule {
|
||||
/** the merge commit it was last changed at */
|
||||
"commit": string;
|
||||
/** its fingerprint (src2: and 64 hex digits); absent when it has none */
|
||||
"fp"?: string;
|
||||
/** the module's manifest as the trunk holds it */
|
||||
"manifest"?: Record<string, unknown>;
|
||||
"module": string;
|
||||
/** why it has none */
|
||||
"none"?: string;
|
||||
/** the module's directory in its repository, '.' for a root */
|
||||
"path"?: string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** is what module answers. */
|
||||
export interface ModuleAnswer {
|
||||
"module": ModuleAnswerModule;
|
||||
}
|
||||
|
||||
/** is what provides takes. */
|
||||
export interface ProvidesInput {
|
||||
/** the provision, such as postgres-database */
|
||||
"provision": string;
|
||||
}
|
||||
|
||||
/** is what provides answers. */
|
||||
export type ProvidesAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what dependents takes. */
|
||||
export interface DependentsInput {
|
||||
/** the module's name */
|
||||
"module": string;
|
||||
}
|
||||
|
||||
/** is what dependents answers. */
|
||||
export type DependentsAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what seat-definitions takes. */
|
||||
export interface SeatDefinitionsInput {
|
||||
/** the seat's name; none lists every trunk seat */
|
||||
"seat"?: string;
|
||||
}
|
||||
|
||||
export interface SeatDefinitionsAnswerEntry {
|
||||
/** the definition, resolved with the parts it includes */
|
||||
"definition"?: Record<string, unknown>;
|
||||
"digest": string;
|
||||
"seat": string;
|
||||
/** trunk */
|
||||
"source": string;
|
||||
/** why the definition could not be read, when it could not */
|
||||
"unparsed"?: string;
|
||||
}
|
||||
|
||||
export interface SeatDefinitionsAnswerSeatsItem {
|
||||
"digest": string;
|
||||
"seat": string;
|
||||
/** trunk */
|
||||
"source": string;
|
||||
}
|
||||
|
||||
/** is what seat-definitions answers. */
|
||||
export interface SeatDefinitionsAnswer {
|
||||
"entry"?: SeatDefinitionsAnswerEntry;
|
||||
"found"?: boolean;
|
||||
"revision"?: number;
|
||||
"seat"?: string;
|
||||
"seats"?: SeatDefinitionsAnswerSeatsItem[];
|
||||
}
|
||||
|
||||
/** is the body of the event seat-definition-changed. */
|
||||
export interface SeatDefinitionChangedEvent {
|
||||
"digest": string;
|
||||
"seat": string;
|
||||
/** trunk */
|
||||
"source": string;
|
||||
}
|
||||
|
||||
/** is the body of the event seat-definition-removed. */
|
||||
export interface SeatDefinitionRemovedEvent {
|
||||
"seat": string;
|
||||
}
|
||||
|
||||
export interface ManifestAcceptedEventBusStateItem {
|
||||
"configuration"?: Record<string, unknown>;
|
||||
"name": string;
|
||||
"options"?: Record<string, unknown>;
|
||||
"storage": string;
|
||||
"template"?: string;
|
||||
"types"?: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
/** is the body of the event manifest-accepted. */
|
||||
export interface ManifestAcceptedEvent {
|
||||
"bus-state": ManifestAcceptedEventBusStateItem[];
|
||||
"digest": string;
|
||||
"judge": string;
|
||||
"module": string;
|
||||
/** the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it */
|
||||
"revision"?: number;
|
||||
"v": number;
|
||||
}
|
||||
|
||||
/** is the body of the event manifest-refused. */
|
||||
export interface ManifestRefusedEvent {
|
||||
"digest": string;
|
||||
"judge": string;
|
||||
"module": string;
|
||||
"problems": string[];
|
||||
/** the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it */
|
||||
"revision"?: number;
|
||||
"v": number;
|
||||
}
|
||||
|
||||
/** is one value of the state manifests under the key <digest>. */
|
||||
export interface ManifestsByDigestValue {
|
||||
/** the manifest, UTF-8 JSON text */
|
||||
"manifest": string;
|
||||
"module": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface ModulesByModuleValueInputs2 {
|
||||
"bases"?: string[];
|
||||
"builder"?: string;
|
||||
"contexts"?: Record<string, string>;
|
||||
"import-form"?: string;
|
||||
"imports"?: string[];
|
||||
"locks"?: Record<string, string>;
|
||||
"packages"?: string[];
|
||||
"paths"?: Record<string, string>;
|
||||
"tree": string;
|
||||
}
|
||||
|
||||
/** is one value of the state modules under the key <module>. */
|
||||
export interface ModulesByModuleValue {
|
||||
"commit": string;
|
||||
/** the old-form fingerprint */
|
||||
"fp"?: string;
|
||||
"fp-src"?: number;
|
||||
/** src2: fingerprint */
|
||||
"fp2"?: string;
|
||||
"inputs2"?: ModulesByModuleValueInputs2;
|
||||
/** manifest digest */
|
||||
"manifest"?: string;
|
||||
"needs"?: string[];
|
||||
"none"?: string;
|
||||
/** why it has none */
|
||||
"none2"?: string;
|
||||
"packages"?: Record<string, string>;
|
||||
"path"?: string;
|
||||
"paths"?: Record<string, string[]>;
|
||||
"problems"?: string[];
|
||||
"repository": string;
|
||||
/** the source revision */
|
||||
"src"?: number;
|
||||
/** by language: the toolchain FP2 was computed with */
|
||||
"toolchains"?: Record<string, ToolchainUsed>;
|
||||
"unknown"?: string[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"verdict"?: string;
|
||||
"warnings"?: string[];
|
||||
}
|
||||
|
||||
export interface CandidatesByGroupValuePullsItemFpsValue {
|
||||
"fp2"?: string;
|
||||
"manifest"?: string;
|
||||
"none2"?: string;
|
||||
"packages"?: Record<string, string>;
|
||||
"paths"?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface CandidatesByGroupValuePullsItem {
|
||||
"fps"?: Record<string, CandidatesByGroupValuePullsItemFpsValue>;
|
||||
"head": string;
|
||||
"modules": string[];
|
||||
"number": number;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** is one value of the state candidates under the key <group>. */
|
||||
export interface CandidatesByGroupValue {
|
||||
/** the source revision it is read on */
|
||||
"base": number;
|
||||
"fpset"?: string;
|
||||
"group": string;
|
||||
"heads": string;
|
||||
"pulls": CandidatesByGroupValuePullsItem[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** is one value of the state verdicts under the key <digest>. */
|
||||
export interface VerdictsByDigestValue {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"judge"?: string;
|
||||
"module": string;
|
||||
"problems"?: string[];
|
||||
"state": string;
|
||||
"unknown"?: string[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"warnings"?: string[];
|
||||
}
|
||||
|
||||
/** is one value of the state predefined under the key list. */
|
||||
export interface PredefinedByListValue {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"commit": string;
|
||||
/** the foundation's predefined list as kept */
|
||||
"list": unknown;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface ConfigCandidatesByPullValueDeclaresValueValue {
|
||||
/** the default */
|
||||
"default": unknown;
|
||||
"description"?: string;
|
||||
/** the allowed values */
|
||||
"enum"?: unknown;
|
||||
"kind": string;
|
||||
/** a declared bound; 0 is a bound, absent is none */
|
||||
"maximum"?: number | null;
|
||||
/** a declared bound; 0 is a bound, absent is none */
|
||||
"minimum"?: number | null;
|
||||
"pattern"?: string;
|
||||
"predefined"?: string;
|
||||
"required"?: boolean;
|
||||
"runtime"?: boolean;
|
||||
"trusted"?: boolean;
|
||||
"type"?: string;
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is one value of the state config-candidates under the key <pull>. */
|
||||
export interface ConfigCandidatesByPullValue {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
/** module to key to declaration */
|
||||
"declares": Record<string, Record<string, ConfigCandidatesByPullValueDeclaresValueValue>>;
|
||||
"head": string;
|
||||
"pull": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface PackagesByModuleValuePackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
/** is one value of the state packages under the key <module>. */
|
||||
export interface PackagesByModuleValue {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"commit": string;
|
||||
"dir"?: string;
|
||||
/** the Go module path */
|
||||
"module": string;
|
||||
"packages": PackagesByModuleValuePackagesItem[];
|
||||
"repository": string;
|
||||
/** digest of go.mod and go.sum */
|
||||
"requires"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNewestContentsPackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNewestContents {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"commit": string;
|
||||
"dir"?: string;
|
||||
/** the Go module path */
|
||||
"module": string;
|
||||
"packages": PackagesByPackageSeriesValueNewestContentsPackagesItem[];
|
||||
"repository": string;
|
||||
/** digest of go.mod and go.sum */
|
||||
"requires"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNewest {
|
||||
"commit"?: string;
|
||||
"contents"?: PackagesByPackageSeriesValueNewestContents;
|
||||
"digest"?: string;
|
||||
"fingerprint"?: string;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNumberedContentsPackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNumberedContents {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"commit": string;
|
||||
"dir"?: string;
|
||||
/** the Go module path */
|
||||
"module": string;
|
||||
"packages": PackagesByPackageSeriesValueNumberedContentsPackagesItem[];
|
||||
"repository": string;
|
||||
/** digest of go.mod and go.sum */
|
||||
"requires"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface PackagesByPackageSeriesValueNumbered {
|
||||
"commit"?: string;
|
||||
"contents"?: PackagesByPackageSeriesValueNumberedContents;
|
||||
"digest"?: string;
|
||||
"fingerprint"?: string;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** is one value of the state packages under the key <package>.<series>. */
|
||||
export interface PackagesByPackageSeriesValue {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"go-module"?: string;
|
||||
"name": string;
|
||||
"newest"?: PackagesByPackageSeriesValueNewest;
|
||||
"numbered"?: PackagesByPackageSeriesValueNumbered;
|
||||
"package"?: string;
|
||||
"seat"?: string;
|
||||
"series": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat mesh-delivery, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-mesh-delivery",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-delivery", defined whole (seats/mesh-delivery/seat.json): The delivery gate: reads and steers deliveries, merges and the checks that decide them; the merge is made on the operator's Approve once both checks passed.
|
||||
|
||||
export const seat = "mesh-delivery";
|
||||
|
||||
export const verbs = {
|
||||
deliveries: "deliveries",
|
||||
times: "times",
|
||||
show: "show",
|
||||
groups: "groups",
|
||||
whatIf: "what-if",
|
||||
checks: "checks",
|
||||
table: "table",
|
||||
stalled: "stalled",
|
||||
recheck: "recheck",
|
||||
release: "release",
|
||||
stop: "stop",
|
||||
close: "close",
|
||||
retireHistory: "retire-history",
|
||||
settle: "settle",
|
||||
} as const;
|
||||
|
||||
export const states = {
|
||||
source: "source",
|
||||
merges: "merges",
|
||||
asks: "asks",
|
||||
owed: "owed",
|
||||
turns: "turns",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state source under the form "main". */
|
||||
export function sourceByMainKey(): string {
|
||||
return "main";
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "main", or undefined for a key of another form. */
|
||||
export function parseSourceByMainKey(_key: string): { } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("main")) return undefined;
|
||||
_rest = _rest.slice(4);
|
||||
if (_rest !== "") return undefined;
|
||||
return { };
|
||||
}
|
||||
|
||||
/** The key of one value of the state merges under the form "<group>". */
|
||||
export function mergesByGroupKey(group: string): string {
|
||||
return group;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<group>", or undefined for a key of another form. */
|
||||
export function parseMergesByGroupKey(_key: string): { group: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const group = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { group };
|
||||
}
|
||||
|
||||
/** The key of one value of the state asks under the form "merge.<group>.<heads>". */
|
||||
export function asksByMergeGroupHeadsKey(group: string, heads: string): string {
|
||||
return "merge." + group + "." + heads;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "merge.<group>.<heads>", or undefined for a key of another form. */
|
||||
export function parseAsksByMergeGroupHeadsKey(_key: string): { group: string; heads: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("merge.")) return undefined;
|
||||
_rest = _rest.slice(6);
|
||||
const _at1 = _rest.indexOf(".");
|
||||
if (_at1 <= 0) return undefined;
|
||||
const group = _rest.slice(0, _at1);
|
||||
_rest = _rest.slice(_at1 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const heads = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { group, heads };
|
||||
}
|
||||
|
||||
/** The key of one value of the state owed under the form "<repository>.<number>.<head>.<act>". */
|
||||
export function owedByRepositoryNumberHeadActKey(repository: string, number: string, head: string, act: string): string {
|
||||
return repository + "." + number + "." + head + "." + act;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<repository>.<number>.<head>.<act>", or undefined for a key of another form. */
|
||||
export function parseOwedByRepositoryNumberHeadActKey(_key: string): { repository: string; number: string; head: string; act: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const repository = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const number = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
const _at4 = _rest.indexOf(".");
|
||||
if (_at4 <= 0) return undefined;
|
||||
const head = _rest.slice(0, _at4);
|
||||
_rest = _rest.slice(_at4 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const act = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { repository, number, head, act };
|
||||
}
|
||||
|
||||
/** The key of one value of the state turns under the form "<repository>". */
|
||||
export function turnsByRepositoryKey(repository: string): string {
|
||||
return repository;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<repository>", or undefined for a key of another form. */
|
||||
export function parseTurnsByRepositoryKey(_key: string): { repository: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const repository = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { repository };
|
||||
}
|
||||
|
||||
/** is what deliveries takes. */
|
||||
export interface DeliveriesInput {
|
||||
/** "true": the final ones of the last thirty days too */
|
||||
"all"?: "true" | "false";
|
||||
/** a group's id (its branch name) */
|
||||
"group"?: string;
|
||||
/** owner/repository */
|
||||
"repository"?: string;
|
||||
/** one state, e.g. delivering or held */
|
||||
"state"?: string;
|
||||
}
|
||||
|
||||
/** is what deliveries answers. */
|
||||
export type DeliveriesAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what times takes. */
|
||||
export interface TimesInput {
|
||||
}
|
||||
|
||||
/** is what times answers. */
|
||||
export type TimesAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what show takes. */
|
||||
export interface ShowInput {
|
||||
/** a delivery's id, or a group's */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is what show answers. */
|
||||
export type ShowAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what groups takes. */
|
||||
export interface GroupsInput {
|
||||
/** "true": the groups that ended too */
|
||||
"all"?: "true" | "false";
|
||||
}
|
||||
|
||||
/** is what groups answers. */
|
||||
export type GroupsAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what what-if takes. */
|
||||
export interface WhatIfInput {
|
||||
}
|
||||
|
||||
/** is what what-if answers. */
|
||||
export type WhatIfAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what checks takes. */
|
||||
export interface ChecksInput {
|
||||
/** a commit's sha, or the start of one, instead of a pull request */
|
||||
"commit"?: string;
|
||||
/** a pull request's number: its head is read */
|
||||
"number"?: string;
|
||||
/** owner/repository */
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** is what checks answers. */
|
||||
export type ChecksAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what table takes. */
|
||||
export interface TableInput {
|
||||
}
|
||||
|
||||
/** is what table answers. */
|
||||
export type TableAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what stalled takes. */
|
||||
export interface StalledInput {
|
||||
}
|
||||
|
||||
/** is what stalled answers. */
|
||||
export type StalledAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what recheck takes. */
|
||||
export interface RecheckInput {
|
||||
/** the delivery's id */
|
||||
"id": string;
|
||||
/** why, kept with the transition */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what recheck answers. */
|
||||
export type RecheckAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what release takes. */
|
||||
export interface ReleaseInput {
|
||||
}
|
||||
|
||||
/** is what release answers. */
|
||||
export type ReleaseAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what stop takes. */
|
||||
export interface StopInput {
|
||||
}
|
||||
|
||||
/** is what stop answers. */
|
||||
export type StopAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what close takes. */
|
||||
export interface CloseInput {
|
||||
/** the delivery's id */
|
||||
"id": string;
|
||||
/** the condition it answers */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what close answers. */
|
||||
export type CloseAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what retire-history takes. */
|
||||
export interface RetireHistoryInput {
|
||||
}
|
||||
|
||||
/** is what retire-history answers. */
|
||||
export type RetireHistoryAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what settle takes. */
|
||||
export interface SettleInput {
|
||||
/** the held deliveries' ids (owner/repository@commit) */
|
||||
"ids": string[];
|
||||
/** why they may be settled, shown to the operator */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what settle answers. */
|
||||
export type SettleAnswer = Record<string, unknown>;
|
||||
|
||||
/** is one value of the state source under the key main. */
|
||||
export interface SourceByMainValue {
|
||||
/** the group that moved it */
|
||||
"group": string;
|
||||
/** repository to the merged head, a full commit */
|
||||
"heads": Record<string, string>;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface MergesByGroupValuePullsItem {
|
||||
"commit"?: string;
|
||||
"head": string;
|
||||
"number": number;
|
||||
"repository": string;
|
||||
/** merging, merged or refused */
|
||||
"state": string;
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state merges under the key <group>. */
|
||||
export interface MergesByGroupValue {
|
||||
/** <repository>@<number> to the approved head */
|
||||
"approved"?: Record<string, string>;
|
||||
/** the ask key */
|
||||
"ask": string;
|
||||
"group": string;
|
||||
"pulls": MergesByGroupValuePullsItem[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface AsksByMergeGroupHeadsValueHeadsItem {
|
||||
/** the full commit */
|
||||
"head": string;
|
||||
"number": number;
|
||||
/** <owner>/<name> */
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** is one value of the state asks under the key merge.<group>.<heads>. */
|
||||
export interface AsksByMergeGroupHeadsValue {
|
||||
/** the operator-channel ask as raised */
|
||||
"ask": unknown;
|
||||
/** the number of times it was asked */
|
||||
"asking"?: number;
|
||||
"group": string;
|
||||
"heads": AsksByMergeGroupHeadsValueHeadsItem[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** is one value of the state owed under the key <repository>.<number>.<head>.<act>. */
|
||||
export interface OwedByRepositoryNumberHeadActValue {
|
||||
/** status=<context>, view, note or comment.<seq> */
|
||||
"act": string;
|
||||
"context"?: string;
|
||||
"ref"?: string;
|
||||
"state"?: string;
|
||||
"target"?: string;
|
||||
"text"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
export interface TurnsByRepositoryValueWaitingItem {
|
||||
/** when (RFC 3339 time) */
|
||||
"approved": string;
|
||||
"ask"?: string;
|
||||
"group": string;
|
||||
"heads": string;
|
||||
/** when (RFC 3339 time) */
|
||||
"since": string;
|
||||
"step"?: string;
|
||||
"waits-for"?: string;
|
||||
/** when (RFC 3339 time) */
|
||||
"waits-since"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state turns under the key <repository>. */
|
||||
export interface TurnsByRepositoryValue {
|
||||
"repository": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"waiting": TurnsByRepositoryValueWaitingItem[];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat mesh-delivery-checker, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-mesh-delivery-checker",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+134
-115
@@ -1,103 +1,127 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-delivery-checker", defined whole (seats/mesh-delivery-checker/seat.json): The merge check's tries: start one, read one, end one. The seat says each check's end as checked and what the checker owes the forge as owed; the checker's other events stay under its own subjects (ADR 0620 §2).
|
||||
// The contract of the seat "mesh-delivery-checker", defined whole (seats/mesh-delivery-checker/seat.json): The merge check's tries: start one, read one, end one. The checker's own events stay under its own subjects (ADR 0620 §2).
|
||||
|
||||
export declare const seat: "mesh-delivery-checker";
|
||||
export const seat = "mesh-delivery-checker";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly try: "try";
|
||||
readonly tryRead: "try-read";
|
||||
readonly tryEnd: "try-end";
|
||||
readonly input: "input";
|
||||
};
|
||||
export const verbs = {
|
||||
try: "try",
|
||||
tryRead: "try-read",
|
||||
tryEnd: "try-end",
|
||||
input: "input",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly checked: "checked";
|
||||
readonly owed: "owed";
|
||||
};
|
||||
export const holderEvents = {
|
||||
verdict: "verdict",
|
||||
tagWanted: "tag-wanted",
|
||||
previewWritten: "preview.written",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "mesh-delivery-checker.events"; readonly maxAgeDays: 7 };
|
||||
|
||||
export declare const checkedSubject: "mesh.seat.mesh-delivery-checker.event.checked";
|
||||
|
||||
export declare const owedStream: "SEAT_mesh-delivery-checker_owed";
|
||||
|
||||
export declare function owedSubject(repository: string, number: string): string;
|
||||
|
||||
export declare const owedSubjectAll: "mesh.seat.mesh-delivery-checker.event.owed.*.*";
|
||||
|
||||
export declare const holderEvents: {
|
||||
readonly verdict: "verdict";
|
||||
readonly previewWritten: "preview.written";
|
||||
};
|
||||
|
||||
export declare function verdictHolderSubject(holder: string): string;
|
||||
|
||||
export declare function previewWrittenHolderSubject(holder: string): string;
|
||||
|
||||
export declare const states: {
|
||||
readonly verdicts: "verdicts";
|
||||
readonly kept: "kept";
|
||||
readonly owed: "owed";
|
||||
readonly previews: "previews";
|
||||
};
|
||||
|
||||
/** The key of one value of the state verdicts under the form "<group>.<heads>". */
|
||||
export declare function verdictsByGroupHeadsKey(group: string, heads: string): string;
|
||||
|
||||
/** The parts of a key of the form "<group>.<heads>", or undefined for a key of another form. */
|
||||
export declare function parseVerdictsByGroupHeadsKey(_key: string): { group: string; heads: string } | undefined;
|
||||
|
||||
/** The key of one value of the state kept under the form "<level>.<digest>". */
|
||||
export declare function keptByLevelDigestKey(level: string, digest: string): string;
|
||||
|
||||
/** The parts of a key of the form "<level>.<digest>", or undefined for a key of another form. */
|
||||
export declare function parseKeptByLevelDigestKey(_key: string): { level: string; digest: string } | undefined;
|
||||
|
||||
/** The key of one value of the state owed under the form "<repository>.<number>.<head>.<act>". */
|
||||
export declare function owedByRepositoryNumberHeadActKey(repository: string, number: string, head: string, act: string): string;
|
||||
|
||||
/** The parts of a key of the form "<repository>.<number>.<head>.<act>", or undefined for a key of another form. */
|
||||
export declare function parseOwedByRepositoryNumberHeadActKey(_key: string): { repository: string; number: string; head: string; act: string } | undefined;
|
||||
|
||||
/** The key of one value of the state previews under the form "<repository>.<head>.<trunk>". */
|
||||
export declare function previewsByRepositoryHeadTrunkKey(repository: string, head: string, trunk: string): string;
|
||||
|
||||
/** The parts of a key of the form "<repository>.<head>.<trunk>", or undefined for a key of another form. */
|
||||
export declare function parsePreviewsByRepositoryHeadTrunkKey(_key: string): { repository: string; head: string; trunk: string } | undefined;
|
||||
|
||||
/** one entry of the candidate checked: a module at its fingerprint */
|
||||
export interface CheckedEntry {
|
||||
/** the entry's fingerprint */
|
||||
"fp": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the node it was composed for, when the check composed it on one */
|
||||
"node"?: string;
|
||||
export function verdictHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.verdict";
|
||||
}
|
||||
|
||||
/** the status the checker owes the forge for a head, said under its id and safe to repeat (a status replaces what stands); the forge bridge performs it through the seat git's verb status (design 47 *What the gate owes the forge*) */
|
||||
export interface Owed {
|
||||
/** the act: always status */
|
||||
"act": "status";
|
||||
/** its context, mesh/check */
|
||||
"context": string;
|
||||
/** what it says */
|
||||
"description"?: string;
|
||||
/** the pull request's head the status is on */
|
||||
"head": string;
|
||||
/** the act's id, the same each time it is said again */
|
||||
"id": string;
|
||||
/** the pull request's number */
|
||||
"number": number;
|
||||
/** the repository, <owner>/<name> */
|
||||
"repository": string;
|
||||
/** when the checker first said it */
|
||||
"said"?: string;
|
||||
/** pending, success, failure or error */
|
||||
"state": string;
|
||||
/** the page it links to */
|
||||
"target"?: string;
|
||||
export function tagWantedHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.tag-wanted";
|
||||
}
|
||||
|
||||
export function previewWrittenHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.preview.written";
|
||||
}
|
||||
|
||||
export const states = {
|
||||
verdicts: "verdicts",
|
||||
kept: "kept",
|
||||
owed: "owed",
|
||||
previews: "previews",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state verdicts under the form "<group>.<heads>". */
|
||||
export function verdictsByGroupHeadsKey(group: string, heads: string): string {
|
||||
return group + "." + heads;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<group>.<heads>", or undefined for a key of another form. */
|
||||
export function parseVerdictsByGroupHeadsKey(_key: string): { group: string; heads: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const group = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const heads = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { group, heads };
|
||||
}
|
||||
|
||||
/** The key of one value of the state kept under the form "<level>.<digest>". */
|
||||
export function keptByLevelDigestKey(level: string, digest: string): string {
|
||||
return level + "." + digest;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<level>.<digest>", or undefined for a key of another form. */
|
||||
export function parseKeptByLevelDigestKey(_key: string): { level: string; digest: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const level = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const digest = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { level, digest };
|
||||
}
|
||||
|
||||
/** The key of one value of the state owed under the form "<repository>.<number>.<head>.<act>". */
|
||||
export function owedByRepositoryNumberHeadActKey(repository: string, number: string, head: string, act: string): string {
|
||||
return repository + "." + number + "." + head + "." + act;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<repository>.<number>.<head>.<act>", or undefined for a key of another form. */
|
||||
export function parseOwedByRepositoryNumberHeadActKey(_key: string): { repository: string; number: string; head: string; act: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const repository = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const number = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
const _at4 = _rest.indexOf(".");
|
||||
if (_at4 <= 0) return undefined;
|
||||
const head = _rest.slice(0, _at4);
|
||||
_rest = _rest.slice(_at4 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const act = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { repository, number, head, act };
|
||||
}
|
||||
|
||||
/** The key of one value of the state previews under the form "<repository>.<head>.<trunk>". */
|
||||
export function previewsByRepositoryHeadTrunkKey(repository: string, head: string, trunk: string): string {
|
||||
return repository + "." + head + "." + trunk;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<repository>.<head>.<trunk>", or undefined for a key of another form. */
|
||||
export function parsePreviewsByRepositoryHeadTrunkKey(_key: string): { repository: string; head: string; trunk: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const repository = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const head = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const trunk = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { repository, head, trunk };
|
||||
}
|
||||
|
||||
export interface TryInputMembersItem {
|
||||
@@ -172,29 +196,6 @@ export interface InputAnswer {
|
||||
"input": string;
|
||||
}
|
||||
|
||||
/** is the body of the event checked. */
|
||||
export interface CheckedEvent {
|
||||
/** when */
|
||||
"at"?: string;
|
||||
/** the candidate's catalog graph revision judged, by its number on the seat mesh-catalog */
|
||||
"catalog"?: number;
|
||||
/** the entries checked */
|
||||
"entries"?: CheckedEntry[];
|
||||
/** the group, its branch */
|
||||
"group": string;
|
||||
/** the heads checked, 12 hex digits, as the candidate's revisions are keyed */
|
||||
"heads": string;
|
||||
/** the source revision the heads are merged onto */
|
||||
"source"?: number;
|
||||
/** pass, fail, or could not run when a part the check needs did not answer */
|
||||
"verdict": "pass" | "fail" | "could not run";
|
||||
/** what failed first, or the part not heard */
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is the body of the event owed. */
|
||||
export type OwedEvent = Owed;
|
||||
|
||||
export interface VerdictHolderEventSeriesItem {
|
||||
/** its artifact, or the package's ecosystem name as the module's packages name it */
|
||||
"artifact": string;
|
||||
@@ -222,6 +223,24 @@ export interface VerdictHolderEvent {
|
||||
"verdict": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event tag-wanted. */
|
||||
export interface TagWantedHolderEvent {
|
||||
/** the pull request's branch: its tag is removed when the branch ends */
|
||||
"branch": string;
|
||||
/** its head */
|
||||
"head": string;
|
||||
/** the group member */
|
||||
"module": string;
|
||||
/** the package it declares */
|
||||
"package": string;
|
||||
/** the pull request */
|
||||
"pull"?: number;
|
||||
/** owner/repo */
|
||||
"repository": string;
|
||||
/** the tag wanted */
|
||||
"tag"?: string;
|
||||
}
|
||||
|
||||
export interface VerdictsByGroupHeadsValueComposition {
|
||||
"fpset"?: string;
|
||||
"machines"?: string[];
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat mesh-wants, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-mesh-wants",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-wants", defined whole (seats/mesh-wants/seat.json): The seat that says what each node should run and whether each module's new builds wait for a person (ADR 0565, ADR 0539).
|
||||
|
||||
export const seat = "mesh-wants";
|
||||
|
||||
export const verbs = {
|
||||
upgrade: "upgrade",
|
||||
bus: "bus",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
policyChanged: "policy-changed",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "mesh-wants.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const policyChangedSubject = "mesh.seat.mesh-wants.event.policy-changed";
|
||||
|
||||
export const states = {
|
||||
wants: "wants",
|
||||
differences: "differences",
|
||||
compositions: "compositions",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state wants under the form "want.<node>.<module>". */
|
||||
export function wantsByWantNodeModuleKey(node: string, module: string): string {
|
||||
return "want." + node + "." + module;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "want.<node>.<module>", or undefined for a key of another form. */
|
||||
export function parseWantsByWantNodeModuleKey(_key: string): { node: string; module: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("want.")) return undefined;
|
||||
_rest = _rest.slice(5);
|
||||
const _at1 = _rest.indexOf(".");
|
||||
if (_at1 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at1);
|
||||
_rest = _rest.slice(_at1 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, module };
|
||||
}
|
||||
|
||||
/** The key of one value of the state wants under the form "want.<node>.node". */
|
||||
export function wantsByWantNodeNodeKey(node: string): string {
|
||||
return "want." + node + ".node";
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "want.<node>.node", or undefined for a key of another form. */
|
||||
export function parseWantsByWantNodeNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("want.")) return undefined;
|
||||
_rest = _rest.slice(5);
|
||||
const _at1 = _rest.indexOf(".node");
|
||||
if (_at1 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at1);
|
||||
_rest = _rest.slice(_at1 + 5);
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state wants under the form "held.<module>.<fingerprint>". */
|
||||
export function wantsByHeldModuleFingerprintKey(module: string, fingerprint: string): string {
|
||||
return "held." + module + "." + fingerprint;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "held.<module>.<fingerprint>", or undefined for a key of another form. */
|
||||
export function parseWantsByHeldModuleFingerprintKey(_key: string): { module: string; fingerprint: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("held.")) return undefined;
|
||||
_rest = _rest.slice(5);
|
||||
const _at1 = _rest.indexOf(".");
|
||||
if (_at1 <= 0) return undefined;
|
||||
const module = _rest.slice(0, _at1);
|
||||
_rest = _rest.slice(_at1 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const fingerprint = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { module, fingerprint };
|
||||
}
|
||||
|
||||
/** The key of one value of the state differences under the form "<node>.<module>". */
|
||||
export function differencesByNodeModuleKey(node: string, module: string): string {
|
||||
return node + "." + module;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
|
||||
export function parseDifferencesByNodeModuleKey(_key: string): { node: string; module: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, module };
|
||||
}
|
||||
|
||||
/** The key of one value of the state compositions under the form "<group>.<heads>". */
|
||||
export function compositionsByGroupHeadsKey(group: string, heads: string): string {
|
||||
return group + "." + heads;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<group>.<heads>", or undefined for a key of another form. */
|
||||
export function parseCompositionsByGroupHeadsKey(_key: string): { group: string; heads: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const group = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const heads = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { group, heads };
|
||||
}
|
||||
|
||||
/** is what upgrade takes. */
|
||||
export interface UpgradeInput {
|
||||
/** "true": each node's own composition, by its digest, and the assigner's findings */
|
||||
"compare"?: "true" | "false";
|
||||
/** one module */
|
||||
"module"?: string;
|
||||
/** with module: roll, together, record, or default to take a person's choice back */
|
||||
"policy"?: string;
|
||||
/** with policy: why, required and kept */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** is what upgrade answers. */
|
||||
export type UpgradeAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what bus takes. */
|
||||
export interface BusInput {
|
||||
}
|
||||
|
||||
/** is what bus answers. */
|
||||
export type BusAnswer = Record<string, unknown>;
|
||||
|
||||
/** is the body of the event policy-changed. */
|
||||
export type PolicyChangedEvent = Record<string, unknown>;
|
||||
|
||||
/** is one value of the state wants under the key want.<node>.<module>. */
|
||||
export interface WantsByWantNodeModuleValue {
|
||||
/** again or skip */
|
||||
"backup"?: "again" | "skip";
|
||||
"composed"?: string;
|
||||
"fp"?: string;
|
||||
"hold"?: boolean;
|
||||
"newest"?: string;
|
||||
"put"?: boolean;
|
||||
"release"?: string;
|
||||
"removed"?: boolean;
|
||||
/** the rule that holds the node back, 1 to 10 */
|
||||
"rule"?: number;
|
||||
"self"?: boolean;
|
||||
"v"?: number;
|
||||
"words"?: string;
|
||||
"yes"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state wants under the key want.<node>.node. */
|
||||
export interface WantsByWantNodeNodeValue {
|
||||
"composed": string;
|
||||
"self"?: boolean;
|
||||
"v"?: number;
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state wants under the key held.<module>.<fingerprint>. */
|
||||
export interface WantsByHeldModuleFingerprintValue {
|
||||
"node": string;
|
||||
"v"?: number;
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state differences under the key <node>.<module>. */
|
||||
export interface DifferencesByNodeModuleValue {
|
||||
"rule"?: number;
|
||||
"sent"?: string;
|
||||
"sent-build"?: string;
|
||||
"unexplained"?: boolean;
|
||||
"v"?: number;
|
||||
"want"?: string;
|
||||
"want-removed"?: boolean;
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is one value of the state compositions under the key <group>.<heads>. */
|
||||
export interface CompositionsByGroupHeadsValue {
|
||||
"group": string;
|
||||
/** 12 lowercase hex digits */
|
||||
"heads": string;
|
||||
"machine"?: string;
|
||||
"machines"?: string[];
|
||||
"sdk"?: string;
|
||||
/** pass, fail or waits */
|
||||
"state": string;
|
||||
/** milliseconds */
|
||||
"took"?: number;
|
||||
"v"?: number;
|
||||
"warnings"?: string[];
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat node-build-go, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-node-build-go",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "node-build-go", defined whole (seats/node-build-go/seat.json): The Go build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.
|
||||
|
||||
import type * as buildStep from "./parts/build-step.js";
|
||||
|
||||
export const seat = "node-build-go";
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
export const accepts = {
|
||||
delivery: "delivery",
|
||||
check: "check",
|
||||
recheck: "recheck",
|
||||
} as const;
|
||||
|
||||
export const deliverySubject = "mesh.seat.node-build-go.accept.delivery";
|
||||
|
||||
export const checkSubject = "mesh.seat.node-build-go.accept.check";
|
||||
|
||||
export const recheckSubject = "mesh.seat.node-build-go.accept.recheck";
|
||||
|
||||
export const states = {
|
||||
steps: "steps",
|
||||
pauses: "pauses",
|
||||
toolchains: "toolchains",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state steps under the form "<node>.<id>". */
|
||||
export function stepsByNodeIDKey(node: string, id: string): string {
|
||||
return node + "." + id;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
|
||||
export function parseStepsByNodeIDKey(_key: string): { node: string; id: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const id = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, id };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "paused.<node>". */
|
||||
export function pausesByPausedNodeKey(node: string): string {
|
||||
return "paused." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByPausedNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("paused.")) return undefined;
|
||||
_rest = _rest.slice(7);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "capacity.<node>". */
|
||||
export function pausesByCapacityNodeKey(node: string): string {
|
||||
return "capacity." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByCapacityNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("capacity.")) return undefined;
|
||||
_rest = _rest.slice(9);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state toolchains under the form "<node>.<language>". */
|
||||
export function toolchainsByNodeLanguageKey(node: string, language: string): string {
|
||||
return node + "." + language;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
|
||||
export function parseToolchainsByNodeLanguageKey(_key: string): { node: string; language: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const language = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, language };
|
||||
}
|
||||
|
||||
export type AskArtifact = buildStep.AskArtifact;
|
||||
export type BuildAnswer = buildStep.BuildAnswer;
|
||||
export type BuiltArtifact = buildStep.BuiltArtifact;
|
||||
export type Capacity = buildStep.Capacity;
|
||||
export type CheckAnswer = buildStep.CheckAnswer;
|
||||
export type ComposeAnswer = buildStep.ComposeAnswer;
|
||||
export type CurrentAnswer = buildStep.CurrentAnswer;
|
||||
export type CurrentInput = buildStep.CurrentInput;
|
||||
export type Fetch = buildStep.Fetch;
|
||||
export type FetchAnswer = buildStep.FetchAnswer;
|
||||
export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type LevelAnswer = buildStep.LevelAnswer;
|
||||
export type LevelAnswerDigest = buildStep.LevelAnswerDigest;
|
||||
export type LevelAnswerDigestNeedsItem = buildStep.LevelAnswerDigestNeedsItem;
|
||||
export type LevelAnswerDigestPackagesItem = buildStep.LevelAnswerDigestPackagesItem;
|
||||
export type LevelAnswerKeptItem = buildStep.LevelAnswerKeptItem;
|
||||
export type LevelAnswerUnmetItem = buildStep.LevelAnswerUnmetItem;
|
||||
export type ModuleTree = buildStep.ModuleTree;
|
||||
export type Pause = buildStep.Pause;
|
||||
export type PauseAnswer = buildStep.PauseAnswer;
|
||||
export type PauseInput = buildStep.PauseInput;
|
||||
export type PlacedBeside = buildStep.PlacedBeside;
|
||||
export type Program = buildStep.Program;
|
||||
export type ResumeAnswer = buildStep.ResumeAnswer;
|
||||
export type ResumeInput = buildStep.ResumeInput;
|
||||
export type RunAnswer = buildStep.RunAnswer;
|
||||
export type RunHead = buildStep.RunHead;
|
||||
export type RunInput = buildStep.RunInput;
|
||||
export type RunJob = buildStep.RunJob;
|
||||
export type RunProgram = buildStep.RunProgram;
|
||||
export type Step = buildStep.Step;
|
||||
export type StepAsk = buildStep.StepAsk;
|
||||
export type StepAskBuild = buildStep.StepAskBuild;
|
||||
export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
export type TakenVersion = buildStep.TakenVersion;
|
||||
export type Toolchain = buildStep.Toolchain;
|
||||
export type ToolchainUsed = buildStep.ToolchainUsed;
|
||||
|
||||
/** is the body of delivery. */
|
||||
export type DeliveryAccept = StepAsk;
|
||||
|
||||
/** is the body of check. */
|
||||
export type CheckAccept = StepAsk;
|
||||
|
||||
/** is the body of recheck. */
|
||||
export type RecheckAccept = StepAsk;
|
||||
|
||||
/** is one value of the state steps under the key <node>.<id>. */
|
||||
export type StepsByNodeIDValue = Step;
|
||||
|
||||
/** is one value of the state pauses under the key paused.<node>. */
|
||||
export type PausesByPausedNodeValue = Pause;
|
||||
|
||||
/** is one value of the state pauses under the key capacity.<node>. */
|
||||
export type PausesByCapacityNodeValue = Capacity;
|
||||
|
||||
/** is one value of the state toolchains under the key <node>.<language>. */
|
||||
export type ToolchainsByNodeLanguageValue = Toolchain;
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The part "build-step" several seats include whole: What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
/** one artifact of a build ask: built from the fetched tree, or copied from an upstream pin */
|
||||
export interface AskArtifact {
|
||||
"artifact": string;
|
||||
"from"?: string;
|
||||
"seat"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
export interface BuildAnswer {
|
||||
"artifacts": BuiltArtifact[];
|
||||
"imports"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
/** one artifact a build made: its digest and the reference it was published under */
|
||||
export interface BuiltArtifact {
|
||||
"artifact": string;
|
||||
"digest": string;
|
||||
"reference"?: string;
|
||||
}
|
||||
|
||||
/** how many steps the node runs at once */
|
||||
export interface Capacity {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build-hours"?: string;
|
||||
"build-hours-fault"?: string;
|
||||
"by-cpu"?: number;
|
||||
"configured": number;
|
||||
"configured-from"?: string;
|
||||
"cores-per-step"?: number;
|
||||
"effective": number;
|
||||
"ineligible"?: string;
|
||||
"outside-hours"?: boolean;
|
||||
"quota-cores"?: number;
|
||||
"quota-from"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"why": string;
|
||||
}
|
||||
|
||||
export interface CheckAnswer {
|
||||
"fetch": FetchAnswer;
|
||||
"levels"?: LevelAnswer[];
|
||||
}
|
||||
|
||||
export interface ComposeAnswer {
|
||||
"built": boolean;
|
||||
"key"?: string;
|
||||
/** the compose-candidate verdict */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
export interface FetchBesideItem {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
export interface FetchPackage {
|
||||
"commit"?: string;
|
||||
"name"?: string;
|
||||
"ref"?: string;
|
||||
"repository"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool is asked: the repository and the full commit, the pull request's ref when only its head carries the commit, the trunk commit to merge onto for a merge preview, the module's directory and named paths, the mesh packages to build against, and the sibling repositories placed beside */
|
||||
export interface Fetch {
|
||||
/** the trunk commit a merge preview merges onto */
|
||||
"base"?: string;
|
||||
/** the sibling repositories placed beside the fetched tree */
|
||||
"beside"?: FetchBesideItem[];
|
||||
/** the full commit */
|
||||
"commit": string;
|
||||
/** the module's directory in the repository ("." for its root), with paths */
|
||||
"dir"?: string;
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
"package"?: FetchPackage;
|
||||
/** the version (a full commit) of each mesh package to build against, by its module path */
|
||||
"packages"?: Record<string, string>;
|
||||
/** the paths the module names, relative to dir */
|
||||
"paths"?: string[];
|
||||
/** the pull request's ref, when only its head carries the commit */
|
||||
"ref"?: string;
|
||||
/** <owner>/<name> */
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool answers, whole: the workspace it made, the commit in it, the module directories found; and, when the call gave a base, the merge preview (the trunk commit, the merge commit, the files that conflict, the paths the merge changes, the compiled programs among them, the tree of each module directory). A head that does not merge cleanly is an answer, not an error: merge is empty and conflicts names the files. The Go module adds the sibling repositories placed and the package versions taken; the TypeScript module the directories installed and refused and the group's package */
|
||||
export interface FetchAnswer {
|
||||
"base"?: string;
|
||||
"beside"?: PlacedBeside[];
|
||||
"changed"?: string[];
|
||||
"commit": string;
|
||||
"conflicts"?: string[];
|
||||
"group"?: string;
|
||||
"installed"?: string[];
|
||||
"merge"?: string;
|
||||
"modules": string[];
|
||||
"packages"?: TakenVersion[];
|
||||
"programs"?: Program[];
|
||||
"refused"?: FetchRefusal[];
|
||||
"trees"?: Record<string, ModuleTree>;
|
||||
"workspace": string;
|
||||
}
|
||||
|
||||
/** a TypeScript module whose packages the fetch did not install, with why */
|
||||
export interface FetchRefusal {
|
||||
"module": string;
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestNeedsItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestPackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigest {
|
||||
"beside"?: string[];
|
||||
"judged_by"?: string;
|
||||
"level"?: string;
|
||||
"needs"?: LevelAnswerDigestNeedsItem[];
|
||||
"packages"?: LevelAnswerDigestPackagesItem[];
|
||||
"without_tests"?: string[];
|
||||
}
|
||||
|
||||
export interface LevelAnswerKeptItem {
|
||||
"digest"?: string;
|
||||
"package"?: string;
|
||||
"tests"?: number;
|
||||
}
|
||||
|
||||
export interface LevelAnswerUnmetItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
/** one level of a check ask: the digest's answer, the kept verdicts taken, one test result per test step run, and the packages the node could not test */
|
||||
export interface LevelAnswer {
|
||||
"digest"?: LevelAnswerDigest;
|
||||
"judged"?: string;
|
||||
"kept"?: LevelAnswerKeptItem[];
|
||||
"level": string;
|
||||
"tests"?: unknown[];
|
||||
"unmet"?: LevelAnswerUnmetItem[];
|
||||
}
|
||||
|
||||
/** the tree of one module directory in a merge preview: its git tree, the digest of its manifest, the lock files' digests and the digests of the named paths */
|
||||
export interface ModuleTree {
|
||||
"locks"?: Record<string, string>;
|
||||
"manifest": string;
|
||||
/** no longer filled (ADR 0593 section 2); kept so a preview written before still reads */
|
||||
"packages"?: string[];
|
||||
"paths"?: Record<string, string>;
|
||||
"tree": string;
|
||||
}
|
||||
|
||||
/** whether the node takes no new ask */
|
||||
export interface Pause {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"by"?: string;
|
||||
"paused": boolean;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** a sibling repository placed as a plain directory under the workspace's beside directory */
|
||||
export interface PlacedBeside {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a changed file that is a compiled program (issue 1577): its path, its executable format, and the commit of the branch that added it when the merge's tree no longer holds it */
|
||||
export interface Program {
|
||||
"commit"?: string;
|
||||
/** ELF, Mach-O or PE */
|
||||
"kind": string;
|
||||
"path": string;
|
||||
}
|
||||
|
||||
/** what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error */
|
||||
export interface RunAnswer {
|
||||
"built": boolean;
|
||||
"exit": number;
|
||||
"key": string;
|
||||
/** raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
"said"?: string;
|
||||
}
|
||||
|
||||
/** one commit a run's program reads */
|
||||
export interface RunHead {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB */
|
||||
export interface RunInput {
|
||||
/** 64 lowercase hex digits */
|
||||
"digest": string;
|
||||
/** bytes */
|
||||
"size": number;
|
||||
"verb": string;
|
||||
}
|
||||
|
||||
/** a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for */
|
||||
export interface RunJob {
|
||||
/** the program's arguments, each a word or a flag */
|
||||
"args"?: string[];
|
||||
/** the commits the program reads, a repository at most once */
|
||||
"heads": RunHead[];
|
||||
"input": RunInput;
|
||||
"program": RunProgram;
|
||||
/** what the run is for, for a reader of the ask */
|
||||
"reader"?: string;
|
||||
}
|
||||
|
||||
/** where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path */
|
||||
export interface RunProgram {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"package": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** one step a build module runs on a node */
|
||||
export interface Step {
|
||||
/** when (RFC 3339 time) */
|
||||
"ended"?: string;
|
||||
"id": string;
|
||||
"node": string;
|
||||
"owner"?: string;
|
||||
"phase"?: string;
|
||||
/** when (RFC 3339 time) */
|
||||
"phase-at"?: string;
|
||||
"reason"?: string;
|
||||
"result"?: StepResult;
|
||||
/** when (RFC 3339 time) */
|
||||
"started": string;
|
||||
/** running, passed, failed or refused */
|
||||
"state": string;
|
||||
"tool": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"what"?: string;
|
||||
}
|
||||
|
||||
export interface StepAskBuild {
|
||||
"artifacts": AskArtifact[];
|
||||
"fetch"?: Fetch;
|
||||
"fp"?: string;
|
||||
"module": string;
|
||||
"path"?: string;
|
||||
"publish"?: boolean;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCheck {
|
||||
"fetch": Fetch;
|
||||
"kept"?: boolean;
|
||||
"levels": string[];
|
||||
/** the node names the check's tests run against */
|
||||
"node-names"?: string[];
|
||||
"packages"?: string[];
|
||||
"run"?: string;
|
||||
"runner"?: string;
|
||||
"runner_when"?: string;
|
||||
/** the toolchain the checker agreed for the language (ADR 0584 clause 2): a node on another declines the check */
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCompose {
|
||||
"dir": string;
|
||||
"fetch": Fetch;
|
||||
"package": string;
|
||||
"reader"?: string;
|
||||
/** the compose-candidate request */
|
||||
"request": unknown;
|
||||
}
|
||||
|
||||
/** one ask of a build module */
|
||||
export interface StepAsk {
|
||||
"asker": string;
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build"?: StepAskBuild;
|
||||
"check"?: StepAskCheck;
|
||||
"compose"?: StepAskCompose;
|
||||
"id": string;
|
||||
/** build, check or compose */
|
||||
"kind": string;
|
||||
/** go, typescript or image */
|
||||
"language": string;
|
||||
"needs"?: string[];
|
||||
/** package to the tagged version a build pins */
|
||||
"packages"?: Record<string, string>;
|
||||
/** a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose */
|
||||
"run"?: RunJob;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports and out-of-step modules; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five */
|
||||
export interface StepResult {
|
||||
"artifacts"?: BuiltArtifact[];
|
||||
"built"?: boolean;
|
||||
/** the holder declined the ask: its node lacks what the ask needs */
|
||||
"declined"?: boolean;
|
||||
/** a run's program's exit status */
|
||||
"exit"?: number;
|
||||
"fetch"?: FetchAnswer;
|
||||
"imports"?: string[];
|
||||
"key"?: string;
|
||||
/** what the holder's node lacks of it */
|
||||
"lacks"?: string[];
|
||||
"levels"?: LevelAnswer[];
|
||||
/** what the declined ask needs */
|
||||
"needs"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
/** a run's program's last line of standard output: raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
/** a run's program's first line of standard error, or why the step could not run it */
|
||||
"said"?: string;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
/** the compose-candidate verdict (the composer's own layout) */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
/** of a directory whose go.mod requires an asked mesh package, the version it is built against: the asked one, or go.mod's when it names a newer one, said */
|
||||
export interface TakenVersion {
|
||||
"asked": string;
|
||||
"built": string;
|
||||
"dir": string;
|
||||
"named": string;
|
||||
"package": string;
|
||||
"said"?: string;
|
||||
"sum"?: string;
|
||||
}
|
||||
|
||||
/** the toolchain a node reports */
|
||||
export interface Toolchain {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
/** go or typescript */
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** the toolchain a build was made with: the language, the installed version and the build module's recipe */
|
||||
export interface ToolchainUsed {
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** is what current takes. */
|
||||
export interface CurrentInput {
|
||||
}
|
||||
|
||||
/** is what current answers. */
|
||||
export type CurrentAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what pause takes. */
|
||||
export interface PauseInput {
|
||||
}
|
||||
|
||||
/** is what pause answers. */
|
||||
export type PauseAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what resume takes. */
|
||||
export interface ResumeInput {
|
||||
}
|
||||
|
||||
/** is what resume answers. */
|
||||
export type ResumeAnswer = Record<string, unknown>;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat node-build-image, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-node-build-image",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "node-build-image", defined whole (seats/node-build-image/seat.json): The image build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.
|
||||
|
||||
import type * as buildStep from "./parts/build-step.js";
|
||||
|
||||
export const seat = "node-build-image";
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
export const accepts = {
|
||||
delivery: "delivery",
|
||||
check: "check",
|
||||
recheck: "recheck",
|
||||
} as const;
|
||||
|
||||
export const deliverySubject = "mesh.seat.node-build-image.accept.delivery";
|
||||
|
||||
export const checkSubject = "mesh.seat.node-build-image.accept.check";
|
||||
|
||||
export const recheckSubject = "mesh.seat.node-build-image.accept.recheck";
|
||||
|
||||
export const states = {
|
||||
steps: "steps",
|
||||
pauses: "pauses",
|
||||
toolchains: "toolchains",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state steps under the form "<node>.<id>". */
|
||||
export function stepsByNodeIDKey(node: string, id: string): string {
|
||||
return node + "." + id;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
|
||||
export function parseStepsByNodeIDKey(_key: string): { node: string; id: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const id = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, id };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "paused.<node>". */
|
||||
export function pausesByPausedNodeKey(node: string): string {
|
||||
return "paused." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByPausedNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("paused.")) return undefined;
|
||||
_rest = _rest.slice(7);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "capacity.<node>". */
|
||||
export function pausesByCapacityNodeKey(node: string): string {
|
||||
return "capacity." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByCapacityNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("capacity.")) return undefined;
|
||||
_rest = _rest.slice(9);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state toolchains under the form "<node>.<language>". */
|
||||
export function toolchainsByNodeLanguageKey(node: string, language: string): string {
|
||||
return node + "." + language;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
|
||||
export function parseToolchainsByNodeLanguageKey(_key: string): { node: string; language: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const language = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, language };
|
||||
}
|
||||
|
||||
export type AskArtifact = buildStep.AskArtifact;
|
||||
export type BuildAnswer = buildStep.BuildAnswer;
|
||||
export type BuiltArtifact = buildStep.BuiltArtifact;
|
||||
export type Capacity = buildStep.Capacity;
|
||||
export type CheckAnswer = buildStep.CheckAnswer;
|
||||
export type ComposeAnswer = buildStep.ComposeAnswer;
|
||||
export type CurrentAnswer = buildStep.CurrentAnswer;
|
||||
export type CurrentInput = buildStep.CurrentInput;
|
||||
export type Fetch = buildStep.Fetch;
|
||||
export type FetchAnswer = buildStep.FetchAnswer;
|
||||
export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type LevelAnswer = buildStep.LevelAnswer;
|
||||
export type LevelAnswerDigest = buildStep.LevelAnswerDigest;
|
||||
export type LevelAnswerDigestNeedsItem = buildStep.LevelAnswerDigestNeedsItem;
|
||||
export type LevelAnswerDigestPackagesItem = buildStep.LevelAnswerDigestPackagesItem;
|
||||
export type LevelAnswerKeptItem = buildStep.LevelAnswerKeptItem;
|
||||
export type LevelAnswerUnmetItem = buildStep.LevelAnswerUnmetItem;
|
||||
export type ModuleTree = buildStep.ModuleTree;
|
||||
export type Pause = buildStep.Pause;
|
||||
export type PauseAnswer = buildStep.PauseAnswer;
|
||||
export type PauseInput = buildStep.PauseInput;
|
||||
export type PlacedBeside = buildStep.PlacedBeside;
|
||||
export type Program = buildStep.Program;
|
||||
export type ResumeAnswer = buildStep.ResumeAnswer;
|
||||
export type ResumeInput = buildStep.ResumeInput;
|
||||
export type RunAnswer = buildStep.RunAnswer;
|
||||
export type RunHead = buildStep.RunHead;
|
||||
export type RunInput = buildStep.RunInput;
|
||||
export type RunJob = buildStep.RunJob;
|
||||
export type RunProgram = buildStep.RunProgram;
|
||||
export type Step = buildStep.Step;
|
||||
export type StepAsk = buildStep.StepAsk;
|
||||
export type StepAskBuild = buildStep.StepAskBuild;
|
||||
export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
export type TakenVersion = buildStep.TakenVersion;
|
||||
export type Toolchain = buildStep.Toolchain;
|
||||
export type ToolchainUsed = buildStep.ToolchainUsed;
|
||||
|
||||
/** is the body of delivery. */
|
||||
export type DeliveryAccept = StepAsk;
|
||||
|
||||
/** is the body of check. */
|
||||
export type CheckAccept = StepAsk;
|
||||
|
||||
/** is the body of recheck. */
|
||||
export type RecheckAccept = StepAsk;
|
||||
|
||||
/** is one value of the state steps under the key <node>.<id>. */
|
||||
export type StepsByNodeIDValue = Step;
|
||||
|
||||
/** is one value of the state pauses under the key paused.<node>. */
|
||||
export type PausesByPausedNodeValue = Pause;
|
||||
|
||||
/** is one value of the state pauses under the key capacity.<node>. */
|
||||
export type PausesByCapacityNodeValue = Capacity;
|
||||
|
||||
/** is one value of the state toolchains under the key <node>.<language>. */
|
||||
export type ToolchainsByNodeLanguageValue = Toolchain;
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The part "build-step" several seats include whole: What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
/** one artifact of a build ask: built from the fetched tree, or copied from an upstream pin */
|
||||
export interface AskArtifact {
|
||||
"artifact": string;
|
||||
"from"?: string;
|
||||
"seat"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
export interface BuildAnswer {
|
||||
"artifacts": BuiltArtifact[];
|
||||
"imports"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
/** one artifact a build made: its digest and the reference it was published under */
|
||||
export interface BuiltArtifact {
|
||||
"artifact": string;
|
||||
"digest": string;
|
||||
"reference"?: string;
|
||||
}
|
||||
|
||||
/** how many steps the node runs at once */
|
||||
export interface Capacity {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build-hours"?: string;
|
||||
"build-hours-fault"?: string;
|
||||
"by-cpu"?: number;
|
||||
"configured": number;
|
||||
"configured-from"?: string;
|
||||
"cores-per-step"?: number;
|
||||
"effective": number;
|
||||
"ineligible"?: string;
|
||||
"outside-hours"?: boolean;
|
||||
"quota-cores"?: number;
|
||||
"quota-from"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"why": string;
|
||||
}
|
||||
|
||||
export interface CheckAnswer {
|
||||
"fetch": FetchAnswer;
|
||||
"levels"?: LevelAnswer[];
|
||||
}
|
||||
|
||||
export interface ComposeAnswer {
|
||||
"built": boolean;
|
||||
"key"?: string;
|
||||
/** the compose-candidate verdict */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
export interface FetchBesideItem {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
export interface FetchPackage {
|
||||
"commit"?: string;
|
||||
"name"?: string;
|
||||
"ref"?: string;
|
||||
"repository"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool is asked: the repository and the full commit, the pull request's ref when only its head carries the commit, the trunk commit to merge onto for a merge preview, the module's directory and named paths, the mesh packages to build against, and the sibling repositories placed beside */
|
||||
export interface Fetch {
|
||||
/** the trunk commit a merge preview merges onto */
|
||||
"base"?: string;
|
||||
/** the sibling repositories placed beside the fetched tree */
|
||||
"beside"?: FetchBesideItem[];
|
||||
/** the full commit */
|
||||
"commit": string;
|
||||
/** the module's directory in the repository ("." for its root), with paths */
|
||||
"dir"?: string;
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
"package"?: FetchPackage;
|
||||
/** the version (a full commit) of each mesh package to build against, by its module path */
|
||||
"packages"?: Record<string, string>;
|
||||
/** the paths the module names, relative to dir */
|
||||
"paths"?: string[];
|
||||
/** the pull request's ref, when only its head carries the commit */
|
||||
"ref"?: string;
|
||||
/** <owner>/<name> */
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool answers, whole: the workspace it made, the commit in it, the module directories found; and, when the call gave a base, the merge preview (the trunk commit, the merge commit, the files that conflict, the paths the merge changes, the compiled programs among them, the tree of each module directory). A head that does not merge cleanly is an answer, not an error: merge is empty and conflicts names the files. The Go module adds the sibling repositories placed and the package versions taken; the TypeScript module the directories installed and refused and the group's package */
|
||||
export interface FetchAnswer {
|
||||
"base"?: string;
|
||||
"beside"?: PlacedBeside[];
|
||||
"changed"?: string[];
|
||||
"commit": string;
|
||||
"conflicts"?: string[];
|
||||
"group"?: string;
|
||||
"installed"?: string[];
|
||||
"merge"?: string;
|
||||
"modules": string[];
|
||||
"packages"?: TakenVersion[];
|
||||
"programs"?: Program[];
|
||||
"refused"?: FetchRefusal[];
|
||||
"trees"?: Record<string, ModuleTree>;
|
||||
"workspace": string;
|
||||
}
|
||||
|
||||
/** a TypeScript module whose packages the fetch did not install, with why */
|
||||
export interface FetchRefusal {
|
||||
"module": string;
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestNeedsItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestPackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigest {
|
||||
"beside"?: string[];
|
||||
"judged_by"?: string;
|
||||
"level"?: string;
|
||||
"needs"?: LevelAnswerDigestNeedsItem[];
|
||||
"packages"?: LevelAnswerDigestPackagesItem[];
|
||||
"without_tests"?: string[];
|
||||
}
|
||||
|
||||
export interface LevelAnswerKeptItem {
|
||||
"digest"?: string;
|
||||
"package"?: string;
|
||||
"tests"?: number;
|
||||
}
|
||||
|
||||
export interface LevelAnswerUnmetItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
/** one level of a check ask: the digest's answer, the kept verdicts taken, one test result per test step run, and the packages the node could not test */
|
||||
export interface LevelAnswer {
|
||||
"digest"?: LevelAnswerDigest;
|
||||
"judged"?: string;
|
||||
"kept"?: LevelAnswerKeptItem[];
|
||||
"level": string;
|
||||
"tests"?: unknown[];
|
||||
"unmet"?: LevelAnswerUnmetItem[];
|
||||
}
|
||||
|
||||
/** the tree of one module directory in a merge preview: its git tree, the digest of its manifest, the lock files' digests and the digests of the named paths */
|
||||
export interface ModuleTree {
|
||||
"locks"?: Record<string, string>;
|
||||
"manifest": string;
|
||||
/** no longer filled (ADR 0593 section 2); kept so a preview written before still reads */
|
||||
"packages"?: string[];
|
||||
"paths"?: Record<string, string>;
|
||||
"tree": string;
|
||||
}
|
||||
|
||||
/** whether the node takes no new ask */
|
||||
export interface Pause {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"by"?: string;
|
||||
"paused": boolean;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** a sibling repository placed as a plain directory under the workspace's beside directory */
|
||||
export interface PlacedBeside {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a changed file that is a compiled program (issue 1577): its path, its executable format, and the commit of the branch that added it when the merge's tree no longer holds it */
|
||||
export interface Program {
|
||||
"commit"?: string;
|
||||
/** ELF, Mach-O or PE */
|
||||
"kind": string;
|
||||
"path": string;
|
||||
}
|
||||
|
||||
/** what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error */
|
||||
export interface RunAnswer {
|
||||
"built": boolean;
|
||||
"exit": number;
|
||||
"key": string;
|
||||
/** raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
"said"?: string;
|
||||
}
|
||||
|
||||
/** one commit a run's program reads */
|
||||
export interface RunHead {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB */
|
||||
export interface RunInput {
|
||||
/** 64 lowercase hex digits */
|
||||
"digest": string;
|
||||
/** bytes */
|
||||
"size": number;
|
||||
"verb": string;
|
||||
}
|
||||
|
||||
/** a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for */
|
||||
export interface RunJob {
|
||||
/** the program's arguments, each a word or a flag */
|
||||
"args"?: string[];
|
||||
/** the commits the program reads, a repository at most once */
|
||||
"heads": RunHead[];
|
||||
"input": RunInput;
|
||||
"program": RunProgram;
|
||||
/** what the run is for, for a reader of the ask */
|
||||
"reader"?: string;
|
||||
}
|
||||
|
||||
/** where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path */
|
||||
export interface RunProgram {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"package": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** one step a build module runs on a node */
|
||||
export interface Step {
|
||||
/** when (RFC 3339 time) */
|
||||
"ended"?: string;
|
||||
"id": string;
|
||||
"node": string;
|
||||
"owner"?: string;
|
||||
"phase"?: string;
|
||||
/** when (RFC 3339 time) */
|
||||
"phase-at"?: string;
|
||||
"reason"?: string;
|
||||
"result"?: StepResult;
|
||||
/** when (RFC 3339 time) */
|
||||
"started": string;
|
||||
/** running, passed, failed or refused */
|
||||
"state": string;
|
||||
"tool": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"what"?: string;
|
||||
}
|
||||
|
||||
export interface StepAskBuild {
|
||||
"artifacts": AskArtifact[];
|
||||
"fetch"?: Fetch;
|
||||
"fp"?: string;
|
||||
"module": string;
|
||||
"path"?: string;
|
||||
"publish"?: boolean;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCheck {
|
||||
"fetch": Fetch;
|
||||
"kept"?: boolean;
|
||||
"levels": string[];
|
||||
/** the node names the check's tests run against */
|
||||
"node-names"?: string[];
|
||||
"packages"?: string[];
|
||||
"run"?: string;
|
||||
"runner"?: string;
|
||||
"runner_when"?: string;
|
||||
/** the toolchain the checker agreed for the language (ADR 0584 clause 2): a node on another declines the check */
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCompose {
|
||||
"dir": string;
|
||||
"fetch": Fetch;
|
||||
"package": string;
|
||||
"reader"?: string;
|
||||
/** the compose-candidate request */
|
||||
"request": unknown;
|
||||
}
|
||||
|
||||
/** one ask of a build module */
|
||||
export interface StepAsk {
|
||||
"asker": string;
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build"?: StepAskBuild;
|
||||
"check"?: StepAskCheck;
|
||||
"compose"?: StepAskCompose;
|
||||
"id": string;
|
||||
/** build, check or compose */
|
||||
"kind": string;
|
||||
/** go, typescript or image */
|
||||
"language": string;
|
||||
"needs"?: string[];
|
||||
/** package to the tagged version a build pins */
|
||||
"packages"?: Record<string, string>;
|
||||
/** a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose */
|
||||
"run"?: RunJob;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports and out-of-step modules; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five */
|
||||
export interface StepResult {
|
||||
"artifacts"?: BuiltArtifact[];
|
||||
"built"?: boolean;
|
||||
/** the holder declined the ask: its node lacks what the ask needs */
|
||||
"declined"?: boolean;
|
||||
/** a run's program's exit status */
|
||||
"exit"?: number;
|
||||
"fetch"?: FetchAnswer;
|
||||
"imports"?: string[];
|
||||
"key"?: string;
|
||||
/** what the holder's node lacks of it */
|
||||
"lacks"?: string[];
|
||||
"levels"?: LevelAnswer[];
|
||||
/** what the declined ask needs */
|
||||
"needs"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
/** a run's program's last line of standard output: raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
/** a run's program's first line of standard error, or why the step could not run it */
|
||||
"said"?: string;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
/** the compose-candidate verdict (the composer's own layout) */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
/** of a directory whose go.mod requires an asked mesh package, the version it is built against: the asked one, or go.mod's when it names a newer one, said */
|
||||
export interface TakenVersion {
|
||||
"asked": string;
|
||||
"built": string;
|
||||
"dir": string;
|
||||
"named": string;
|
||||
"package": string;
|
||||
"said"?: string;
|
||||
"sum"?: string;
|
||||
}
|
||||
|
||||
/** the toolchain a node reports */
|
||||
export interface Toolchain {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
/** go or typescript */
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** the toolchain a build was made with: the language, the installed version and the build module's recipe */
|
||||
export interface ToolchainUsed {
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** is what current takes. */
|
||||
export interface CurrentInput {
|
||||
}
|
||||
|
||||
/** is what current answers. */
|
||||
export type CurrentAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what pause takes. */
|
||||
export interface PauseInput {
|
||||
}
|
||||
|
||||
/** is what pause answers. */
|
||||
export type PauseAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what resume takes. */
|
||||
export interface ResumeInput {
|
||||
}
|
||||
|
||||
/** is what resume answers. */
|
||||
export type ResumeAnswer = Record<string, unknown>;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat node-build-node, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-node-build-node",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "node-build-node", defined whole (seats/node-build-node/seat.json): The Node build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.
|
||||
|
||||
import type * as buildStep from "./parts/build-step.js";
|
||||
|
||||
export const seat = "node-build-node";
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
export const accepts = {
|
||||
delivery: "delivery",
|
||||
check: "check",
|
||||
recheck: "recheck",
|
||||
} as const;
|
||||
|
||||
export const deliverySubject = "mesh.seat.node-build-node.accept.delivery";
|
||||
|
||||
export const checkSubject = "mesh.seat.node-build-node.accept.check";
|
||||
|
||||
export const recheckSubject = "mesh.seat.node-build-node.accept.recheck";
|
||||
|
||||
export const states = {
|
||||
steps: "steps",
|
||||
pauses: "pauses",
|
||||
toolchains: "toolchains",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state steps under the form "<node>.<id>". */
|
||||
export function stepsByNodeIDKey(node: string, id: string): string {
|
||||
return node + "." + id;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
|
||||
export function parseStepsByNodeIDKey(_key: string): { node: string; id: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const id = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, id };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "paused.<node>". */
|
||||
export function pausesByPausedNodeKey(node: string): string {
|
||||
return "paused." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByPausedNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("paused.")) return undefined;
|
||||
_rest = _rest.slice(7);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pauses under the form "capacity.<node>". */
|
||||
export function pausesByCapacityNodeKey(node: string): string {
|
||||
return "capacity." + node;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
|
||||
export function parsePausesByCapacityNodeKey(_key: string): { node: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("capacity.")) return undefined;
|
||||
_rest = _rest.slice(9);
|
||||
if (_rest === "") return undefined;
|
||||
const node = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node };
|
||||
}
|
||||
|
||||
/** The key of one value of the state toolchains under the form "<node>.<language>". */
|
||||
export function toolchainsByNodeLanguageKey(node: string, language: string): string {
|
||||
return node + "." + language;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
|
||||
export function parseToolchainsByNodeLanguageKey(_key: string): { node: string; language: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const node = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const language = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { node, language };
|
||||
}
|
||||
|
||||
export type AskArtifact = buildStep.AskArtifact;
|
||||
export type BuildAnswer = buildStep.BuildAnswer;
|
||||
export type BuiltArtifact = buildStep.BuiltArtifact;
|
||||
export type Capacity = buildStep.Capacity;
|
||||
export type CheckAnswer = buildStep.CheckAnswer;
|
||||
export type ComposeAnswer = buildStep.ComposeAnswer;
|
||||
export type CurrentAnswer = buildStep.CurrentAnswer;
|
||||
export type CurrentInput = buildStep.CurrentInput;
|
||||
export type Fetch = buildStep.Fetch;
|
||||
export type FetchAnswer = buildStep.FetchAnswer;
|
||||
export type FetchBesideItem = buildStep.FetchBesideItem;
|
||||
export type FetchPackage = buildStep.FetchPackage;
|
||||
export type FetchRefusal = buildStep.FetchRefusal;
|
||||
export type LevelAnswer = buildStep.LevelAnswer;
|
||||
export type LevelAnswerDigest = buildStep.LevelAnswerDigest;
|
||||
export type LevelAnswerDigestNeedsItem = buildStep.LevelAnswerDigestNeedsItem;
|
||||
export type LevelAnswerDigestPackagesItem = buildStep.LevelAnswerDigestPackagesItem;
|
||||
export type LevelAnswerKeptItem = buildStep.LevelAnswerKeptItem;
|
||||
export type LevelAnswerUnmetItem = buildStep.LevelAnswerUnmetItem;
|
||||
export type ModuleTree = buildStep.ModuleTree;
|
||||
export type Pause = buildStep.Pause;
|
||||
export type PauseAnswer = buildStep.PauseAnswer;
|
||||
export type PauseInput = buildStep.PauseInput;
|
||||
export type PlacedBeside = buildStep.PlacedBeside;
|
||||
export type Program = buildStep.Program;
|
||||
export type ResumeAnswer = buildStep.ResumeAnswer;
|
||||
export type ResumeInput = buildStep.ResumeInput;
|
||||
export type RunAnswer = buildStep.RunAnswer;
|
||||
export type RunHead = buildStep.RunHead;
|
||||
export type RunInput = buildStep.RunInput;
|
||||
export type RunJob = buildStep.RunJob;
|
||||
export type RunProgram = buildStep.RunProgram;
|
||||
export type Step = buildStep.Step;
|
||||
export type StepAsk = buildStep.StepAsk;
|
||||
export type StepAskBuild = buildStep.StepAskBuild;
|
||||
export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
export type TakenVersion = buildStep.TakenVersion;
|
||||
export type Toolchain = buildStep.Toolchain;
|
||||
export type ToolchainUsed = buildStep.ToolchainUsed;
|
||||
|
||||
/** is the body of delivery. */
|
||||
export type DeliveryAccept = StepAsk;
|
||||
|
||||
/** is the body of check. */
|
||||
export type CheckAccept = StepAsk;
|
||||
|
||||
/** is the body of recheck. */
|
||||
export type RecheckAccept = StepAsk;
|
||||
|
||||
/** is one value of the state steps under the key <node>.<id>. */
|
||||
export type StepsByNodeIDValue = Step;
|
||||
|
||||
/** is one value of the state pauses under the key paused.<node>. */
|
||||
export type PausesByPausedNodeValue = Pause;
|
||||
|
||||
/** is one value of the state pauses under the key capacity.<node>. */
|
||||
export type PausesByCapacityNodeValue = Capacity;
|
||||
|
||||
/** is one value of the state toolchains under the key <node>.<language>. */
|
||||
export type ToolchainsByNodeLanguageValue = Toolchain;
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The part "build-step" several seats include whole: What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).
|
||||
|
||||
export const verbs = {
|
||||
current: "current",
|
||||
pause: "pause",
|
||||
resume: "resume",
|
||||
} as const;
|
||||
|
||||
/** one artifact of a build ask: built from the fetched tree, or copied from an upstream pin */
|
||||
export interface AskArtifact {
|
||||
"artifact": string;
|
||||
"from"?: string;
|
||||
"seat"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
export interface BuildAnswer {
|
||||
"artifacts": BuiltArtifact[];
|
||||
"imports"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
/** one artifact a build made: its digest and the reference it was published under */
|
||||
export interface BuiltArtifact {
|
||||
"artifact": string;
|
||||
"digest": string;
|
||||
"reference"?: string;
|
||||
}
|
||||
|
||||
/** how many steps the node runs at once */
|
||||
export interface Capacity {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build-hours"?: string;
|
||||
"build-hours-fault"?: string;
|
||||
"by-cpu"?: number;
|
||||
"configured": number;
|
||||
"configured-from"?: string;
|
||||
"cores-per-step"?: number;
|
||||
"effective": number;
|
||||
"ineligible"?: string;
|
||||
"outside-hours"?: boolean;
|
||||
"quota-cores"?: number;
|
||||
"quota-from"?: string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"why": string;
|
||||
}
|
||||
|
||||
export interface CheckAnswer {
|
||||
"fetch": FetchAnswer;
|
||||
"levels"?: LevelAnswer[];
|
||||
}
|
||||
|
||||
export interface ComposeAnswer {
|
||||
"built": boolean;
|
||||
"key"?: string;
|
||||
/** the compose-candidate verdict */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
export interface FetchBesideItem {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
export interface FetchPackage {
|
||||
"commit"?: string;
|
||||
"name"?: string;
|
||||
"ref"?: string;
|
||||
"repository"?: string;
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool is asked: the repository and the full commit, the pull request's ref when only its head carries the commit, the trunk commit to merge onto for a merge preview, the module's directory and named paths, the mesh packages to build against, and the sibling repositories placed beside */
|
||||
export interface Fetch {
|
||||
/** the trunk commit a merge preview merges onto */
|
||||
"base"?: string;
|
||||
/** the sibling repositories placed beside the fetched tree */
|
||||
"beside"?: FetchBesideItem[];
|
||||
/** the full commit */
|
||||
"commit": string;
|
||||
/** the module's directory in the repository ("." for its root), with paths */
|
||||
"dir"?: string;
|
||||
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
|
||||
"package"?: FetchPackage;
|
||||
/** the version (a full commit) of each mesh package to build against, by its module path */
|
||||
"packages"?: Record<string, string>;
|
||||
/** the paths the module names, relative to dir */
|
||||
"paths"?: string[];
|
||||
/** the pull request's ref, when only its head carries the commit */
|
||||
"ref"?: string;
|
||||
/** <owner>/<name> */
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** what a build module's fetch tool answers, whole: the workspace it made, the commit in it, the module directories found; and, when the call gave a base, the merge preview (the trunk commit, the merge commit, the files that conflict, the paths the merge changes, the compiled programs among them, the tree of each module directory). A head that does not merge cleanly is an answer, not an error: merge is empty and conflicts names the files. The Go module adds the sibling repositories placed and the package versions taken; the TypeScript module the directories installed and refused and the group's package */
|
||||
export interface FetchAnswer {
|
||||
"base"?: string;
|
||||
"beside"?: PlacedBeside[];
|
||||
"changed"?: string[];
|
||||
"commit": string;
|
||||
"conflicts"?: string[];
|
||||
"group"?: string;
|
||||
"installed"?: string[];
|
||||
"merge"?: string;
|
||||
"modules": string[];
|
||||
"packages"?: TakenVersion[];
|
||||
"programs"?: Program[];
|
||||
"refused"?: FetchRefusal[];
|
||||
"trees"?: Record<string, ModuleTree>;
|
||||
"workspace": string;
|
||||
}
|
||||
|
||||
/** a TypeScript module whose packages the fetch did not install, with why */
|
||||
export interface FetchRefusal {
|
||||
"module": string;
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestNeedsItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigestPackagesItem {
|
||||
"digest": string;
|
||||
"package": string;
|
||||
}
|
||||
|
||||
export interface LevelAnswerDigest {
|
||||
"beside"?: string[];
|
||||
"judged_by"?: string;
|
||||
"level"?: string;
|
||||
"needs"?: LevelAnswerDigestNeedsItem[];
|
||||
"packages"?: LevelAnswerDigestPackagesItem[];
|
||||
"without_tests"?: string[];
|
||||
}
|
||||
|
||||
export interface LevelAnswerKeptItem {
|
||||
"digest"?: string;
|
||||
"package"?: string;
|
||||
"tests"?: number;
|
||||
}
|
||||
|
||||
export interface LevelAnswerUnmetItem {
|
||||
"needs"?: string[];
|
||||
"package"?: string;
|
||||
}
|
||||
|
||||
/** one level of a check ask: the digest's answer, the kept verdicts taken, one test result per test step run, and the packages the node could not test */
|
||||
export interface LevelAnswer {
|
||||
"digest"?: LevelAnswerDigest;
|
||||
"judged"?: string;
|
||||
"kept"?: LevelAnswerKeptItem[];
|
||||
"level": string;
|
||||
"tests"?: unknown[];
|
||||
"unmet"?: LevelAnswerUnmetItem[];
|
||||
}
|
||||
|
||||
/** the tree of one module directory in a merge preview: its git tree, the digest of its manifest, the lock files' digests and the digests of the named paths */
|
||||
export interface ModuleTree {
|
||||
"locks"?: Record<string, string>;
|
||||
"manifest": string;
|
||||
/** no longer filled (ADR 0593 section 2); kept so a preview written before still reads */
|
||||
"packages"?: string[];
|
||||
"paths"?: Record<string, string>;
|
||||
"tree": string;
|
||||
}
|
||||
|
||||
/** whether the node takes no new ask */
|
||||
export interface Pause {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"by"?: string;
|
||||
"paused": boolean;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** a sibling repository placed as a plain directory under the workspace's beside directory */
|
||||
export interface PlacedBeside {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a changed file that is a compiled program (issue 1577): its path, its executable format, and the commit of the branch that added it when the merge's tree no longer holds it */
|
||||
export interface Program {
|
||||
"commit"?: string;
|
||||
/** ELF, Mach-O or PE */
|
||||
"kind": string;
|
||||
"path": string;
|
||||
}
|
||||
|
||||
/** what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error */
|
||||
export interface RunAnswer {
|
||||
"built": boolean;
|
||||
"exit": number;
|
||||
"key": string;
|
||||
/** raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
"said"?: string;
|
||||
}
|
||||
|
||||
/** one commit a run's program reads */
|
||||
export interface RunHead {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB */
|
||||
export interface RunInput {
|
||||
/** 64 lowercase hex digits */
|
||||
"digest": string;
|
||||
/** bytes */
|
||||
"size": number;
|
||||
"verb": string;
|
||||
}
|
||||
|
||||
/** a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for */
|
||||
export interface RunJob {
|
||||
/** the program's arguments, each a word or a flag */
|
||||
"args"?: string[];
|
||||
/** the commits the program reads, a repository at most once */
|
||||
"heads": RunHead[];
|
||||
"input": RunInput;
|
||||
"program": RunProgram;
|
||||
/** what the run is for, for a reader of the ask */
|
||||
"reader"?: string;
|
||||
}
|
||||
|
||||
/** where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path */
|
||||
export interface RunProgram {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"package": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** one step a build module runs on a node */
|
||||
export interface Step {
|
||||
/** when (RFC 3339 time) */
|
||||
"ended"?: string;
|
||||
"id": string;
|
||||
"node": string;
|
||||
"owner"?: string;
|
||||
"phase"?: string;
|
||||
/** when (RFC 3339 time) */
|
||||
"phase-at"?: string;
|
||||
"reason"?: string;
|
||||
"result"?: StepResult;
|
||||
/** when (RFC 3339 time) */
|
||||
"started": string;
|
||||
/** running, passed, failed or refused */
|
||||
"state": string;
|
||||
"tool": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"what"?: string;
|
||||
}
|
||||
|
||||
export interface StepAskBuild {
|
||||
"artifacts": AskArtifact[];
|
||||
"fetch"?: Fetch;
|
||||
"fp"?: string;
|
||||
"module": string;
|
||||
"path"?: string;
|
||||
"publish"?: boolean;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCheck {
|
||||
"fetch": Fetch;
|
||||
"kept"?: boolean;
|
||||
"levels": string[];
|
||||
/** the node names the check's tests run against */
|
||||
"node-names"?: string[];
|
||||
"packages"?: string[];
|
||||
"run"?: string;
|
||||
"runner"?: string;
|
||||
"runner_when"?: string;
|
||||
/** the toolchain the checker agreed for the language (ADR 0584 clause 2): a node on another declines the check */
|
||||
"toolchain"?: ToolchainUsed;
|
||||
}
|
||||
|
||||
export interface StepAskCompose {
|
||||
"dir": string;
|
||||
"fetch": Fetch;
|
||||
"package": string;
|
||||
"reader"?: string;
|
||||
/** the compose-candidate request */
|
||||
"request": unknown;
|
||||
}
|
||||
|
||||
/** one ask of a build module */
|
||||
export interface StepAsk {
|
||||
"asker": string;
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
"build"?: StepAskBuild;
|
||||
"check"?: StepAskCheck;
|
||||
"compose"?: StepAskCompose;
|
||||
"id": string;
|
||||
/** build, check or compose */
|
||||
"kind": string;
|
||||
/** go, typescript or image */
|
||||
"language": string;
|
||||
"needs"?: string[];
|
||||
/** package to the tagged version a build pins */
|
||||
"packages"?: Record<string, string>;
|
||||
/** a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose */
|
||||
"run"?: RunJob;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports and out-of-step modules; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five */
|
||||
export interface StepResult {
|
||||
"artifacts"?: BuiltArtifact[];
|
||||
"built"?: boolean;
|
||||
/** the holder declined the ask: its node lacks what the ask needs */
|
||||
"declined"?: boolean;
|
||||
/** a run's program's exit status */
|
||||
"exit"?: number;
|
||||
"fetch"?: FetchAnswer;
|
||||
"imports"?: string[];
|
||||
"key"?: string;
|
||||
/** what the holder's node lacks of it */
|
||||
"lacks"?: string[];
|
||||
"levels"?: LevelAnswer[];
|
||||
/** what the declined ask needs */
|
||||
"needs"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
/** a run's program's last line of standard output: raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
/** a run's program's first line of standard error, or why the step could not run it */
|
||||
"said"?: string;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
/** the compose-candidate verdict (the composer's own layout) */
|
||||
"verdict"?: unknown;
|
||||
}
|
||||
|
||||
/** of a directory whose go.mod requires an asked mesh package, the version it is built against: the asked one, or go.mod's when it names a newer one, said */
|
||||
export interface TakenVersion {
|
||||
"asked": string;
|
||||
"built": string;
|
||||
"dir": string;
|
||||
"named": string;
|
||||
"package": string;
|
||||
"said"?: string;
|
||||
"sum"?: string;
|
||||
}
|
||||
|
||||
/** the toolchain a node reports */
|
||||
export interface Toolchain {
|
||||
/** when (RFC 3339 time) */
|
||||
"at"?: string;
|
||||
/** go or typescript */
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** the toolchain a build was made with: the language, the installed version and the build module's recipe */
|
||||
export interface ToolchainUsed {
|
||||
"language": string;
|
||||
"recipe": string;
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** is what current takes. */
|
||||
export interface CurrentInput {
|
||||
}
|
||||
|
||||
/** is what current answers. */
|
||||
export type CurrentAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what pause takes. */
|
||||
export interface PauseInput {
|
||||
}
|
||||
|
||||
/** is what pause answers. */
|
||||
export type PauseAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what resume takes. */
|
||||
export interface ResumeInput {
|
||||
}
|
||||
|
||||
/** is what resume answers. */
|
||||
export type ResumeAnswer = Record<string, unknown>;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat npm-package-registry, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-npm-package-registry",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+18
-18
@@ -4,31 +4,31 @@
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export declare const seat: "npm-package-registry";
|
||||
export const seat = "npm-package-registry";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "npm-package-registry.events"; readonly maxAgeDays: 7 };
|
||||
export const family = { name: "npm-package-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export declare const publishedSubject: "mesh.seat.npm-package-registry.event.published";
|
||||
export const publishedSubject = "mesh.seat.npm-package-registry.event.published";
|
||||
|
||||
export declare const refusedSubject: "mesh.seat.npm-package-registry.event.refused";
|
||||
export const refusedSubject = "mesh.seat.npm-package-registry.event.refused";
|
||||
|
||||
export declare const removedSubject: "mesh.seat.npm-package-registry.event.removed";
|
||||
export const removedSubject = "mesh.seat.npm-package-registry.event.removed";
|
||||
|
||||
export declare const keptSubject: "mesh.seat.npm-package-registry.event.kept";
|
||||
export const keptSubject = "mesh.seat.npm-package-registry.event.kept";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type KeptEvent = registry.KeptEvent;
|
||||
+12
-12
@@ -2,19 +2,19 @@
|
||||
|
||||
// The part "registry" several seats include whole: The verbs and events every registry seat shares, written once so the four cannot drift (design 51, design 26). Who may call each verb is the holder's trusted config value listing its callers (ADR 0363's form), checked against the caller the tool runner proved.
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
/** one published thing, as every registry event and answer names it */
|
||||
export interface Artifact {
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
+3
-8
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"description": "The contract of the seat oci-artifact-registry, generated from its definition.",
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"parts"
|
||||
"src"
|
||||
],
|
||||
"name": "@novox/mesh-delivery-contracts-oci-artifact-registry",
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
+59
-33
@@ -4,57 +4,83 @@
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export declare const seat: "oci-artifact-registry";
|
||||
export const seat = "oci-artifact-registry";
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
readonly hold: "hold";
|
||||
readonly release: "release";
|
||||
readonly list: "list";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
hold: "hold",
|
||||
release: "release",
|
||||
list: "list",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
readonly held: "held";
|
||||
readonly released: "released";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
held: "held",
|
||||
released: "released",
|
||||
} as const;
|
||||
|
||||
export declare const family: { readonly name: "oci-artifact-registry.events"; readonly maxAgeDays: 7 };
|
||||
export const family = { name: "oci-artifact-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export declare const publishedSubject: "mesh.seat.oci-artifact-registry.event.published";
|
||||
export const publishedSubject = "mesh.seat.oci-artifact-registry.event.published";
|
||||
|
||||
export declare const refusedSubject: "mesh.seat.oci-artifact-registry.event.refused";
|
||||
export const refusedSubject = "mesh.seat.oci-artifact-registry.event.refused";
|
||||
|
||||
export declare const removedSubject: "mesh.seat.oci-artifact-registry.event.removed";
|
||||
export const removedSubject = "mesh.seat.oci-artifact-registry.event.removed";
|
||||
|
||||
export declare const keptSubject: "mesh.seat.oci-artifact-registry.event.kept";
|
||||
export const keptSubject = "mesh.seat.oci-artifact-registry.event.kept";
|
||||
|
||||
export declare const heldSubject: "mesh.seat.oci-artifact-registry.event.held";
|
||||
export const heldSubject = "mesh.seat.oci-artifact-registry.event.held";
|
||||
|
||||
export declare const releasedSubject: "mesh.seat.oci-artifact-registry.event.released";
|
||||
export const releasedSubject = "mesh.seat.oci-artifact-registry.event.released";
|
||||
|
||||
export declare const states: {
|
||||
readonly holds: "holds";
|
||||
readonly windows: "windows";
|
||||
};
|
||||
export const states = {
|
||||
holds: "holds",
|
||||
windows: "windows",
|
||||
} as const;
|
||||
|
||||
/** The key of one value of the state holds under the form "<seat>.<name>.<digest>". */
|
||||
export declare function holdsBySeatNameDigestKey(seat: string, name: string, digest: string): string;
|
||||
export function holdsBySeatNameDigestKey(seat: string, name: string, digest: string): string {
|
||||
return seat + "." + name + "." + digest;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<seat>.<name>.<digest>", or undefined for a key of another form. */
|
||||
export declare function parseHoldsBySeatNameDigestKey(_key: string): { seat: string; name: string; digest: string } | undefined;
|
||||
export function parseHoldsBySeatNameDigestKey(_key: string): { seat: string; name: string; digest: string } | undefined {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const seat = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const name = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const digest = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { seat, name, digest };
|
||||
}
|
||||
|
||||
/** The key of one value of the state windows under the form "<caller>". */
|
||||
export declare function windowsByCallerKey(caller: string): string;
|
||||
export function windowsByCallerKey(caller: string): string {
|
||||
return caller;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<caller>", or undefined for a key of another form. */
|
||||
export declare function parseWindowsByCallerKey(_key: string): { caller: string } | undefined;
|
||||
export function parseWindowsByCallerKey(_key: string): { caller: string } | undefined {
|
||||
let _rest = _key;
|
||||
if (_rest === "") return undefined;
|
||||
const caller = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { caller };
|
||||
}
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type KeptEvent = registry.KeptEvent;
|
||||
+12
-12
@@ -2,19 +2,19 @@
|
||||
|
||||
// The part "registry" several seats include whole: The verbs and events every registry seat shares, written once so the four cannot drift (design 51, design 26). Who may call each verb is the holder's trusted config value listing its callers (ADR 0363's form), checked against the caller the tool runner proved.
|
||||
|
||||
export declare const verbs: {
|
||||
readonly publish: "publish";
|
||||
readonly publishPart: "publish-part";
|
||||
readonly versions: "versions";
|
||||
readonly remove: "remove";
|
||||
};
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export declare const events: {
|
||||
readonly published: "published";
|
||||
readonly refused: "refused";
|
||||
readonly removed: "removed";
|
||||
readonly kept: "kept";
|
||||
};
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
kept: "kept",
|
||||
} as const;
|
||||
|
||||
/** one published thing, as every registry event and answer names it */
|
||||
export interface Artifact {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user