B5g5-1: buscalls SeatChunks.Send, the holder's side of Receive; the mesh-catalog seat copies carry input in chunks
A holder sends a verb's answer file with SeatChunks.Send: it subscribes to the verb's acknowledgements, answers each as a request and publishes each chunk only after the one before is acknowledged. The bootstrap, seatlisttest and captured copies of the mesh-catalog seat are the contracts' file at the input verb with chunks. Builds: design 47 G §712, §681, A-237, A-139, A-249 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"io"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/nats-io/nats.go"
|
||||
)
|
||||
|
||||
// SeatChunks is the send of one seat verb's answer file in chunks (design 47 G §681, A-64, A-139), a verb whose seat
|
||||
@@ -85,3 +87,69 @@ func (c SeatChunks) Receive(of int64, next func() (subject string, body []byte,
|
||||
}
|
||||
return written, nil
|
||||
}
|
||||
|
||||
// ChunkLine is the core connection as a send of chunks reaches it, which a *nats.Conn is: a chunk is published on its subject and
|
||||
// kept on no stream, and the acknowledgements are subscribed to, since the caller asks each as a request.
|
||||
type ChunkLine interface {
|
||||
Publish(subject string, data []byte) error
|
||||
Subscribe(subject string, cb nats.MsgHandler) (*nats.Subscription, error)
|
||||
}
|
||||
|
||||
// Send sends body in chunks of at most SeatChunkBytes, the holder's side of Receive (design 47 G §681, A-139, A-237): it subscribes
|
||||
// to the verb's acknowledgements (SeatAcks), answers each as the request it is, publishes the nth chunk on Chunk(n) only once the
|
||||
// n-1th is acknowledged on Ack(n-1), and ends the subscription when the send ends. An acknowledgement that does not come within
|
||||
// `within` (SeatAckWithin where the caller has no other bound) ends the send with ErrSeatChunkMissed, and logf says where. Another
|
||||
// call's acknowledgements are skipped. It blocks until the send ends, so a verb answers its chunk count first and runs it after.
|
||||
func (c SeatChunks) Send(line ChunkLine, body []byte, within time.Duration, logf func(string, ...any)) error {
|
||||
if logf == nil {
|
||||
logf = func(string, ...any) {}
|
||||
}
|
||||
acks := make(chan string, 1)
|
||||
sub, err := line.Subscribe(SeatAcks(c.Seat, c.Verb), func(m *nats.Msg) {
|
||||
if m.Reply != "" {
|
||||
_ = m.Respond([]byte("{}"))
|
||||
}
|
||||
select {
|
||||
case acks <- m.Subject:
|
||||
default:
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("the acknowledgements cannot be heard, so no chunk is sent: %w", err)
|
||||
}
|
||||
defer func() { _ = sub.Unsubscribe() }()
|
||||
total := int64((len(body) + SeatChunkBytes - 1) / SeatChunkBytes)
|
||||
for n := int64(1); n <= total; n++ {
|
||||
from := (n - 1) * SeatChunkBytes
|
||||
to := min(int64(len(body)), from+SeatChunkBytes)
|
||||
data, err := json.Marshal(SeatChunk{N: n, Of: total, Data: body[from:to]})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := line.Publish(c.Chunk(n), data); err != nil {
|
||||
logf("the send %s of %s ends at chunk %d of %d: %v", c.Call, c.Verb, n, total, err)
|
||||
return fmt.Errorf("chunk %d of %d: %w", n, total, err)
|
||||
}
|
||||
if !c.acknowledged(acks, c.Ack(n), within) {
|
||||
logf("the send %s of %s ends at chunk %d of %d: no acknowledgement within %s", c.Call, c.Verb, n, total, within)
|
||||
return fmt.Errorf("chunk %d of %d: %w", n, total, ErrSeatChunkMissed)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// acknowledged waits within for the acknowledgement on subject, skipping another call's.
|
||||
func (c SeatChunks) acknowledged(acks <-chan string, subject string, within time.Duration) bool {
|
||||
timer := time.NewTimer(within)
|
||||
defer timer.Stop()
|
||||
for {
|
||||
select {
|
||||
case got := <-acks:
|
||||
if got == subject {
|
||||
return true
|
||||
}
|
||||
case <-timer.C:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package buscalls
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/nats-io/nats.go"
|
||||
)
|
||||
|
||||
// lineMem is a core connection in memory: what Send publishes is kept, and when ackOf says so the chunk is acknowledged as the
|
||||
// caller does, with a request on the ack subject, whose reply Send must give.
|
||||
type lineMem struct {
|
||||
mu sync.Mutex
|
||||
handler nats.MsgHandler
|
||||
subject string
|
||||
chunks map[string][]byte
|
||||
order []string
|
||||
ackOf func(n int64) (string, bool)
|
||||
}
|
||||
|
||||
func (l *lineMem) Subscribe(subject string, cb nats.MsgHandler) (*nats.Subscription, error) {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
l.handler, l.subject = cb, subject
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (l *lineMem) Publish(subject string, data []byte) error {
|
||||
l.mu.Lock()
|
||||
l.chunks[subject] = data
|
||||
l.order = append(l.order, subject)
|
||||
h := l.handler
|
||||
l.mu.Unlock()
|
||||
var c SeatChunk
|
||||
_ = json.Unmarshal(data, &c)
|
||||
if sub, ok := l.ackOf(c.N); ok {
|
||||
go h(&nats.Msg{Subject: sub, Reply: "_INBOX.x", Sub: nil})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// TestSeatChunksSend: the bytes go in chunks of at most SeatChunkBytes, each published only after the one before is
|
||||
// acknowledged, and the receive of the same form reads them back; an acknowledgement missed or of another call ends the
|
||||
// send (design 47 G §681, A-237, A-139).
|
||||
func TestSeatChunksSend(t *testing.T) {
|
||||
c := SeatChunks{Seat: "mesh-catalog", Verb: "input", Call: "0123456789abcdef"}
|
||||
body := bytes.Repeat([]byte("x"), 2*SeatChunkBytes+5)
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
ackOf func(int64) (string, bool)
|
||||
err string
|
||||
sent int
|
||||
}{
|
||||
{name: "every chunk acknowledged", ackOf: func(n int64) (string, bool) { return c.Ack(n), true }, sent: 3},
|
||||
{name: "no acknowledgement", ackOf: func(int64) (string, bool) { return "", false }, err: "chunk 1 of 3", sent: 1},
|
||||
{name: "another call's acknowledgement", ackOf: func(n int64) (string, bool) {
|
||||
return SeatChunks{Seat: "mesh-catalog", Verb: "input", Call: "fedcba9876543210"}.Ack(n), true
|
||||
}, err: "chunk 1 of 3", sent: 1},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
l := &lineMem{chunks: map[string][]byte{}, ackOf: tc.ackOf}
|
||||
err := c.Send(l, body, time.Millisecond*50, func(string, ...any) {})
|
||||
if tc.err == "" && err != nil || tc.err != "" && (err == nil || !strings.Contains(err.Error(), tc.err)) {
|
||||
t.Fatalf("err %v, want %q", err, tc.err)
|
||||
}
|
||||
if len(l.order) != tc.sent {
|
||||
t.Fatalf("%d chunks sent, want %d", len(l.order), tc.sent)
|
||||
}
|
||||
if l.subject != SeatAcks("mesh-catalog", "input") {
|
||||
t.Fatalf("acknowledgements heard on %q", l.subject)
|
||||
}
|
||||
if tc.err != "" {
|
||||
return
|
||||
}
|
||||
var got bytes.Buffer
|
||||
i := 0
|
||||
_, err = c.Receive(3, func() (string, []byte, error) {
|
||||
s := l.order[i]
|
||||
i++
|
||||
return s, l.chunks[s], nil
|
||||
}, func(string) error { return nil }, &got)
|
||||
if err != nil || !bytes.Equal(got.Bytes(), body) {
|
||||
t.Fatalf("received %d bytes, %v", got.Len(), err)
|
||||
}
|
||||
})
|
||||
}
|
||||
if err := c.Send(&lineMem{chunks: map[string][]byte{}}, nil, time.Second, nil); err != nil {
|
||||
t.Errorf("no bytes: %v", err)
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@
|
||||
},
|
||||
{
|
||||
"name": "seat-definitions",
|
||||
"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.",
|
||||
"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.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"seat": {
|
||||
@@ -250,7 +250,7 @@
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"description": "The catalog half of the revision view (ADR 0656 \u00a76): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only.",
|
||||
"description": "The catalog half of the revision view (ADR 0656 §6): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only. A watched branch with no revision yet answers {none-yet: true} alone (design 47 G section 530).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -292,12 +292,12 @@
|
||||
"next": {
|
||||
"type": "string",
|
||||
"description": "the module to ask after for the next page; absent on the last"
|
||||
},
|
||||
"none-yet": {
|
||||
"type": "boolean",
|
||||
"description": "true for a watched branch with no revision yet: no revision, no entries and no error follow, and a reader holds the branch's view ready and empty (design 47 G section 530)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"revision",
|
||||
"entries"
|
||||
]
|
||||
}
|
||||
},
|
||||
"class": "read"
|
||||
},
|
||||
@@ -554,17 +554,23 @@
|
||||
"seat:node-build-node",
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354).",
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354): its fields, then the bytes in chunks of at most 512 KiB on the chunk subject of the call, each acknowledged by the caller on the ack subject within 30 seconds; the input is of any size.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest"
|
||||
"digest",
|
||||
"call"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
@@ -574,16 +580,18 @@
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "the input's exact bytes, base64"
|
||||
"chunks": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "how many chunks are sent; 0 when there is no input of that digest"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest",
|
||||
"input"
|
||||
"chunks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"chunks": true
|
||||
},
|
||||
{
|
||||
"name": "entry",
|
||||
@@ -614,7 +622,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 \u00a71, \u00a74).",
|
||||
"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).",
|
||||
"family": {
|
||||
"name": "mesh-catalog.events",
|
||||
"max-age-days": 7
|
||||
@@ -678,6 +686,13 @@
|
||||
"type": "integer",
|
||||
"description": "the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it"
|
||||
},
|
||||
"problems": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "each problem the indexer's re-judgement finds in a manifest it keeps accepted because its digest is unchanged: the manifest validator's strings, the same items its verdict writes as warnings, in the same order; an empty list when none (design 47 G section 668, 692)"
|
||||
},
|
||||
"bus-state": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -717,7 +732,8 @@
|
||||
"module",
|
||||
"digest",
|
||||
"judge",
|
||||
"bus-state"
|
||||
"bus-state",
|
||||
"problems"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1785,7 +1801,7 @@
|
||||
"name": "inputs",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "a step's input, named by its write time and its sha256 (design 47 G section 354)",
|
||||
"description": "a step's input, named by its write time and its sha256; a value over one chunk is held in the state's objects store (design 47 G sections 354, 712)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<time>.<digest>",
|
||||
@@ -1910,7 +1926,7 @@
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/BuildEdge"
|
||||
},
|
||||
"description": "its build edges, by language (ADR 0603 \u00a72)"
|
||||
"description": "its build edges, by language (ADR 0603 §2)"
|
||||
},
|
||||
"provides": {
|
||||
"type": "array",
|
||||
@@ -1950,14 +1966,14 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 \u00a73)"
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 §3)"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 \u00a74, ADR 0632 \u00a72)"
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 §4, ADR 0632 §2)"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
@@ -2248,7 +2264,7 @@
|
||||
},
|
||||
"BuildEdge": {
|
||||
"type": "object",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 \u00a72)",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 §2)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
@@ -2424,6 +2440,8 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"unprotected branch",
|
||||
"reserved branch name",
|
||||
"placed",
|
||||
"review required",
|
||||
"unknown module",
|
||||
"nothing moves"
|
||||
@@ -2546,6 +2564,10 @@
|
||||
"fact": {
|
||||
"type": "string",
|
||||
"description": "kinds 5 and 6: the acting part, its step and the build that acted, or the verb or word used and the delivered version that serves it"
|
||||
},
|
||||
"filled": {
|
||||
"type": "boolean",
|
||||
"description": "the entry was derived at the first fill (design 47 G section 377), not recorded at a release or a delivery"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2735,5 +2757,263 @@
|
||||
"language"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bodies": {
|
||||
"TakeInMerge": {
|
||||
"type": "object",
|
||||
"description": "one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"merge": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"merge"
|
||||
]
|
||||
},
|
||||
"TakeInMember": {
|
||||
"type": "object",
|
||||
"description": "one pull request at one commit",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"head": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"head"
|
||||
]
|
||||
},
|
||||
"TakeInEntry": {
|
||||
"type": "object",
|
||||
"description": "one module of a taken-in revision (design 47 G section 476, section 648)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
},
|
||||
"pull": {
|
||||
"type": "integer",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"commit",
|
||||
"fingerprint"
|
||||
]
|
||||
},
|
||||
"TakeInPending": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.pending: a wait for a revision or a group, with the watched branch (design 47 G section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"TakeInTaken": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.taken: a wait ended, with the branch, the source revision and the entries (design 47 G section 476, section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision taken in (design 47 G section 476)"
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInEntry"
|
||||
},
|
||||
"description": "one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
},
|
||||
{
|
||||
"name": "seat-definitions",
|
||||
"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.",
|
||||
"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.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"seat": {
|
||||
@@ -250,7 +250,7 @@
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"description": "The catalog half of the revision view (ADR 0656 \u00a76): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only.",
|
||||
"description": "The catalog half of the revision view (ADR 0656 §6): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only. A watched branch with no revision yet answers {none-yet: true} alone (design 47 G section 530).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -292,12 +292,12 @@
|
||||
"next": {
|
||||
"type": "string",
|
||||
"description": "the module to ask after for the next page; absent on the last"
|
||||
},
|
||||
"none-yet": {
|
||||
"type": "boolean",
|
||||
"description": "true for a watched branch with no revision yet: no revision, no entries and no error follow, and a reader holds the branch's view ready and empty (design 47 G section 530)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"revision",
|
||||
"entries"
|
||||
]
|
||||
}
|
||||
},
|
||||
"class": "read"
|
||||
},
|
||||
@@ -554,17 +554,23 @@
|
||||
"seat:node-build-node",
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354).",
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354): its fields, then the bytes in chunks of at most 512 KiB on the chunk subject of the call, each acknowledged by the caller on the ack subject within 30 seconds; the input is of any size.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest"
|
||||
"digest",
|
||||
"call"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
@@ -574,16 +580,18 @@
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "the input's exact bytes, base64"
|
||||
"chunks": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "how many chunks are sent; 0 when there is no input of that digest"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest",
|
||||
"input"
|
||||
"chunks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"chunks": true
|
||||
},
|
||||
{
|
||||
"name": "entry",
|
||||
@@ -614,7 +622,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 \u00a71, \u00a74).",
|
||||
"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).",
|
||||
"family": {
|
||||
"name": "mesh-catalog.events",
|
||||
"max-age-days": 7
|
||||
@@ -678,6 +686,13 @@
|
||||
"type": "integer",
|
||||
"description": "the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it"
|
||||
},
|
||||
"problems": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "each problem the indexer's re-judgement finds in a manifest it keeps accepted because its digest is unchanged: the manifest validator's strings, the same items its verdict writes as warnings, in the same order; an empty list when none (design 47 G section 668, 692)"
|
||||
},
|
||||
"bus-state": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -717,7 +732,8 @@
|
||||
"module",
|
||||
"digest",
|
||||
"judge",
|
||||
"bus-state"
|
||||
"bus-state",
|
||||
"problems"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1785,7 +1801,7 @@
|
||||
"name": "inputs",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "a step's input, named by its write time and its sha256 (design 47 G section 354)",
|
||||
"description": "a step's input, named by its write time and its sha256; a value over one chunk is held in the state's objects store (design 47 G sections 354, 712)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<time>.<digest>",
|
||||
@@ -1910,7 +1926,7 @@
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/BuildEdge"
|
||||
},
|
||||
"description": "its build edges, by language (ADR 0603 \u00a72)"
|
||||
"description": "its build edges, by language (ADR 0603 §2)"
|
||||
},
|
||||
"provides": {
|
||||
"type": "array",
|
||||
@@ -1950,14 +1966,14 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 \u00a73)"
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 §3)"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 \u00a74, ADR 0632 \u00a72)"
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 §4, ADR 0632 §2)"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
@@ -2248,7 +2264,7 @@
|
||||
},
|
||||
"BuildEdge": {
|
||||
"type": "object",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 \u00a72)",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 §2)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
@@ -2424,6 +2440,8 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"unprotected branch",
|
||||
"reserved branch name",
|
||||
"placed",
|
||||
"review required",
|
||||
"unknown module",
|
||||
"nothing moves"
|
||||
@@ -2546,6 +2564,10 @@
|
||||
"fact": {
|
||||
"type": "string",
|
||||
"description": "kinds 5 and 6: the acting part, its step and the build that acted, or the verb or word used and the delivered version that serves it"
|
||||
},
|
||||
"filled": {
|
||||
"type": "boolean",
|
||||
"description": "the entry was derived at the first fill (design 47 G section 377), not recorded at a release or a delivery"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2735,5 +2757,263 @@
|
||||
"language"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bodies": {
|
||||
"TakeInMerge": {
|
||||
"type": "object",
|
||||
"description": "one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"merge": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"merge"
|
||||
]
|
||||
},
|
||||
"TakeInMember": {
|
||||
"type": "object",
|
||||
"description": "one pull request at one commit",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"head": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"head"
|
||||
]
|
||||
},
|
||||
"TakeInEntry": {
|
||||
"type": "object",
|
||||
"description": "one module of a taken-in revision (design 47 G section 476, section 648)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
},
|
||||
"pull": {
|
||||
"type": "integer",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"commit",
|
||||
"fingerprint"
|
||||
]
|
||||
},
|
||||
"TakeInPending": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.pending: a wait for a revision or a group, with the watched branch (design 47 G section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"TakeInTaken": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.taken: a wait ended, with the branch, the source revision and the entries (design 47 G section 476, section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision taken in (design 47 G section 476)"
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInEntry"
|
||||
},
|
||||
"description": "one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+301
-21
@@ -171,7 +171,7 @@
|
||||
},
|
||||
{
|
||||
"name": "seat-definitions",
|
||||
"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.",
|
||||
"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.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"seat": {
|
||||
@@ -250,7 +250,7 @@
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"description": "The catalog half of the revision view (ADR 0656 \u00a76): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only.",
|
||||
"description": "The catalog half of the revision view (ADR 0656 §6): one catalog graph revision with its entries whole, the trunk heads, the seat definitions by digest, and each manifest's verdict and fingerprint; the trunk's newest when no revision and no candidate is named, or a candidate's for its group and heads. Answered by the holder from what it holds, in its own runtime (ADR 0663), in pages of entries. Reads only. A watched branch with no revision yet answers {none-yet: true} alone (design 47 G section 530).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -292,12 +292,12 @@
|
||||
"next": {
|
||||
"type": "string",
|
||||
"description": "the module to ask after for the next page; absent on the last"
|
||||
},
|
||||
"none-yet": {
|
||||
"type": "boolean",
|
||||
"description": "true for a watched branch with no revision yet: no revision, no entries and no error follow, and a reader holds the branch's view ready and empty (design 47 G section 530)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"revision",
|
||||
"entries"
|
||||
]
|
||||
}
|
||||
},
|
||||
"class": "read"
|
||||
},
|
||||
@@ -554,17 +554,23 @@
|
||||
"seat:node-build-node",
|
||||
"seat:node-build-image"
|
||||
],
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354).",
|
||||
"description": "A step's input by its digest, as the indexer keeps it for a validation step it asked a build seat to run (design 47 G section 354): its fields, then the bytes in chunks of at most 512 KiB on the chunk subject of the call, each acknowledged by the caller on the ack subject within 30 seconds; the input is of any size.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest"
|
||||
"digest",
|
||||
"call"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
@@ -574,16 +580,18 @@
|
||||
"type": "string",
|
||||
"description": "the input's sha256"
|
||||
},
|
||||
"input": {
|
||||
"type": "string",
|
||||
"description": "the input's exact bytes, base64"
|
||||
"chunks": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "how many chunks are sent; 0 when there is no input of that digest"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest",
|
||||
"input"
|
||||
"chunks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"chunks": true
|
||||
},
|
||||
{
|
||||
"name": "entry",
|
||||
@@ -614,7 +622,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 \u00a71, \u00a74).",
|
||||
"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).",
|
||||
"family": {
|
||||
"name": "mesh-catalog.events",
|
||||
"max-age-days": 7
|
||||
@@ -678,6 +686,13 @@
|
||||
"type": "integer",
|
||||
"description": "the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it"
|
||||
},
|
||||
"problems": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "each problem the indexer's re-judgement finds in a manifest it keeps accepted because its digest is unchanged: the manifest validator's strings, the same items its verdict writes as warnings, in the same order; an empty list when none (design 47 G section 668, 692)"
|
||||
},
|
||||
"bus-state": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -717,7 +732,8 @@
|
||||
"module",
|
||||
"digest",
|
||||
"judge",
|
||||
"bus-state"
|
||||
"bus-state",
|
||||
"problems"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1785,7 +1801,7 @@
|
||||
"name": "inputs",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "a step's input, named by its write time and its sha256 (design 47 G section 354)",
|
||||
"description": "a step's input, named by its write time and its sha256; a value over one chunk is held in the state's objects store (design 47 G sections 354, 712)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<time>.<digest>",
|
||||
@@ -1910,7 +1926,7 @@
|
||||
"additionalProperties": {
|
||||
"$ref": "#/defs/BuildEdge"
|
||||
},
|
||||
"description": "its build edges, by language (ADR 0603 \u00a72)"
|
||||
"description": "its build edges, by language (ADR 0603 §2)"
|
||||
},
|
||||
"provides": {
|
||||
"type": "array",
|
||||
@@ -1950,14 +1966,14 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 \u00a73)"
|
||||
"description": "its verb edges left out because they lie on a cycle (ADR 0614 §3)"
|
||||
},
|
||||
"needs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 \u00a74, ADR 0632 \u00a72)"
|
||||
"description": "the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 §4, ADR 0632 §2)"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
@@ -2248,7 +2264,7 @@
|
||||
},
|
||||
"BuildEdge": {
|
||||
"type": "object",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 \u00a72)",
|
||||
"description": "the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 §2)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
@@ -2424,6 +2440,8 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"unprotected branch",
|
||||
"reserved branch name",
|
||||
"placed",
|
||||
"review required",
|
||||
"unknown module",
|
||||
"nothing moves"
|
||||
@@ -2546,6 +2564,10 @@
|
||||
"fact": {
|
||||
"type": "string",
|
||||
"description": "kinds 5 and 6: the acting part, its step and the build that acted, or the verb or word used and the delivered version that serves it"
|
||||
},
|
||||
"filled": {
|
||||
"type": "boolean",
|
||||
"description": "the entry was derived at the first fill (design 47 G section 377), not recorded at a release or a delivery"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2735,5 +2757,263 @@
|
||||
"language"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bodies": {
|
||||
"TakeInMerge": {
|
||||
"type": "object",
|
||||
"description": "one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"merge": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"merge"
|
||||
]
|
||||
},
|
||||
"TakeInMember": {
|
||||
"type": "object",
|
||||
"description": "one pull request at one commit",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer"
|
||||
},
|
||||
"head": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"number",
|
||||
"head"
|
||||
]
|
||||
},
|
||||
"TakeInEntry": {
|
||||
"type": "object",
|
||||
"description": "one module of a taken-in revision (design 47 G section 476, section 648)",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
},
|
||||
"pull": {
|
||||
"type": "integer",
|
||||
"description": "from a merged message; absent for a pushed one (design 47 G section 648)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"commit",
|
||||
"fingerprint"
|
||||
]
|
||||
},
|
||||
"TakeInPending": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.pending: a wait for a revision or a group, with the watched branch (design 47 G section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"TakeInTaken": {
|
||||
"type": "object",
|
||||
"description": "the body of the indexer's take-in.taken: a wait ended, with the branch, the source revision and the entries (design 47 G section 476, section 493)",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the event's kind, pending or taken"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered"
|
||||
},
|
||||
"what": {
|
||||
"type": "string",
|
||||
"description": "what waits: a revision or a group"
|
||||
},
|
||||
"merges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMerge"
|
||||
},
|
||||
"description": "the merges it holds, oldest first"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the delivery group, for a group being gathered"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInMember"
|
||||
},
|
||||
"description": "every approved member of a group with its head"
|
||||
},
|
||||
"waits-for": {
|
||||
"type": "string",
|
||||
"description": "the indexer build a revision waits for"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "when the wait began",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "who acted by hand, on a taken event"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why they acted by hand, on a taken event"
|
||||
},
|
||||
"dropped": {
|
||||
"type": "boolean",
|
||||
"description": "a hand drop: the merges are not taken in"
|
||||
},
|
||||
"lost": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the keys of merges whose message the forge bridge's stream no longer holds"
|
||||
},
|
||||
"refused": {
|
||||
"type": "string",
|
||||
"description": "why the manifest of the indexer the revision names was refused"
|
||||
},
|
||||
"own-build-unknown": {
|
||||
"type": "string",
|
||||
"description": "why the indexer holds a merge it does not take in although no indexer build is named"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision is of (design 47 G section 476, section 493)"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision taken in (design 47 G section 476)"
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/bodies/TakeInEntry"
|
||||
},
|
||||
"description": "one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"kind",
|
||||
"key",
|
||||
"what",
|
||||
"merges",
|
||||
"since"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user