seatlisttest equals the contracts on the join heads (renamed seats mesh-node-enroller, mesh-module-assigner; domain; B2's delivery seats); the bootstrap is held equal to it by a test; the compiled-list golden is gone (B7c finding 2; ADR 0634 §9, ADR 0636 §7; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -45,8 +45,11 @@ func TestOwnManifestUsesNoWordTheRunningControllerRefuses(t *testing.T) {
|
||||
added = append(added, r)
|
||||
}
|
||||
}
|
||||
// The two seats the milestone renamed (ADR 0634 §9) are read by their new names; a node-engine built with the baseline
|
||||
// reads the old ones, and a manifest of the new names is the milestone's to deliver after the engines.
|
||||
renamed := []string{"seat:mesh-enrolment", "seat:mesh-placement"}
|
||||
for _, b := range baseline {
|
||||
if !slices.Contains(reads, b) {
|
||||
if !slices.Contains(reads, b) && !slices.Contains(renamed, b) {
|
||||
t.Errorf("the baseline's %s is no reader capability of this contract", b)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package catalogue
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"reflect"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -34,111 +30,4 @@ func TestUseSeatsReplacesTheSetButNeverEmptiesIt(t *testing.T) {
|
||||
if len(Seats()) != 1 {
|
||||
t.Fatalf("the working set is %d seats, not the one that was loaded", len(Seats()))
|
||||
}
|
||||
|
||||
// **The compiled set is the generated one, and the move changed nothing a reader sees** (design 26, SD-M3, SDK-8):
|
||||
// every seat the list mesh-sdk compiled before the move held (testdata, written from 5a38a12) is in the set
|
||||
// generated from mesh-contracts' definitions, entry for entry, its verbs' optional marks and a kind's code
|
||||
// included. A seat defined whole may add verbs, events and answers; the vault drops accept and move-asks (ADR 0620
|
||||
// §3); three registry seats are new.
|
||||
UseSeats(DefaultSeats())
|
||||
type golden struct {
|
||||
Seat
|
||||
Optional []string
|
||||
ShapeCode []string
|
||||
}
|
||||
raw, err := os.ReadFile("testdata/seats-before-move.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var compiled []golden
|
||||
if err := json.Unmarshal(raw, &compiled); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
whole := []string{"npm-package-registry", "mesh-broker", "mesh-config", "mesh-vault", "mesh-delivery-checker", "node-engine"}
|
||||
dropped := map[string]bool{"mesh-vault.accept": true, "mesh-vault.move-asks": true}
|
||||
// Verbs a seat at the seat list's grain gained in the milestone, each optional until its holders serve it.
|
||||
addedVerbs := map[string]bool{}
|
||||
// A verb whose input the whole definition corrected: compose-candidate's input is the boolean the engine and the
|
||||
// checker read, where the compiled list said a word (engine_compose_candidate_test.go reads it).
|
||||
retyped := map[string]bool{"node-engine.compose-candidate": true}
|
||||
// A seat whose provision retired delivers nothing since: the store's, artifact-store (ADR 0632 §2).
|
||||
retired := map[string]bool{"mesh-artifact-store": true}
|
||||
norm := func(v any) any {
|
||||
b, _ := json.Marshal(v)
|
||||
var out any
|
||||
_ = json.Unmarshal(b, &out)
|
||||
return out
|
||||
}
|
||||
var names []string
|
||||
for _, want := range compiled {
|
||||
names = append(names, want.Name)
|
||||
got, ok := SeatNamed(want.Name)
|
||||
if !ok {
|
||||
t.Errorf("%s left the generated set", want.Name)
|
||||
continue
|
||||
}
|
||||
if retired[want.Name] {
|
||||
want.Delivers = ""
|
||||
}
|
||||
g := golden{Seat: got}
|
||||
for _, v := range got.Serves {
|
||||
if v.Optional {
|
||||
g.Optional = append(g.Optional, v.Name)
|
||||
}
|
||||
}
|
||||
for _, r := range got.Receives {
|
||||
if r.Shape != nil && (r.Shape.Check != nil || r.Shape.Reads != nil) {
|
||||
g.ShapeCode = append(g.ShapeCode, r.Kind)
|
||||
}
|
||||
}
|
||||
g.Serves = slices.DeleteFunc(slices.Clone(g.Serves), func(v Verb) bool { return addedVerbs[want.Name+"."+v.Name] })
|
||||
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool { return addedVerbs[want.Name+"."+n] })
|
||||
if slices.Contains(whole, want.Name) {
|
||||
want := &want
|
||||
byName := map[string]Verb{}
|
||||
for _, v := range got.Serves {
|
||||
v.Output = nil
|
||||
byName[v.Name] = v
|
||||
}
|
||||
var kept []Verb
|
||||
for _, v := range want.Serves {
|
||||
if dropped[want.Name+"."+v.Name] {
|
||||
if _, still := byName[v.Name]; still {
|
||||
t.Errorf("%s still serves %s", want.Name, v.Name)
|
||||
}
|
||||
continue
|
||||
}
|
||||
kv := byName[v.Name]
|
||||
if retyped[want.Name+"."+v.Name] {
|
||||
kv.Input = v.Input
|
||||
}
|
||||
kept = append(kept, kv)
|
||||
}
|
||||
g.Serves, g.Emits, g.Accepts = kept, want.Emits, want.Accepts
|
||||
// A verb the whole seat added (new, optional while its holders catch up) is no verb of the compiled list.
|
||||
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool {
|
||||
return !slices.ContainsFunc(want.Serves, func(v Verb) bool { return v.Name == n })
|
||||
})
|
||||
if len(g.Optional) == 0 {
|
||||
g.Optional = nil
|
||||
}
|
||||
want.Optional = slices.DeleteFunc(want.Optional, func(n string) bool { return dropped[want.Name+"."+n] })
|
||||
want.Serves = slices.DeleteFunc(slices.Clone(want.Serves), func(v Verb) bool { return dropped[want.Name+"."+v.Name] })
|
||||
}
|
||||
if !reflect.DeepEqual(norm(g), norm(want)) {
|
||||
gb, _ := json.Marshal(g)
|
||||
wb, _ := json.Marshal(want)
|
||||
t.Errorf("%s is not as the compiled list held it:\n got %s\nwant %s", want.Name, gb, wb)
|
||||
}
|
||||
}
|
||||
var added []string
|
||||
for _, s := range DefaultSeats() {
|
||||
if !slices.Contains(names, s.Name) {
|
||||
added = append(added, s.Name)
|
||||
}
|
||||
}
|
||||
slices.Sort(added)
|
||||
if want := []string{"container-image-registry", "go-package-registry", "oci-artifact-registry"}; !slices.Equal(added, want) {
|
||||
t.Errorf("the generated set adds %v, want %v", added, want)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ func DefaultSeats() []Seat { return append([]Seat(nil), defaultSeats...) }
|
||||
const (
|
||||
CatalogSeat = "mesh-catalog"
|
||||
CheckerSeat = "mesh-delivery-checker"
|
||||
EnrolmentSeat = "mesh-enrolment"
|
||||
PlacementSeat = "mesh-placement"
|
||||
EnrolmentSeat = "mesh-node-enroller"
|
||||
PlacementSeat = "mesh-module-assigner"
|
||||
DeliverySeat = "mesh-delivery"
|
||||
WantsSeat = "mesh-wants"
|
||||
HandActsSeat = "mesh-hand-acts"
|
||||
|
||||
-4810
File diff suppressed because it is too large
Load Diff
@@ -51,12 +51,12 @@ func TestHoldingAMeshSeatRequiresServingItsVerbs(t *testing.T) {
|
||||
t.Errorf("a holder saying it serves mint: %v", err)
|
||||
}
|
||||
|
||||
// L3: the seat mesh-catalog promises four verbs, each optional while two claimants stand (ADR 0604 §1, §6).
|
||||
// L3: the seat mesh-catalog promises five verbs (the fifth is the seat list, ADR 0636 §4), each optional while two claimants stand (ADR 0604 §1, §6).
|
||||
catalog, ok := SeatNamed(CatalogSeat)
|
||||
if !ok || catalog.Scope != ScopeMesh || catalog.Decision != "novox/hq ADR 0604" || len(catalog.Serves) != 4 {
|
||||
if !ok || catalog.Scope != ScopeMesh || catalog.Decision != "novox/hq ADR 0604" || len(catalog.Serves) != 5 {
|
||||
t.Fatalf("mesh-catalog: in the set %v, %+v", ok, catalog)
|
||||
}
|
||||
four := []string{"modules", "module", "provides", "dependents"}
|
||||
four := []string{"modules", "module", "provides", "dependents", "seat-definitions"}
|
||||
for i, v := range catalog.Serves {
|
||||
if v.Name != four[i] || !v.Optional || v.Input == nil {
|
||||
t.Errorf("mesh-catalog's verb %d is %+v, want %s, optional, with its input", i, v, four[i])
|
||||
|
||||
@@ -16,7 +16,47 @@
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what modules answers, as its description says"
|
||||
"description": "every module the trunk holds, by name",
|
||||
"properties": {
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "the module's directory in its repository, '.' for a root"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the merge commit it was last changed at"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string",
|
||||
"description": "its fingerprint (src2: and 64 hex digits); absent when it has none"
|
||||
},
|
||||
"none": {
|
||||
"type": "string",
|
||||
"description": "why it has none"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"repository",
|
||||
"commit"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"modules"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -37,7 +77,48 @@
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what module answers, as its description says"
|
||||
"description": "the module whole",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "the module's directory in its repository, '.' for a root"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the merge commit it was last changed at"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string",
|
||||
"description": "its fingerprint (src2: and 64 hex digits); absent when it has none"
|
||||
},
|
||||
"none": {
|
||||
"type": "string",
|
||||
"description": "why it has none"
|
||||
},
|
||||
"manifest": {
|
||||
"type": "object",
|
||||
"description": "the module's manifest as the trunk holds it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"repository",
|
||||
"commit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -84,7 +165,7 @@
|
||||
},
|
||||
{
|
||||
"name": "seat-definitions",
|
||||
"description": "The seat list (ADR 0636 §4): with no seat, every trunk seat with its digest and the revision of the list; with a seat, that trunk definition resolved with the parts it includes. Reads only.",
|
||||
"description": "The seat list (ADR 0636 \u00a74): with no seat, every trunk seat with its digest and the revision of the list; with a seat, that trunk definition resolved with the parts it includes. Reads only.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
@@ -163,7 +244,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "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).",
|
||||
"description": "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 \u00a71, \u00a74).",
|
||||
"family": {
|
||||
"name": "mesh-catalog.events",
|
||||
"max-age-days": 7
|
||||
@@ -344,8 +425,9 @@
|
||||
"toolchains": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"description": "toolchain used"
|
||||
}
|
||||
"$ref": "#/defs/ToolchainUsed"
|
||||
},
|
||||
"description": "by language: the toolchain FP2 was computed with"
|
||||
},
|
||||
"paths": {
|
||||
"type": "object",
|
||||
@@ -543,7 +625,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -576,7 +659,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
},
|
||||
"list": {
|
||||
"description": "the foundation's predefined list as kept"
|
||||
@@ -670,7 +754,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -735,7 +820,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -830,7 +916,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -904,7 +991,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -921,7 +1009,8 @@
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -935,5 +1024,29 @@
|
||||
"description": "the published packages",
|
||||
"history": 5
|
||||
}
|
||||
]
|
||||
],
|
||||
"defs": {
|
||||
"ToolchainUsed": {
|
||||
"type": "object",
|
||||
"description": "a toolchain a fingerprint was computed with (ADR 0405 clause 7)",
|
||||
"properties": {
|
||||
"language": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "the installed toolchain's version"
|
||||
},
|
||||
"recipe": {
|
||||
"type": "string",
|
||||
"description": "the build module's recipe version"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"language",
|
||||
"version",
|
||||
"recipe"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -182,7 +182,56 @@
|
||||
"key": "<asker>.<id>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one ask the router holds and how it stands"
|
||||
"description": "one ask the router holds and how it stands, as the router's tool states it",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "<asker>.<id>"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "its headline"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "how it stands: open, chosen, expired, cancelled, replaced or refused"
|
||||
},
|
||||
"opened": {
|
||||
"type": "string",
|
||||
"description": "when it was opened, RFC 3339"
|
||||
},
|
||||
"expires": {
|
||||
"type": "string",
|
||||
"description": "when it ends unanswered, RFC 3339"
|
||||
},
|
||||
"offered_on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the channels it was offered on"
|
||||
},
|
||||
"asker_told": {
|
||||
"type": "boolean",
|
||||
"description": "its asker has been told how it ended"
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"description": "how it ended, in words"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"asker",
|
||||
"headline",
|
||||
"state",
|
||||
"opened",
|
||||
"expires"
|
||||
]
|
||||
},
|
||||
"description": "one ask the router holds and how it stands"
|
||||
}
|
||||
@@ -563,6 +612,250 @@
|
||||
"subject",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"Button": {
|
||||
"type": "object",
|
||||
"description": "one answer a channel offers: its label and the router's one-time ticket for it",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "the button's label"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the router's one-time ticket for it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"ticket"
|
||||
]
|
||||
},
|
||||
"Message": {
|
||||
"type": "object",
|
||||
"description": "the work a channel takes on the bench channel: shown with buttons (show), shown again in place (edit) or said (send); the words are the router's, shown as given",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the router's name for it, the same across a show and its edits"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "its title"
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "its body"
|
||||
},
|
||||
"buttons": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Button"
|
||||
},
|
||||
"description": "the answers it offers (none for a send)"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"description": "its secondary words after the body and the buttons: who asked and when, what each answer does, when it expires, the ask's details"
|
||||
},
|
||||
"urgent": {
|
||||
"type": "boolean",
|
||||
"description": "urgent"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description": "shown without notifying"
|
||||
},
|
||||
"reply": {
|
||||
"type": "string",
|
||||
"description": "the choice or link request this answers, by its id: the channel shows it where that was made"
|
||||
},
|
||||
"to": {
|
||||
"type": "string",
|
||||
"description": "the account linked as the operator on this kind, where the channel sends what is not a reply; empty when none is linked"
|
||||
},
|
||||
"secret": {
|
||||
"type": "boolean",
|
||||
"description": "the words carry something shown once (a link's code): the channel keeps no copy"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"Sender": {
|
||||
"type": "object",
|
||||
"description": "who a channel's service says sent something; the router alone judges whether that is the operator",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"description": "the account"
|
||||
},
|
||||
"display": {
|
||||
"type": "string",
|
||||
"description": "the name it shows"
|
||||
},
|
||||
"authenticated": {
|
||||
"type": "boolean",
|
||||
"description": "whether the service authenticated it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"identity",
|
||||
"authenticated"
|
||||
]
|
||||
},
|
||||
"Choice": {
|
||||
"type": "object",
|
||||
"description": "a button chosen on a channel, said on the bench intake as the event `choice`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival, unique, so the router acts on it once"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the ticket of the button"
|
||||
},
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"ticket",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"LinkAsked": {
|
||||
"type": "object",
|
||||
"description": "somebody on a channel asking to be linked as the operator, said on the bench intake as the event `link`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Failed": {
|
||||
"type": "object",
|
||||
"description": "a message a channel could not deliver, said on the bench intake as the event `failed`",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why"
|
||||
},
|
||||
"permanent": {
|
||||
"type": "boolean",
|
||||
"description": "trying again cannot help"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"why",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Standing": {
|
||||
"type": "object",
|
||||
"description": "what a channel says of itself at least every five minutes and whenever it changes, on the bench intake as the event `standing`",
|
||||
"properties": {
|
||||
"ready": {
|
||||
"type": "boolean",
|
||||
"description": "it can send now"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why not"
|
||||
},
|
||||
"edits-silently": {
|
||||
"type": "boolean",
|
||||
"description": "its edits notify nobody"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ready",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Code": {
|
||||
"type": "object",
|
||||
"description": "a code a person typed on a channel, asked as the proof `code` on the bench intake by request and reply: never in an event, never kept",
|
||||
"properties": {
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "the code"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string",
|
||||
"description": "what it is for"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sender",
|
||||
"code",
|
||||
"purpose"
|
||||
]
|
||||
},
|
||||
"ProofAnswer": {
|
||||
"type": "object",
|
||||
"description": "the router's answer to a proof",
|
||||
"properties": {
|
||||
"accepted": {
|
||||
"type": "boolean",
|
||||
"description": "whether it was taken"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "words to say to the person"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accepted",
|
||||
"words"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,14 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
"git.novox.be/novox/mesh-sdk/go/seatdef"
|
||||
"git.novox.be/novox/mesh-sdk/go/seatlist/seatlisttest"
|
||||
)
|
||||
|
||||
// fakeOwner is the seat mesh-catalog: its verb answers from its table and the events are delivered by the test.
|
||||
@@ -265,3 +267,22 @@ func TestStartReturnsAtOnceAndTheReaderSaysItIsReadingUntilTheSeatAnswers(t *tes
|
||||
t.Fatalf("after the read: %+v", st)
|
||||
}
|
||||
}
|
||||
|
||||
// The bootstrap and the tests' seat list are copies of the same contracts files: where a seat is in both, they are equal,
|
||||
// so a seat that changes is replaced in both (ADR 0636 §7).
|
||||
func TestTheBootstrapEqualsTheTestsSeatList(t *testing.T) {
|
||||
tests := map[string]seatdef.Definition{}
|
||||
for _, d := range seatlisttest.Definitions() {
|
||||
tests[d.Seat] = d
|
||||
}
|
||||
for _, b := range Bootstrapped() {
|
||||
got, ok := tests[b.Seat]
|
||||
if !ok {
|
||||
t.Errorf("%s is bootstrapped but not in seatlisttest", b.Seat)
|
||||
continue
|
||||
}
|
||||
if !reflect.DeepEqual(b, got) {
|
||||
t.Errorf("%s: bootstrap/%s.json differs from seatlisttest/seats/%s.json", b.Seat, b.Seat, b.Seat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,721 @@
|
||||
{
|
||||
"format": 1,
|
||||
"part": "build-step",
|
||||
"description": "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).",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "current",
|
||||
"description": "The asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the steps running, the capacity and whether paused"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pause",
|
||||
"description": "Take no new ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module. A capacity of 0 is the lasting way to keep a node from building.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "whether the node is paused"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resume",
|
||||
"description": "Take asks again on this node.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "whether the node is paused"
|
||||
}
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"StepAsk": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "build, check or compose"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"description": "go, typescript or image"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
},
|
||||
"build": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string"
|
||||
},
|
||||
"fetch": {
|
||||
"$ref": "#/defs/Fetch"
|
||||
},
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/AskArtifact"
|
||||
}
|
||||
},
|
||||
"publish": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"toolchain": {
|
||||
"$ref": "#/defs/ToolchainUsed"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"artifacts"
|
||||
]
|
||||
},
|
||||
"check": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fetch": {
|
||||
"$ref": "#/defs/Fetch"
|
||||
},
|
||||
"levels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "unit or integration"
|
||||
}
|
||||
},
|
||||
"kept": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"runner": {
|
||||
"type": "string"
|
||||
},
|
||||
"runner_when": {
|
||||
"type": "string"
|
||||
},
|
||||
"run": {
|
||||
"type": "string"
|
||||
},
|
||||
"packages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"fetch",
|
||||
"levels"
|
||||
]
|
||||
},
|
||||
"compose": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fetch": {
|
||||
"$ref": "#/defs/Fetch"
|
||||
},
|
||||
"dir": {
|
||||
"type": "string"
|
||||
},
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"request": {
|
||||
"description": "the compose-candidate request"
|
||||
},
|
||||
"reader": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"fetch",
|
||||
"dir",
|
||||
"package",
|
||||
"request"
|
||||
]
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"packages": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "package to the tagged version a build pins"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"language",
|
||||
"asker"
|
||||
],
|
||||
"description": "one ask of a build module"
|
||||
},
|
||||
"BuildAnswer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/BuiltArtifact"
|
||||
}
|
||||
},
|
||||
"toolchain": {
|
||||
"$ref": "#/defs/ToolchainUsed"
|
||||
},
|
||||
"imports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"out-of-step": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"artifacts"
|
||||
]
|
||||
},
|
||||
"CheckAnswer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fetch": {
|
||||
"$ref": "#/defs/Fetch"
|
||||
},
|
||||
"levels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/LevelAnswer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"ComposeAnswer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"built": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"description": "the compose-candidate verdict"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"built"
|
||||
]
|
||||
},
|
||||
"Step": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"tool": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "running, passed, failed or refused"
|
||||
},
|
||||
"started": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
},
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"result": {
|
||||
"$ref": "#/defs/StepResult"
|
||||
},
|
||||
"what": {
|
||||
"type": "string"
|
||||
},
|
||||
"phase": {
|
||||
"type": "string"
|
||||
},
|
||||
"phase-at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"tool",
|
||||
"node",
|
||||
"state",
|
||||
"started"
|
||||
],
|
||||
"description": "one step a build module runs on a node"
|
||||
},
|
||||
"Toolchain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"description": "go or typescript"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"recipe": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"language",
|
||||
"version",
|
||||
"recipe"
|
||||
],
|
||||
"description": "the toolchain a node reports"
|
||||
},
|
||||
"Pause": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"paused": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"paused"
|
||||
],
|
||||
"description": "whether the node takes no new ask"
|
||||
},
|
||||
"Capacity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"effective": {
|
||||
"type": "integer"
|
||||
},
|
||||
"configured": {
|
||||
"type": "integer"
|
||||
},
|
||||
"configured-from": {
|
||||
"type": "string"
|
||||
},
|
||||
"quota-cores": {
|
||||
"type": "number"
|
||||
},
|
||||
"quota-from": {
|
||||
"type": "string"
|
||||
},
|
||||
"cores-per-step": {
|
||||
"type": "number"
|
||||
},
|
||||
"by-cpu": {
|
||||
"type": "integer"
|
||||
},
|
||||
"build-hours": {
|
||||
"type": "string"
|
||||
},
|
||||
"outside-hours": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"build-hours-fault": {
|
||||
"type": "string"
|
||||
},
|
||||
"ineligible": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"effective",
|
||||
"configured",
|
||||
"why"
|
||||
],
|
||||
"description": "how many steps the node runs at once"
|
||||
},
|
||||
"Fetch": {
|
||||
"type": "object",
|
||||
"description": "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",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "<owner>/<name>"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the full commit"
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "the pull request's ref, when only its head carries the commit"
|
||||
},
|
||||
"base": {
|
||||
"type": "string",
|
||||
"description": "the trunk commit a merge preview merges onto"
|
||||
},
|
||||
"dir": {
|
||||
"type": "string",
|
||||
"description": "the module's directory in the repository (\".\" for its root), with paths"
|
||||
},
|
||||
"paths": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the paths the module names, relative to dir"
|
||||
},
|
||||
"packages": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the version (a full commit) of each mesh package to build against, by its module path"
|
||||
},
|
||||
"beside": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"commit"
|
||||
]
|
||||
},
|
||||
"description": "the sibling repositories placed beside the fetched tree"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"commit"
|
||||
]
|
||||
},
|
||||
"ToolchainUsed": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"language": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"recipe": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"language",
|
||||
"version",
|
||||
"recipe"
|
||||
],
|
||||
"description": "the toolchain a build was made with: the language, the installed version and the build module's recipe"
|
||||
},
|
||||
"AskArtifact": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"artifact": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"seat": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"artifact"
|
||||
],
|
||||
"description": "one artifact of a build ask: built from the fetched tree, or copied from an upstream pin"
|
||||
},
|
||||
"BuiltArtifact": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"artifact": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"artifact",
|
||||
"digest"
|
||||
],
|
||||
"description": "one artifact a build made: its digest and the reference it was published under"
|
||||
},
|
||||
"LevelAnswer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"level": {
|
||||
"type": "string"
|
||||
},
|
||||
"judged": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"level": {
|
||||
"type": "string"
|
||||
},
|
||||
"packages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"package",
|
||||
"digest"
|
||||
]
|
||||
}
|
||||
},
|
||||
"beside": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"without_tests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"judged_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"kept": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"tests": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "one test's result"
|
||||
}
|
||||
},
|
||||
"unmet": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"level"
|
||||
],
|
||||
"description": "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"
|
||||
},
|
||||
"StepResult": {
|
||||
"type": "object",
|
||||
"description": "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 declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the four",
|
||||
"properties": {
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/BuiltArtifact"
|
||||
}
|
||||
},
|
||||
"toolchain": {
|
||||
"$ref": "#/defs/ToolchainUsed"
|
||||
},
|
||||
"imports": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"out-of-step": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"fetch": {
|
||||
"$ref": "#/defs/Fetch"
|
||||
},
|
||||
"levels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/LevelAnswer"
|
||||
}
|
||||
},
|
||||
"built": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"description": "the compose-candidate verdict (the composer's own layout)"
|
||||
},
|
||||
"declined": {
|
||||
"type": "boolean",
|
||||
"description": "the holder declined the ask: its node lacks what the ask needs"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "what the declined ask needs"
|
||||
},
|
||||
"lacks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "what the holder's node lacks of it"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,5 +341,140 @@
|
||||
"held"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "holds",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "the bundles, archives and copied bases kept from retention's removal",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<seat>.<name>.<digest>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one hold: an untagged bundle, archive or copied base kept from retention's removal",
|
||||
"properties": {
|
||||
"seat": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"seat",
|
||||
"name",
|
||||
"kind",
|
||||
"digest",
|
||||
"by",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"description": "one hold"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "the direct-write windows, one per caller",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<caller>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the direct-write window of one caller: open while a node holds it open",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "the caller whose window it is"
|
||||
},
|
||||
"open": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"holding": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the nodes holding it open"
|
||||
},
|
||||
"since": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"description": "node to when it began to hold"
|
||||
},
|
||||
"closed": {
|
||||
"type": "string",
|
||||
"description": "when it last closed (RFC 3339 time)"
|
||||
},
|
||||
"last_holding": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dropped": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"description": "retired nodes dropped by hand"
|
||||
},
|
||||
"why": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "of each node holding the window, why it holds it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"description": "one caller's window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-conditions",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "What is wrong with the mesh now (ADR 0564): the open conditions raised from the observers' findings and cleared when a finding goes.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "conditions",
|
||||
@@ -41,6 +42,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the open conditions, or one whole, or the history"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -71,6 +76,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the condition now silenced"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -79,18 +88,560 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was raised and cleared again"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "condition-raised"
|
||||
"name": "condition-raised",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "condition-changed"
|
||||
"name": "condition-changed",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "condition-cleared"
|
||||
"name": "condition-cleared",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-conditions.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "conditions",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one open condition",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"raised": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"last-observed": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"first": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"reopened": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"what": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"silenced": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"epoch": {
|
||||
"type": "integer"
|
||||
},
|
||||
"looks-unread": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"kind",
|
||||
"subject",
|
||||
"severity",
|
||||
"raised",
|
||||
"last-observed"
|
||||
]
|
||||
},
|
||||
"description": "one open condition, without its looks it keeps from its finding"
|
||||
}
|
||||
],
|
||||
"description": "the open conditions the keeper holds, one key each"
|
||||
},
|
||||
{
|
||||
"name": "findings",
|
||||
"template": "state",
|
||||
"writer": "caller",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one thing an observer sees wrong now",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "layout version, 1"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "the key's last part when it is not the kind"
|
||||
},
|
||||
"observer": {
|
||||
"type": "string",
|
||||
"description": "the module that wrote it"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "what of its own saw it last"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"key",
|
||||
"kind",
|
||||
"subject",
|
||||
"severity",
|
||||
"summary",
|
||||
"source",
|
||||
"observer",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"description": "one finding of the observer that wrote it"
|
||||
}
|
||||
],
|
||||
"description": "every observer's findings, one key per finding; a key written raises or changes the condition of the same key, a key deleted clears it"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Subject": {
|
||||
"type": "object",
|
||||
"description": "what the condition is about",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"description": "machine, plan, call, build, merge, provider, seat, bus, core, probe, mesh, delivery or module"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "its id within the scope"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string",
|
||||
"description": "the machine it concerns, when there is one"
|
||||
},
|
||||
"also": {
|
||||
"type": "array",
|
||||
"description": "the other machines it concerns",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"Evidence": {
|
||||
"type": "object",
|
||||
"description": "one observation, as it was said",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"said": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"at",
|
||||
"said"
|
||||
]
|
||||
},
|
||||
"Action": {
|
||||
"type": "object",
|
||||
"description": "one answer the operator may give from a notification",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string",
|
||||
"description": "the seat verb the operator channel calls"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"acknowledge",
|
||||
"approve"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"ConditionEvent": {
|
||||
"type": "object",
|
||||
"description": "a condition and what changed",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"raised": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"last-observed": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"first": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"reopened": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"what": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"silenced": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"epoch": {
|
||||
"type": "integer"
|
||||
},
|
||||
"looks-unread": {
|
||||
"type": "string"
|
||||
},
|
||||
"event": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"raised",
|
||||
"reopened",
|
||||
"severity",
|
||||
"resolver",
|
||||
"silenced",
|
||||
"silence-ended",
|
||||
"cleared",
|
||||
"words"
|
||||
]
|
||||
},
|
||||
"was": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"show": {
|
||||
"type": "string",
|
||||
"description": "the tool call that shows it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"event",
|
||||
"at",
|
||||
"change"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,5 +219,54 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "resolved",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<module>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the value a module on a node takes for a config key, and where it came from",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"predefined": {
|
||||
"type": "string",
|
||||
"description": "the predefined key the value falls back to"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean",
|
||||
"description": "an unset value is the operator's own to set"
|
||||
},
|
||||
"trusted": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module",
|
||||
"key",
|
||||
"source"
|
||||
]
|
||||
},
|
||||
"description": "one resolved value"
|
||||
}
|
||||
],
|
||||
"description": "the value each module on each node takes for each config key, built from the sources alone"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -242,5 +242,395 @@
|
||||
"subject": "mesh.stream.<holder>.event.preview.written",
|
||||
"family": "checks"
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "verdicts",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<group>.<heads>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"heads": {
|
||||
"type": "string",
|
||||
"description": "12 hex digits"
|
||||
},
|
||||
"trunk": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "repository to the trunk head merged onto"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "running, pass or fail"
|
||||
},
|
||||
"failed": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"failures": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"levels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"run": {
|
||||
"type": "integer"
|
||||
},
|
||||
"kept": {
|
||||
"type": "integer"
|
||||
},
|
||||
"skipped": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"run",
|
||||
"kept"
|
||||
]
|
||||
},
|
||||
"description": "by level, unit or integration"
|
||||
},
|
||||
"took": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"queue": {
|
||||
"type": "integer"
|
||||
},
|
||||
"clone": {
|
||||
"type": "integer"
|
||||
},
|
||||
"unit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"lint": {
|
||||
"type": "integer"
|
||||
},
|
||||
"integration-setup": {
|
||||
"type": "integer"
|
||||
},
|
||||
"integration-run": {
|
||||
"type": "integer"
|
||||
},
|
||||
"composition": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"description": "milliseconds"
|
||||
},
|
||||
"machines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"sdk": {
|
||||
"type": "string"
|
||||
},
|
||||
"composition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "not-run, pass or fail"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"sdk": {
|
||||
"type": "string"
|
||||
},
|
||||
"machines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"fpset": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"over-bound": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"beside": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"carried-from": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"series": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"artifact": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"artifact",
|
||||
"from",
|
||||
"to"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"group",
|
||||
"heads",
|
||||
"state"
|
||||
],
|
||||
"description": "one check of a group at one set of heads"
|
||||
},
|
||||
"description": "one check of a group; the group is an escaped branch name, heads 12 hex digits"
|
||||
}
|
||||
],
|
||||
"description": "the checker's verdict of each group at each set of heads",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "kept",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<level>.<digest>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "pass: a failure is never kept"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"package": {
|
||||
"type": "string"
|
||||
},
|
||||
"level": {
|
||||
"type": "string"
|
||||
},
|
||||
"tests": {
|
||||
"type": "integer"
|
||||
},
|
||||
"took": {
|
||||
"type": "integer"
|
||||
},
|
||||
"toolchain": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"state",
|
||||
"repository",
|
||||
"package",
|
||||
"level"
|
||||
],
|
||||
"description": "one passing level of one package, kept so the next check does not run it again"
|
||||
},
|
||||
"description": "a passing level of one package by its content digest"
|
||||
}
|
||||
],
|
||||
"description": "the kept passing levels",
|
||||
"history": 1
|
||||
},
|
||||
{
|
||||
"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": "the status mesh/check the checker owes the forge for a head (its act is status=mesh/check)"
|
||||
}
|
||||
],
|
||||
"description": "the status the checker owes the forge",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "previews",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<repository>.<head>.<trunk>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"head": {
|
||||
"type": "string"
|
||||
},
|
||||
"trunk": {
|
||||
"type": "string"
|
||||
},
|
||||
"merge": {
|
||||
"type": "string",
|
||||
"description": "the merge commit"
|
||||
},
|
||||
"conflicts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "files in conflict"
|
||||
},
|
||||
"modules": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tree": {
|
||||
"type": "string"
|
||||
},
|
||||
"manifest": {
|
||||
"type": "string",
|
||||
"description": "manifest digest"
|
||||
},
|
||||
"locks": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"packages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"tree",
|
||||
"manifest"
|
||||
]
|
||||
},
|
||||
"description": "by directory"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"head",
|
||||
"trunk"
|
||||
],
|
||||
"description": "the merge of a head onto a trunk commit, read before a pull request is checked"
|
||||
},
|
||||
"description": "the merge of a head onto a trunk commit"
|
||||
}
|
||||
],
|
||||
"description": "the previews of a head merged onto a trunk",
|
||||
"history": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-delivery",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0239",
|
||||
"verbs": [
|
||||
@@ -33,6 +33,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what deliveries answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -42,6 +46,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what times answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -58,6 +66,10 @@
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what show answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -75,6 +87,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what groups answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -84,6 +100,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what what-if answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -109,6 +129,10 @@
|
||||
"repository"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what checks answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -117,6 +141,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what table answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -125,6 +153,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stalled answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -146,6 +178,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what recheck answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -155,6 +191,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what release answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -164,6 +204,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stop answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -185,6 +229,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what close answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -194,6 +242,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what retire-history answers, as its description says"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -221,7 +273,299 @@
|
||||
"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",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string"
|
||||
},
|
||||
"waits-since": {
|
||||
"type": "string",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-hand-acts",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0565",
|
||||
"decision": "novox/hq ADR 0565, ADR 0634, ADR 0635",
|
||||
"description": "Acts done by hand, recorded with who, why and cause (ADR 0565): the log every module records through.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "hand-act",
|
||||
@@ -37,6 +38,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the act recorded"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -66,6 +71,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the acts lately"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -87,12 +96,226 @@
|
||||
"ask"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the warrant recorded"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "act-recorded"
|
||||
"name": "act-recorded",
|
||||
"body": {
|
||||
"$ref": "#/defs/Act"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-hand-acts.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "acts",
|
||||
"template": "log",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<id>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one act done by hand",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "the caller the runtime proved"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "what the act was read to be from what it did"
|
||||
},
|
||||
"carried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"via": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"proofs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requested-by": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"log": {
|
||||
"type": "string",
|
||||
"description": "which log holds it, set when it is read"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"at",
|
||||
"by",
|
||||
"verb",
|
||||
"why",
|
||||
"cause"
|
||||
]
|
||||
},
|
||||
"description": "one act"
|
||||
}
|
||||
],
|
||||
"max-age-days": 400,
|
||||
"description": "every act, kept 400 days"
|
||||
},
|
||||
{
|
||||
"name": "warrants",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<asker>.<ask>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "what a module did on the operator's warrant, made once per ask",
|
||||
"properties": {
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string"
|
||||
},
|
||||
"option": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ask",
|
||||
"asker"
|
||||
]
|
||||
},
|
||||
"description": "one warrant"
|
||||
}
|
||||
],
|
||||
"description": "warrants recorded, one key per asker and ask"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Act": {
|
||||
"type": "object",
|
||||
"description": "one act done by hand",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "the caller the runtime proved"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "what the act was read to be from what it did"
|
||||
},
|
||||
"carried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"via": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"proofs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requested-by": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"log": {
|
||||
"type": "string",
|
||||
"description": "which log holds it, set when it is read"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"at",
|
||||
"by",
|
||||
"verb",
|
||||
"why",
|
||||
"cause"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-healers",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "The healers (ADR 0564): each a registered response to one kind of condition, within a budget and the mesh-wide brake.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "healers",
|
||||
@@ -17,6 +18,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the registered healers, acts lately and the brake"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -38,6 +43,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the act taken"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -63,12 +72,179 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the drill recorded"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "healer-acted"
|
||||
"name": "healer-acted",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "a healer's act",
|
||||
"properties": {
|
||||
"event": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"healer": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"act": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"acting",
|
||||
"acted",
|
||||
"failed",
|
||||
"escalated"
|
||||
]
|
||||
},
|
||||
"said": {
|
||||
"type": "string"
|
||||
},
|
||||
"budget": {
|
||||
"type": "string"
|
||||
},
|
||||
"show": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"event",
|
||||
"at",
|
||||
"healer",
|
||||
"condition",
|
||||
"outcome"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-healers.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "attempts",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<attempt>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one act of a healer, created before it is made and finished after, so a second instance cannot begin the same act",
|
||||
"properties": {
|
||||
"healer": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"budget-key": {
|
||||
"type": "string",
|
||||
"description": "what the budget counts by: the condition's key unless the healer says another"
|
||||
},
|
||||
"act": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"acting",
|
||||
"acted",
|
||||
"failed",
|
||||
"escalated"
|
||||
]
|
||||
},
|
||||
"said": {
|
||||
"type": "string"
|
||||
},
|
||||
"begun": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"finished": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"healer",
|
||||
"condition",
|
||||
"kind",
|
||||
"budget-key",
|
||||
"act",
|
||||
"outcome",
|
||||
"begun"
|
||||
]
|
||||
},
|
||||
"description": "one act, under the healers' own key"
|
||||
}
|
||||
],
|
||||
"description": "the acts begun, which the keeper reads to write a condition's tries"
|
||||
},
|
||||
{
|
||||
"name": "would",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<would>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "an act the healers would have taken while the controller's lease names a controller; it counts for no budget",
|
||||
"properties": {
|
||||
"healer": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"act": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"healer",
|
||||
"condition",
|
||||
"act",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"description": "one act not taken"
|
||||
}
|
||||
],
|
||||
"description": "the acts the healers would have taken"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,942 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-module-assigner",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Placement",
|
||||
"decision": "novox/hq ADR 0567, ADR 0634, ADR 0635",
|
||||
"description": "The seat that places modules on nodes (ADR 0567): the state of placement and the proposals that change it. Renamed from mesh-placement (ADR 0634 §9).",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "placement",
|
||||
"description": "Read placement: one node's key, the nodes one module is placed on, or every key, each with its revision, and how full the state is against its cap. With history, one node's or one module's changes in order: a revision the state keeps whole, an older one as the proposal's changes from its placement-changed event.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"history": {
|
||||
"description": "\"true\": the changes in order, from the stream and the state's revisions",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"description": "one module: the nodes it is placed on",
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"description": "one node",
|
||||
"type": "string"
|
||||
},
|
||||
"seats": {
|
||||
"description": "\"true\": who holds each seat, and on which node (the state seat-holders); with node, that node's",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "placement as read: nodes, keys with their revisions, history, seat holders, the state's fill"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "proposals",
|
||||
"description": "Every open proposal of placement: its changes, the revision of each key it was laid over, its candidates, every node's answer, the differences computed and answered, its verdict and its ask. Narrowed to one by id.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "one proposal's id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the open proposals"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "propose",
|
||||
"description": "Propose a change of placement, with why: laid over the current keys and refused at once, naming every finding, when the result cannot be placed (two modules on one host port, a provider not placed, a seat held once held twice, two nodes with one address, two hubs, a module the indexer does not hold, a node with no record). Otherwise the nodes it touches compose it in shadow and answer, and on a passing verdict the operator is asked to approve it. Who proposes is the caller, as the runtime proves it. An add-node from mesh-enrolment, whose warrant names its node and address, is written with no ask of its own: its Approve is the enrolment's (ADR 0587 §7).",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"changes": {
|
||||
"description": "the changes, each an object with `op`: place (node, module, ports, bindings), take-off (node, module), pin (node, provision, provider {node, module}), unpin (node, provision), hold (node, module, claim, scope, kind, site), unhold (node, module, claim), decide (node, field, value: a decided field of the node, its address among them), config (node, module, mesh-wide, layer, mesh-wide-values, values), add-node (node, decided, keys: a joining node, mesh-enrolment's alone, the proposal's one change, with the enrolment's warrant, its tunnel key alone at the operator's yes; ADR 0587 §7), remove-node (node: a joining node never confirmed, taken off when its enrolment ends; mesh-enrolment's alone, on the same warrant)",
|
||||
"items": {
|
||||
"required": [
|
||||
"op",
|
||||
"node"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
},
|
||||
"warrant": {
|
||||
"description": "for an add-node alone: the enrolment's warrant {node, address, ask, warrant}, naming the change's node and address",
|
||||
"required": [
|
||||
"node",
|
||||
"address",
|
||||
"ask",
|
||||
"warrant"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, shown to the operator with the proposal",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"why",
|
||||
"changes"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the proposal's id and its verdict, or every finding refused at once"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "withdraw",
|
||||
"description": "Withdraw an open proposal: its key and its candidates are deleted and placement-withdrawn carries it whole. With why.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the proposal's id",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, kept in the event",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the proposal withdrawn"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "again",
|
||||
"description": "Judge an open proposal now with the answers that stand, and raise its ask again when its verdict passes and the operator's channel does not hold the ask. Nothing more: the recovery of a proposal whose judgement or ask was lost.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the proposal's id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was judged or asked again"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "placement-proposed",
|
||||
"body": {
|
||||
"$ref": "#/defs/PlacementEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "placement-withdrawn",
|
||||
"body": {
|
||||
"$ref": "#/defs/PlacementEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "placement-judged",
|
||||
"body": {
|
||||
"$ref": "#/defs/PlacementEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "placement-changed",
|
||||
"body": {
|
||||
"$ref": "#/defs/PlacementEvent"
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-module-assigner.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "placement",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.node",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a node's key: what a person decided of it, its pins and holdings, and the modules placed on it; the commit of a write",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"decided": {
|
||||
"$ref": "#/defs/NodeDecided"
|
||||
},
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the digest of the module key's value it stands for"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"digest"
|
||||
]
|
||||
},
|
||||
"description": "the modules placed, in the order the composition reads them"
|
||||
},
|
||||
"pins": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/Provider"
|
||||
}
|
||||
},
|
||||
"holds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Holding"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"decided",
|
||||
"modules"
|
||||
]
|
||||
},
|
||||
"description": "a node's key"
|
||||
},
|
||||
{
|
||||
"key": "<node>.<module>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a module's key: the module as placed",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"placed": {
|
||||
"$ref": "#/defs/PlacedModule"
|
||||
},
|
||||
"previous": {
|
||||
"$ref": "#/defs/PlacedModule",
|
||||
"description": "the value it replaces while a write is under way"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"placed"
|
||||
]
|
||||
},
|
||||
"description": "one module on a node; no module is named node"
|
||||
}
|
||||
],
|
||||
"history": 64,
|
||||
"description": "placements, one key per node and one per module placed on it, written only on the operator's Approve of a proposal by compare-and-set at the revision it was laid over"
|
||||
},
|
||||
{
|
||||
"name": "proposals",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<proposal>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Proposal"
|
||||
},
|
||||
"description": "an open proposal, by its id"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "open proposals; a key leaves when the proposal is applied, withdrawn, declined or expired"
|
||||
},
|
||||
{
|
||||
"name": "candidates",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<proposal>.<node>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one node's candidate in one proposal",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"proposal": {
|
||||
"type": "string"
|
||||
},
|
||||
"reached": {
|
||||
"type": "boolean",
|
||||
"description": "the proposal changes this node's composition through another's key"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/defs/Placement",
|
||||
"description": "the node's placement with the proposal laid over it; absent when the proposal takes its key away"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"proposal"
|
||||
]
|
||||
},
|
||||
"description": "a node's candidate"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "the candidates a proposal needs answers on; a node watches its own"
|
||||
},
|
||||
{
|
||||
"name": "pulses",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "answer.<proposal>.<node>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the bound on one node's answer",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "the bound on a node's answer"
|
||||
},
|
||||
{
|
||||
"key": "ask.<proposal>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the bound on a raised ask",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "the bound on a proposal's raised ask"
|
||||
}
|
||||
],
|
||||
"description": "bounds, each a key that lives for the bound; the server's delete marker when one ends is the event that fails a silent node or an unanswered ask"
|
||||
},
|
||||
{
|
||||
"name": "seat-holders",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<seat>",
|
||||
"value": {
|
||||
"$ref": "#/defs/SeatHolders"
|
||||
},
|
||||
"description": "a seat held once for the mesh"
|
||||
},
|
||||
{
|
||||
"key": "<seat>.<node>",
|
||||
"value": {
|
||||
"$ref": "#/defs/SeatHolders"
|
||||
},
|
||||
"description": "a node seat on one node"
|
||||
}
|
||||
],
|
||||
"description": "who holds which seat on which node, composed from every node's placement"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Provider": {
|
||||
"type": "object",
|
||||
"description": "the module on a node that answers a requirement or holds a seat",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module"
|
||||
]
|
||||
},
|
||||
"PlacedModule": {
|
||||
"type": "object",
|
||||
"description": "one module placed on a node",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"ports": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": "the host port each declared port is published on, by the port the software listens on"
|
||||
},
|
||||
"bindings": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/Provider"
|
||||
},
|
||||
"description": "by provision, the provider each requirement that keeps data is bound to"
|
||||
},
|
||||
"mesh-wide": {
|
||||
"type": "object",
|
||||
"description": "the whole mesh's settings layer of the module's placement"
|
||||
},
|
||||
"has-mesh-wide": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"layer": {
|
||||
"type": "object",
|
||||
"description": "this node's settings layer of the module's placement"
|
||||
},
|
||||
"has-layer": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"mesh-wide-values": {
|
||||
"type": "object",
|
||||
"description": "config values a person set in the whole mesh's layer, for a module in the settings form"
|
||||
},
|
||||
"values": {
|
||||
"type": "object",
|
||||
"description": "config values a person set in this node's layer, for a module in the settings form"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module"
|
||||
]
|
||||
},
|
||||
"Holding": {
|
||||
"type": "object",
|
||||
"description": "one seat a module placed on the node holds",
|
||||
"properties": {
|
||||
"claim": {
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"site": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"claim",
|
||||
"module"
|
||||
]
|
||||
},
|
||||
"NodeDecided": {
|
||||
"type": "object",
|
||||
"description": "what a person decides of a node; no secret and no key material",
|
||||
"properties": {
|
||||
"endpoint": {
|
||||
"type": "string"
|
||||
},
|
||||
"site": {
|
||||
"type": "string"
|
||||
},
|
||||
"hub": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"public-domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"account": {
|
||||
"type": "string"
|
||||
},
|
||||
"account-home": {
|
||||
"type": "string"
|
||||
},
|
||||
"agent-account": {
|
||||
"type": "string"
|
||||
},
|
||||
"agent-account-home": {
|
||||
"type": "string"
|
||||
},
|
||||
"adopted": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"taken": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"tunnel": {
|
||||
"type": "object",
|
||||
"description": "the tunnel found on the node when it was adopted"
|
||||
},
|
||||
"peer-names": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "on the hub, the name a person gave a peer of that tunnel, by its public key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Placement": {
|
||||
"type": "object",
|
||||
"description": "one node's placement assembled",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"decided": {
|
||||
"$ref": "#/defs/NodeDecided"
|
||||
},
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/PlacedModule"
|
||||
}
|
||||
},
|
||||
"pins": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/Provider"
|
||||
},
|
||||
"description": "by provision, the provider chosen for the node"
|
||||
},
|
||||
"holds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Holding"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"decided",
|
||||
"modules"
|
||||
]
|
||||
},
|
||||
"ProposalChange": {
|
||||
"type": "object",
|
||||
"description": "one change of a proposal",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"description": "place, take-off, pin, unpin, hold, unhold, decide, config, seed, add-node or remove-node"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"ports": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"bindings": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/Provider"
|
||||
}
|
||||
},
|
||||
"provision": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"$ref": "#/defs/Provider"
|
||||
},
|
||||
"claim": {
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"site": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "a decided field's value"
|
||||
},
|
||||
"mesh-wide": {
|
||||
"type": "object"
|
||||
},
|
||||
"layer": {
|
||||
"type": "object"
|
||||
},
|
||||
"mesh-wide-values": {
|
||||
"type": "object"
|
||||
},
|
||||
"values": {
|
||||
"type": "object"
|
||||
},
|
||||
"whole": {
|
||||
"$ref": "#/defs/Placement",
|
||||
"description": "the node's whole placement, for a seed"
|
||||
},
|
||||
"decided": {
|
||||
"$ref": "#/defs/NodeDecided"
|
||||
},
|
||||
"keys": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"overlay": {
|
||||
"type": "string"
|
||||
},
|
||||
"sealing": {
|
||||
"type": "string"
|
||||
},
|
||||
"serving": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"identity",
|
||||
"sealing"
|
||||
],
|
||||
"description": "the public halves of a joining node's keys"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"Warrant": {
|
||||
"type": "object",
|
||||
"description": "the enrolment's warrant an add-node carries",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"warrant": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"address",
|
||||
"ask",
|
||||
"warrant"
|
||||
]
|
||||
},
|
||||
"Verdict": {
|
||||
"type": "object",
|
||||
"description": "the holder's judgement of a proposal's answers",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "waits, pass or fail"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"fails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"silent": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"intended": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"unintended": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"carried": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"answers": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object"
|
||||
},
|
||||
"description": "every node's answer to its candidate, by node"
|
||||
},
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"state",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Proposal": {
|
||||
"type": "object",
|
||||
"description": "an open proposal",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"written": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"changes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/ProposalChange"
|
||||
}
|
||||
},
|
||||
"seed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"export-digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"base": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": "by node whose key it changes, the revision of the key it was laid over (0: none)"
|
||||
},
|
||||
"must": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"hand-back": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "answering, failed or asked"
|
||||
},
|
||||
"verdict": {
|
||||
"$ref": "#/defs/Verdict"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"again": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"warrant": {
|
||||
"$ref": "#/defs/Warrant"
|
||||
},
|
||||
"withdrawn": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"by",
|
||||
"why",
|
||||
"at",
|
||||
"changes",
|
||||
"base",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"PlacementEvent": {
|
||||
"type": "object",
|
||||
"description": "what each placement event carries",
|
||||
"properties": {
|
||||
"proposal": {
|
||||
"$ref": "#/defs/Proposal"
|
||||
},
|
||||
"nodes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"description": "for placement-changed, by node the revisions before and after and the modules added, removed or changed"
|
||||
},
|
||||
"warrant": {
|
||||
"type": "object",
|
||||
"description": "who approved it, through which channel, when",
|
||||
"properties": {
|
||||
"warrant": {
|
||||
"type": "string"
|
||||
},
|
||||
"words": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"warrant",
|
||||
"words",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"description": "for placement-withdrawn, why it ended"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"proposal"
|
||||
]
|
||||
},
|
||||
"SeatHolders": {
|
||||
"type": "object",
|
||||
"description": "one key of seat-holders",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"seat": {
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"outside": {
|
||||
"type": "boolean",
|
||||
"description": "the claim names no seat of the seat list"
|
||||
},
|
||||
"holders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"seat",
|
||||
"scope",
|
||||
"holders"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
-10
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-enrolment",
|
||||
"seat": "mesh-node-enroller",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Identity and access",
|
||||
"decision": "novox/hq ADR 0587",
|
||||
"decision": "novox/hq ADR 0587, ADR 0634, ADR 0635",
|
||||
"description": "The seat that enrols a new machine on the operator's Approve and a one-time token (ADR 0587). Renamed from mesh-enrolment (ADR 0634 §9).",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "issue",
|
||||
@@ -34,11 +35,15 @@
|
||||
"overlay_key"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the enrolment's stage, address and ask, or every finding refused at once"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "redeem",
|
||||
"description": "Spend a token: asked by a joining node-engine dialled as enrol.\u003cnode\u003e alone, with the public halves of its keys and its identity key's proof over them. Spends the token, asks the vault for the node's account and certificate, writes the node into placement, and answers the account sealed to the node, its certificate and the vault's public half, signed by the vault. Asked again with the same keys it finishes what is not done and answers the same; with other keys it is refused.",
|
||||
"description": "Spend a token: asked by a joining node-engine dialled as enrol.<node> alone, with the public halves of its keys and its identity key's proof over them. Spends the token, asks the vault for the node's account and certificate, writes the node into placement, and answers the account sealed to the node, its certificate and the vault's public half, signed by the vault. Asked again with the same keys it finishes what is not done and answers the same; with other keys it is refused.",
|
||||
"input": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -82,6 +87,43 @@
|
||||
"proof"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the account sealed to the node, its certificate and the vault's public half, signed by the vault",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string",
|
||||
"description": "the node"
|
||||
},
|
||||
"login": {
|
||||
"type": "string",
|
||||
"description": "the login it dials as next"
|
||||
},
|
||||
"account": {
|
||||
"type": "string",
|
||||
"description": "its account sealed to the sealing key it presented, base64"
|
||||
},
|
||||
"certificate": {
|
||||
"type": "string",
|
||||
"description": "its certificate, PEM"
|
||||
},
|
||||
"signer": {
|
||||
"type": "string",
|
||||
"description": "the vault's public signing half, base64"
|
||||
},
|
||||
"signature": {
|
||||
"type": "string",
|
||||
"description": "the vault's signature over the answer without it, under the context of the enrolment kind, base64"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"login",
|
||||
"account",
|
||||
"certificate",
|
||||
"signer"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -90,6 +132,10 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the enrolment ended"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -111,6 +157,10 @@
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the enrolment ended"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -132,6 +182,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "every open enrolment, or one"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -148,24 +202,139 @@
|
||||
"node"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the ask raised again"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "enrolment-issued"
|
||||
"name": "enrolment-issued",
|
||||
"body": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "node-enrolled"
|
||||
"name": "node-enrolled",
|
||||
"body": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enrolment-refused"
|
||||
"name": "enrolment-refused",
|
||||
"body": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enrolment-revoked"
|
||||
"name": "enrolment-revoked",
|
||||
"body": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enrolment-expired"
|
||||
"name": "enrolment-expired",
|
||||
"body": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-node-enroller.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "enrolments",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "node.<node>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Enrolment"
|
||||
},
|
||||
"description": "a node's enrolment, living until the token expires while live"
|
||||
},
|
||||
{
|
||||
"key": "address.<address>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the private-network address reserved at issue",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"issued": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"description": "an address reserved for a node"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "open enrolments and the addresses reserved for them"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Enrolment": {
|
||||
"type": "object",
|
||||
"description": "one open enrolment",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"caller": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"stage": {
|
||||
"type": "string",
|
||||
"description": "asked, live or redeeming"
|
||||
},
|
||||
"issued": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"expires": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"keys-digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"overlay-key": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"address",
|
||||
"stage"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-placement",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"domain": "Placement",
|
||||
"decision": "novox/hq ADR 0567",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "placement",
|
||||
"description": "Read placement: one node's key, the nodes one module is placed on, or every key, each with its revision, and how full the state is against its cap. With history, one node's or one module's changes in order: a revision the state keeps whole, an older one as the proposal's changes from its placement-changed event.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"history": {
|
||||
"description": "\"true\": the changes in order, from the stream and the state's revisions",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"description": "one module: the nodes it is placed on",
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"description": "one node",
|
||||
"type": "string"
|
||||
},
|
||||
"seats": {
|
||||
"description": "\"true\": who holds each seat, and on which node (the state seat-holders); with node, that node's",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "proposals",
|
||||
"description": "Every open proposal of placement: its changes, the revision of each key it was laid over, its candidates, every node's answer, the differences computed and answered, its verdict and its ask. Narrowed to one by id.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "one proposal's id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "propose",
|
||||
"description": "Propose a change of placement, with why: laid over the current keys and refused at once, naming every finding, when the result cannot be placed (two modules on one host port, a provider not placed, a seat held once held twice, two nodes with one address, two hubs, a module the indexer does not hold, a node with no record). Otherwise the nodes it touches compose it in shadow and answer, and on a passing verdict the operator is asked to approve it. Who proposes is the caller, as the runtime proves it. An add-node from mesh-enrolment, whose warrant names its node and address, is written with no ask of its own: its Approve is the enrolment's (ADR 0587 §7).",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"changes": {
|
||||
"description": "the changes, each an object with `op`: place (node, module, ports, bindings), take-off (node, module), pin (node, provision, provider {node, module}), unpin (node, provision), hold (node, module, claim, scope, kind, site), unhold (node, module, claim), decide (node, field, value: a decided field of the node, its address among them), config (node, module, mesh-wide, layer, mesh-wide-values, values), add-node (node, decided, keys: a joining node, mesh-enrolment's alone, the proposal's one change, with the enrolment's warrant, its tunnel key alone at the operator's yes; ADR 0587 §7), remove-node (node: a joining node never confirmed, taken off when its enrolment ends; mesh-enrolment's alone, on the same warrant)",
|
||||
"items": {
|
||||
"required": [
|
||||
"op",
|
||||
"node"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
},
|
||||
"warrant": {
|
||||
"description": "for an add-node alone: the enrolment's warrant {node, address, ask, warrant}, naming the change's node and address",
|
||||
"required": [
|
||||
"node",
|
||||
"address",
|
||||
"ask",
|
||||
"warrant"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, shown to the operator with the proposal",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"why",
|
||||
"changes"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "withdraw",
|
||||
"description": "Withdraw an open proposal: its key and its candidates are deleted and placement-withdrawn carries it whole. With why.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the proposal's id",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, kept in the event",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "again",
|
||||
"description": "Judge an open proposal now with the answers that stand, and raise its ask again when its verdict passes and the operator's channel does not hold the ask. Nothing more: the recovery of a proposal whose judgement or ask was lost.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "the proposal's id",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-provisioner",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Provisioning",
|
||||
"decision": "novox/hq ADR 0349",
|
||||
"decision": "novox/hq ADR 0349, ADR 0634, ADR 0635",
|
||||
"description": "The provisioner (ADR 0349): which domain answers which kind of placeholder, what each module needs, what is applied where.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "provisioning",
|
||||
@@ -30,7 +31,389 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the registry, the needs, what is applied, or the collections' items"
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "plans",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<module>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "what a module needs on a node",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"plan": {
|
||||
"type": "object",
|
||||
"description": "the module's plan"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module",
|
||||
"plan"
|
||||
]
|
||||
},
|
||||
"description": "one module's plan on one node"
|
||||
}
|
||||
],
|
||||
"description": "the needs recorded for each module on each node"
|
||||
},
|
||||
{
|
||||
"name": "provisions",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<consumer>.<provision>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one provision between a consumer and a provider",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"provision": {
|
||||
"type": "string"
|
||||
},
|
||||
"local": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends-on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"asked",
|
||||
"provided",
|
||||
"waits",
|
||||
"failed",
|
||||
"retiring"
|
||||
]
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"generation": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"warrant": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"option": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
"type": "object",
|
||||
"description": "the plan's provision: the entry the key was composed from, at the consumer's wanted build or its newest (issue 1126)",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"provision": {
|
||||
"type": "string"
|
||||
},
|
||||
"local": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider-module": {
|
||||
"type": "string"
|
||||
},
|
||||
"credential-form": {
|
||||
"enum": [
|
||||
"pair",
|
||||
"shared",
|
||||
"issued",
|
||||
"given",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"credential-tool": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"contributes": {
|
||||
"type": "object"
|
||||
},
|
||||
"at": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"as": {
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"contributed": {
|
||||
"type": "object",
|
||||
"description": "the provider's own contract's bytes, carried unread"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provision",
|
||||
"provider",
|
||||
"provider-module"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provision",
|
||||
"consumer",
|
||||
"provider",
|
||||
"state",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"description": "a provision with no local name"
|
||||
},
|
||||
{
|
||||
"key": "<node>.<consumer>.<provision>.<local>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one provision between a consumer and a provider",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"provision": {
|
||||
"type": "string"
|
||||
},
|
||||
"local": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends-on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"asked",
|
||||
"provided",
|
||||
"waits",
|
||||
"failed",
|
||||
"retiring"
|
||||
]
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"generation": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"warrant": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"option": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
"type": "object",
|
||||
"description": "the plan's provision: the entry the key was composed from, at the consumer's wanted build or its newest (issue 1126)",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"provision": {
|
||||
"type": "string"
|
||||
},
|
||||
"local": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider-module": {
|
||||
"type": "string"
|
||||
},
|
||||
"credential-form": {
|
||||
"enum": [
|
||||
"pair",
|
||||
"shared",
|
||||
"issued",
|
||||
"given",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"credential-tool": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"contributes": {
|
||||
"type": "object"
|
||||
},
|
||||
"at": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"as": {
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"contributed": {
|
||||
"type": "object",
|
||||
"description": "the provider's own contract's bytes, carried unread"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provision",
|
||||
"provider",
|
||||
"provider-module"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provision",
|
||||
"consumer",
|
||||
"provider",
|
||||
"state",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"description": "a provision of a local name"
|
||||
}
|
||||
],
|
||||
"description": "every provision between a consumer and a provider, and how it stands"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-self-check",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "The mesh checking itself (ADR 0564): probes run every five minutes, each failure a finding the seat's conditions raise.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "doctor",
|
||||
@@ -25,6 +26,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the last run's verdict, or one probe's, or a run now"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -33,12 +38,128 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the registry of probes"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "checked"
|
||||
"name": "checked",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "one run of the self-check",
|
||||
"properties": {
|
||||
"run": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"started": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"took": {
|
||||
"type": "string"
|
||||
},
|
||||
"interval-seconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"counts": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"passed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"failed-to-run": {
|
||||
"type": "integer"
|
||||
},
|
||||
"deferred": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"probes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/ProbeVerdict"
|
||||
}
|
||||
},
|
||||
"controller": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"unsaid": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"run",
|
||||
"at",
|
||||
"probes"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-self-check.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"defs": {
|
||||
"ProbeVerdict": {
|
||||
"type": "object",
|
||||
"description": "one probe's verdict",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"verdict": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"passed",
|
||||
"failed",
|
||||
"failed-to-run",
|
||||
"deferred"
|
||||
]
|
||||
},
|
||||
"found": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"unconfirmed": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"took": {
|
||||
"type": "string"
|
||||
},
|
||||
"found-count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"more": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"verdict"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Identity and access",
|
||||
"decision": "novox/hq ADR 0161",
|
||||
"decision": "novox/hq ADR 0161, ADR 0634, ADR 0635",
|
||||
"delivers": "secret",
|
||||
"verbs": [
|
||||
{
|
||||
@@ -300,7 +300,7 @@
|
||||
},
|
||||
{
|
||||
"name": "sign",
|
||||
"description": "Sign with the vault's key or authority (novox/hq ADR 0550 §2): kind node-certificate signs the certificate of a machine's internal name, asked by that machine's node-engine for the serving key its record states, built from bus state alone, or by mesh-enrolment for a node it enrols, for the serving key the node presented at redeem (ADR 0587 §3); kind enrolment signs a redeem answer under its own context, for mesh-enrolment alone. Answers the certificate or the signature and the signer's fingerprint, and says signed; never a key.",
|
||||
"description": "Sign with the vault's key or authority (novox/hq ADR 0550 §2): kind node-certificate signs the certificate of a machine's internal name, asked by that machine's node-engine for the serving key its record states, built from bus state alone, or by mesh-node-enroller for a node it enrols, for the serving key the node presented at redeem (ADR 0587 §3); kind enrolment signs a redeem answer under its own context, for mesh-node-enroller alone. Answers the certificate or the signature and the signer's fingerprint, and says signed; never a key.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
@@ -309,7 +309,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"description": "the machine, for a node certificate: the caller's own, or the node mesh-enrolment enrols",
|
||||
"description": "the machine, for a node certificate: the caller's own, or the node mesh-node-enroller enrols",
|
||||
"type": "string"
|
||||
},
|
||||
"reply": {
|
||||
@@ -317,7 +317,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"serving_key": {
|
||||
"description": "from mesh-enrolment: the serving key's public half the enrolling node presented",
|
||||
"description": "from mesh-node-enroller: the serving key's public half the enrolling node presented",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@@ -368,7 +368,7 @@
|
||||
},
|
||||
{
|
||||
"name": "enrolment-token",
|
||||
"description": "Make a one-time token for a node mesh-enrolment issues on the operator's warrant: its secret kept with its copy sealed to the operator key and its hash written as the bus user enrol.<node>. Answers only what the joining machine must trust (the bus's address, the bus certificate's fingerprint, the vault's public signing key), never the token; with sealed, the token sealed to the operator key, for tokens to relay; with drop, the token and its hash dropped, at the enrolment's end. Asked by mesh-enrolment alone, only from the lease write. The token carries the first tunnel mesh-enrolment built at issue (ADR 0587 §3, insight of 2026-11-02).",
|
||||
"description": "Make a one-time token for a node mesh-node-enroller issues on the operator's warrant: its secret kept with its copy sealed to the operator key and its hash written as the bus user enrol.<node>. Answers only what the joining machine must trust (the bus's address, the bus certificate's fingerprint, the vault's public signing key), never the token; with sealed, the token sealed to the operator key, for tokens to relay; with drop, the token and its hash dropped, at the enrolment's end. Asked by mesh-node-enroller alone, only from the lease write. The token carries the first tunnel mesh-node-enroller built at issue (ADR 0587 §3, insight of 2026-11-02).",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
@@ -398,7 +398,7 @@
|
||||
},
|
||||
"tunnel": {
|
||||
"additionalProperties": false,
|
||||
"description": "the node's first tunnel, built by mesh-enrolment at issue and carried in the token: the hub's public key, the hub's endpoint, the node's tunnel address, its own tunnel key and the network's range",
|
||||
"description": "the node's first tunnel, built by mesh-node-enroller at issue and carried in the token: the hub's public key, the hub's endpoint, the node's tunnel address, its own tunnel key and the network's range",
|
||||
"properties": {
|
||||
"address": {
|
||||
"description": "the joining node's tunnel address",
|
||||
@@ -472,7 +472,7 @@
|
||||
},
|
||||
{
|
||||
"name": "node-account",
|
||||
"description": "Mint a joining node's bus account node.<node>, sealed to the sealing key it presented, and write its hash; asked again for the same node and keys, answers the account it already minted; with retire, the account it minted for a revoked enrolment retired. Writes the node's node-logins key naming node.<node>. Asked by mesh-enrolment alone. Never the value in the clear.",
|
||||
"description": "Mint a joining node's bus account node.<node>, sealed to the sealing key it presented, and write its hash; asked again for the same node and keys, answers the account it already minted; with retire, the account it minted for a revoked enrolment retired. Writes the node's node-logins key naming node.<node>. Asked by mesh-node-enroller alone. Never the value in the clear.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
@@ -758,5 +758,128 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "signers",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "key",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the vault's signing key's public half",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the signing key's public half, standard base64"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"made": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"fingerprint",
|
||||
"made"
|
||||
]
|
||||
},
|
||||
"description": "the signing key's public half"
|
||||
},
|
||||
{
|
||||
"key": "authority",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the vault's authority certificate",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"certificate": {
|
||||
"type": "string",
|
||||
"description": "the authority certificate, PEM"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"made": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"certificate",
|
||||
"fingerprint",
|
||||
"made"
|
||||
]
|
||||
},
|
||||
"description": "the authority certificate"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "the vault's public signing halves; written by the vault alone"
|
||||
},
|
||||
{
|
||||
"name": "node-logins",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a node's two logins and the rotation's stage",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"login": {
|
||||
"type": "string",
|
||||
"description": "the login in use"
|
||||
},
|
||||
"rotating": {
|
||||
"type": "string",
|
||||
"description": "the login rotating to, empty when none"
|
||||
},
|
||||
"stage": {
|
||||
"type": "string",
|
||||
"description": "begun, ready or confirmed; empty when no rotation"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"list-revision": {
|
||||
"type": "integer",
|
||||
"description": "the user list's revision that held both logins, from ready on"
|
||||
},
|
||||
"acts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"login",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"description": "a node"
|
||||
}
|
||||
],
|
||||
"history": 5,
|
||||
"description": "which login a node uses and the stage of its rotation; the key lives while the node does"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-wants",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Placement",
|
||||
"decision": "novox/hq ADR 0565",
|
||||
"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",
|
||||
@@ -33,6 +34,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "each module's policy, or the one chosen, or the comparison"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -41,12 +46,235 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what a bus upgrade would do, read only"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "policy-changed"
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"format": 1,
|
||||
"seat": "mesh-watchdogs",
|
||||
"scope": "mesh",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "The watchman's seat (ADR 0564, ADR 0433): signals that expire unless renewed, what stopped moving, who is present, the dead letters.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "signals",
|
||||
@@ -17,6 +18,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the watchdog table"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -30,6 +35,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stopped moving"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -43,6 +52,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "who is connected and who is silent"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -55,7 +68,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"consumer": {
|
||||
"description": "a consumer's name, or \u003cstream\u003e.\u003cconsumer\u003e: only what that one gave up on",
|
||||
"description": "a consumer's name, or <stream>.<consumer>: only what that one gave up on",
|
||||
"type": "string"
|
||||
},
|
||||
"deliver": {
|
||||
@@ -80,6 +93,10 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the dead letters, one whole, or the act done"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -88,7 +105,139 @@
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was rebuilt"
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "presence",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "whether a node is online",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"online": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"online"
|
||||
]
|
||||
},
|
||||
"description": "a node"
|
||||
},
|
||||
{
|
||||
"key": "part.<part>.<instance>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "whether a part's instance is online",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"online": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"online"
|
||||
]
|
||||
},
|
||||
"description": "a part's instance"
|
||||
}
|
||||
],
|
||||
"history": 20,
|
||||
"description": "who is connected; the entry's own time says since when"
|
||||
},
|
||||
{
|
||||
"name": "pulse",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<bucket>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a watched key mirrored, its revision, and who owes the next move",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owes": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bucket",
|
||||
"key",
|
||||
"revision"
|
||||
]
|
||||
},
|
||||
"description": "the move watched at a key of a state"
|
||||
}
|
||||
],
|
||||
"description": "one key per watched move, living for the move's bound minus its age"
|
||||
},
|
||||
{
|
||||
"name": "stuck",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<bucket>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "what stopped moving",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"waited": {
|
||||
"type": "string",
|
||||
"description": "what it waited for, in words"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"moved": {
|
||||
"type": "boolean",
|
||||
"description": "it has moved again"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bucket",
|
||||
"key",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"description": "a key whose pulse expired"
|
||||
}
|
||||
],
|
||||
"description": "what stopped moving; no key is removed, one that moves again is written as moved"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,46 +2,87 @@
|
||||
"format": 1,
|
||||
"seat": "node-build-go",
|
||||
"scope": "node",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"verbs": [
|
||||
"accepts": [
|
||||
{
|
||||
"name": "current",
|
||||
"description": "The Go asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pause",
|
||||
"description": "Take no new Go ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module (its pause key). A capacity of 0 is the lasting way to keep a node from building.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resume",
|
||||
"description": "Take Go asks again on this node.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
"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": "delivery"
|
||||
"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": "check"
|
||||
"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": "recheck"
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,46 +2,87 @@
|
||||
"format": 1,
|
||||
"seat": "node-build-image",
|
||||
"scope": "node",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"verbs": [
|
||||
"accepts": [
|
||||
{
|
||||
"name": "current",
|
||||
"description": "The image asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pause",
|
||||
"description": "Take no new image ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module (its pause key). A capacity of 0 is the lasting way to keep a node from building.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resume",
|
||||
"description": "Take image asks again on this node.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
"description": "The image 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": "delivery"
|
||||
"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": "check"
|
||||
"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": "recheck"
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,46 +2,87 @@
|
||||
"format": 1,
|
||||
"seat": "node-build-node",
|
||||
"scope": "node",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Delivery",
|
||||
"decision": "novox/hq ADR 0525, ADR 0536, ADR 0553",
|
||||
"pulled-by-kind": true,
|
||||
"yields": true,
|
||||
"verbs": [
|
||||
"accepts": [
|
||||
{
|
||||
"name": "current",
|
||||
"description": "The Node asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "delivery",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pause",
|
||||
"description": "Take no new Node ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module (its pause key). A capacity of 0 is the lasting way to keep a node from building.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "check",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resume",
|
||||
"description": "Take Node asks again on this node.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
"name": "recheck",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepAsk"
|
||||
}
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
"description": "The Node 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": "delivery"
|
||||
"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": "check"
|
||||
"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": "recheck"
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -244,5 +244,140 @@
|
||||
"held"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "holds",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "the bundles, archives and copied bases kept from retention's removal",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<seat>.<name>.<digest>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one hold: an untagged bundle, archive or copied base kept from retention's removal",
|
||||
"properties": {
|
||||
"seat": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"seat",
|
||||
"name",
|
||||
"kind",
|
||||
"digest",
|
||||
"by",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"description": "one hold"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "the direct-write windows, one per caller",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<caller>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the direct-write window of one caller: open while a node holds it open",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "the caller whose window it is"
|
||||
},
|
||||
"open": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"holding": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the nodes holding it open"
|
||||
},
|
||||
"since": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
},
|
||||
"description": "node to when it began to hold"
|
||||
},
|
||||
"closed": {
|
||||
"type": "string",
|
||||
"description": "when it last closed (RFC 3339 time)"
|
||||
},
|
||||
"last_holding": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dropped": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when (RFC 3339 time)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"description": "retired nodes dropped by hand"
|
||||
},
|
||||
"why": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "of each node holding the window, why it holds it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"description": "one caller's window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -182,7 +182,56 @@
|
||||
"key": "<asker>.<id>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one ask the router holds and how it stands"
|
||||
"description": "one ask the router holds and how it stands, as the router's tool states it",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "<asker>.<id>"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "its headline"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "how it stands: open, chosen, expired, cancelled, replaced or refused"
|
||||
},
|
||||
"opened": {
|
||||
"type": "string",
|
||||
"description": "when it was opened, RFC 3339"
|
||||
},
|
||||
"expires": {
|
||||
"type": "string",
|
||||
"description": "when it ends unanswered, RFC 3339"
|
||||
},
|
||||
"offered_on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the channels it was offered on"
|
||||
},
|
||||
"asker_told": {
|
||||
"type": "boolean",
|
||||
"description": "its asker has been told how it ended"
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"description": "how it ended, in words"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"asker",
|
||||
"headline",
|
||||
"state",
|
||||
"opened",
|
||||
"expires"
|
||||
]
|
||||
},
|
||||
"description": "one ask the router holds and how it stands"
|
||||
}
|
||||
@@ -563,6 +612,250 @@
|
||||
"subject",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"Button": {
|
||||
"type": "object",
|
||||
"description": "one answer a channel offers: its label and the router's one-time ticket for it",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "the button's label"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the router's one-time ticket for it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"ticket"
|
||||
]
|
||||
},
|
||||
"Message": {
|
||||
"type": "object",
|
||||
"description": "the work a channel takes on the bench channel: shown with buttons (show), shown again in place (edit) or said (send); the words are the router's, shown as given",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the router's name for it, the same across a show and its edits"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "its title"
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "its body"
|
||||
},
|
||||
"buttons": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Button"
|
||||
},
|
||||
"description": "the answers it offers (none for a send)"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"description": "its secondary words after the body and the buttons: who asked and when, what each answer does, when it expires, the ask's details"
|
||||
},
|
||||
"urgent": {
|
||||
"type": "boolean",
|
||||
"description": "urgent"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description": "shown without notifying"
|
||||
},
|
||||
"reply": {
|
||||
"type": "string",
|
||||
"description": "the choice or link request this answers, by its id: the channel shows it where that was made"
|
||||
},
|
||||
"to": {
|
||||
"type": "string",
|
||||
"description": "the account linked as the operator on this kind, where the channel sends what is not a reply; empty when none is linked"
|
||||
},
|
||||
"secret": {
|
||||
"type": "boolean",
|
||||
"description": "the words carry something shown once (a link's code): the channel keeps no copy"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"Sender": {
|
||||
"type": "object",
|
||||
"description": "who a channel's service says sent something; the router alone judges whether that is the operator",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"description": "the account"
|
||||
},
|
||||
"display": {
|
||||
"type": "string",
|
||||
"description": "the name it shows"
|
||||
},
|
||||
"authenticated": {
|
||||
"type": "boolean",
|
||||
"description": "whether the service authenticated it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"identity",
|
||||
"authenticated"
|
||||
]
|
||||
},
|
||||
"Choice": {
|
||||
"type": "object",
|
||||
"description": "a button chosen on a channel, said on the bench intake as the event `choice`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival, unique, so the router acts on it once"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the ticket of the button"
|
||||
},
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"ticket",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"LinkAsked": {
|
||||
"type": "object",
|
||||
"description": "somebody on a channel asking to be linked as the operator, said on the bench intake as the event `link`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Failed": {
|
||||
"type": "object",
|
||||
"description": "a message a channel could not deliver, said on the bench intake as the event `failed`",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why"
|
||||
},
|
||||
"permanent": {
|
||||
"type": "boolean",
|
||||
"description": "trying again cannot help"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"why",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Standing": {
|
||||
"type": "object",
|
||||
"description": "what a channel says of itself at least every five minutes and whenever it changes, on the bench intake as the event `standing`",
|
||||
"properties": {
|
||||
"ready": {
|
||||
"type": "boolean",
|
||||
"description": "it can send now"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why not"
|
||||
},
|
||||
"edits-silently": {
|
||||
"type": "boolean",
|
||||
"description": "its edits notify nobody"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ready",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Code": {
|
||||
"type": "object",
|
||||
"description": "a code a person typed on a channel, asked as the proof `code` on the bench intake by request and reply: never in an event, never kept",
|
||||
"properties": {
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "the code"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string",
|
||||
"description": "what it is for"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sender",
|
||||
"code",
|
||||
"purpose"
|
||||
]
|
||||
},
|
||||
"ProofAnswer": {
|
||||
"type": "object",
|
||||
"description": "the router's answer to a proof",
|
||||
"properties": {
|
||||
"accepted": {
|
||||
"type": "boolean",
|
||||
"description": "whether it was taken"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "words to say to the person"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accepted",
|
||||
"words"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,18 @@
|
||||
"format": 1,
|
||||
"seat": "the-private-network",
|
||||
"scope": "node",
|
||||
"grain": "seat-list",
|
||||
"grain": "whole",
|
||||
"domain": "Connectivity",
|
||||
"decision": "novox/hq ADR 0110"
|
||||
"decision": "novox/hq ADR 0110, ADR 0634, ADR 0635",
|
||||
"description": "The seat of the private network (ADR 0110): the one network the mesh runs over, which a machine can have only one of; the mesh provides its holder itself and the provision carries no fields.",
|
||||
"verbs": [],
|
||||
"provisions": [
|
||||
{
|
||||
"name": "private-network",
|
||||
"form": {
|
||||
"type": "object",
|
||||
"description": "the provision has no fields: it is the machine's reach to the others"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
-1
@@ -34,7 +34,6 @@ delivery/builder.go: container-image-registry
|
||||
delivery/builder.go: oci-artifact-registry
|
||||
delivery/checker.go: mesh-delivery-checker
|
||||
delivery/composed.go: mesh-provisioner
|
||||
delivery/enrolment.go: mesh-enrolment
|
||||
delivery/held.go: mesh.seat.mesh-artifact-sweep.event.
|
||||
delivery/placement.go: mesh-self-check
|
||||
delivery/provided.go: the-private-network
|
||||
|
||||
Reference in New Issue
Block a user