C1: the take-in's form is the lines' fields; policies gain validate

take-in.taken carries branch, source, revision, call, entries (one
{module, commit, fingerprint, repository} per mover, no pull), skipped, and by
and why for a hand act; take-in.pending carries branch, source and why; the
keys, kinds, merges, groups and the other fields of the earlier take-in go, so
readers pair a wait by <branch>.<source> (H-A-31). StepStatuses gains
validate before composition; the seat says no manifest-accepted or
manifest-refused.

Builds: design 47 H §743, §744, §745, §763 (G §476, §648), §764 (the indexer's manifest events); lead answer H-A-31

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
2026-11-20 02:41:07 +01:00
parent 8e5e5dbb42
commit f006ab50bc
5 changed files with 161 additions and 590 deletions
@@ -3,6 +3,7 @@ package meshcatalogclient
import (
"encoding/json"
"errors"
"slices"
"strings"
"testing"
@@ -167,23 +168,62 @@ func TestCandidatesKeyEscapesTheGroupAndReadsBack(t *testing.T) {
}
}
// CT15 (design 47 G §476, §493, §648): the seat's `bodies` give the types the indexer writes and the runner reads: a
// take-in.taken names its branch, source revision and entries (an entry of a merged message names its pull request),
// a take-in.pending its branch, and a revision answer for a branch with no revision yet is `none-yet` alone.
// CT15 (design 47 H §743, §744, §745, §763): the seat's `bodies` give the types the indexer writes and the runner
// reads: each take-in body reads back as the lines' fields alone, an entry naming pull loses it, a policy holds
// validate, the seat says no manifest event, and a revision answer for a branch with no revision yet is `none-yet`
// alone.
func TestTakeInBodiesAndNoneYetAreTheSeatsTypes(t *testing.T) {
var taken seat.TakeInTaken
body := `{"v":1,"kind":"taken","key":"m.00000000000000000007","what":"revision","branch":"beta","source":3590,"since":"2026-11-11T10:00:00Z",` +
`"merges":[{"repository":"novox/mesh-sdk","number":9,"merge":"cc"}],` +
`"entries":[{"module":"nats","commit":"cc","fingerprint":"src2:aa","repository":"novox/mesh-sdk","pull":9},{"module":"zsh","commit":"cc","fingerprint":"src2:bb"}]}`
if err := json.Unmarshal([]byte(body), &taken); err != nil {
t.Fatal(err)
roundTrip := func(given string, into any) string {
t.Helper()
if err := json.Unmarshal([]byte(given), into); err != nil {
t.Fatal(err)
}
b, err := json.Marshal(into)
if err != nil {
t.Fatal(err)
}
return string(b)
}
if taken.Branch != "beta" || taken.Source != 3590 || len(taken.Entries) != 2 || taken.Entries[0].Pull != 9 || taken.Entries[1].Repository != "" {
t.Errorf("take-in.taken read as %+v", taken)
for _, tc := range []struct {
name, given, wire string
into any
}{
{ // C1/AC1 (§743, §763)
name: "taken with movers, an entry's pull dropped",
given: `{"branch":"main","source":1044,"revision":1044,"call":"0123456789abcdef","entries":[{"module":"mesh-sdk","commit":"aaaa","fingerprint":"fp1","repository":"novox/mesh-sdk","pull":7}]}`,
wire: `{"branch":"main","call":"0123456789abcdef","entries":[{"commit":"aaaa","fingerprint":"fp1","module":"mesh-sdk","repository":"novox/mesh-sdk"}],"revision":1044,"source":1044}`,
into: &seat.TakeInTaken{},
},
{ // C1/AC2 (§744): a skip by hand
name: "taken, skipped",
given: `{"branch":"main","source":1045,"call":"0123456789abcdef","skipped":true,"by":"lead@workstation","why":"store full"}`,
wire: `{"branch":"main","by":"lead@workstation","call":"0123456789abcdef","skipped":true,"source":1045,"why":"store full"}`,
into: &seat.TakeInTaken{},
},
{ // C1/AC2 (§744)
name: "pending",
given: `{"branch":"main","source":1045,"why":"the catalog store is full"}`,
wire: `{"branch":"main","source":1045,"why":"the catalog store is full"}`,
into: &seat.TakeInPending{},
},
{ // C1/AC3 (§745)
name: "a policy's validate",
given: `{"validate":"required"}`,
wire: `{"validate":"required"}`,
into: &seat.StepStatuses{},
},
} {
t.Run(tc.name, func(t *testing.T) {
if got := roundTrip(tc.given, tc.into); got != tc.wire {
t.Errorf("reads back as %s, want %s", got, tc.wire)
}
})
}
var pending seat.TakeInPending
if err := json.Unmarshal([]byte(`{"v":1,"kind":"pending","key":"m.1","what":"revision","branch":"beta","since":"2026-11-11T10:00:00Z","merges":[]}`), &pending); err != nil || pending.Branch != "beta" {
t.Errorf("take-in.pending read as %+v, %v", pending, err)
// C1/AC3 (§745, §764): the seat says no manifest-accepted or manifest-refused.
for _, e := range []string{"manifest-accepted", "manifest-refused"} {
if slices.Contains(seat.Events(), e) {
t.Errorf("the seat still says %s", e)
}
}
var none seat.RevisionAnswer
if err := json.Unmarshal([]byte(`{"none-yet":true}`), &none); err != nil || !none.NoneYet || none.Revision != nil {
@@ -35,8 +35,6 @@ const (
const (
EventSeatDefinitionChanged = "seat-definition-changed"
EventSeatDefinitionRemoved = "seat-definition-removed"
EventManifestAccepted = "manifest-accepted"
EventManifestRefused = "manifest-refused"
EventCatalogRevision = "catalog-revision"
EventFilling = "filling"
EventFull = "full"
@@ -53,7 +51,7 @@ func Verbs() []string {
// Events is every event published on the seat's subject: a new copy each call.
func Events() []string {
return []string{EventSeatDefinitionChanged, EventSeatDefinitionRemoved, EventManifestAccepted, EventManifestRefused, EventCatalogRevision, EventFilling, EventFull, EventRoom, EventRegistrationChanged, EventVersionReleased, EventVersionsFilled}
return []string{EventSeatDefinitionChanged, EventSeatDefinitionRemoved, EventCatalogRevision, EventFilling, EventFull, EventRoom, EventRegistrationChanged, EventVersionReleased, EventVersionsFilled}
}
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
@@ -68,12 +66,6 @@ const SubjectSeatDefinitionChanged = "mesh.seat.mesh-catalog.event.seat-definiti
// SubjectSeatDefinitionRemoved is where seat-definition-removed is published.
const SubjectSeatDefinitionRemoved = "mesh.seat.mesh-catalog.event.seat-definition-removed"
// SubjectManifestAccepted is where manifest-accepted is published.
const SubjectManifestAccepted = "mesh.seat.mesh-catalog.event.manifest-accepted"
// SubjectManifestRefused is where manifest-refused is published.
const SubjectManifestRefused = "mesh.seat.mesh-catalog.event.manifest-refused"
// SubjectCatalogRevision is where catalog-revision is published, on mesh.seat.mesh-catalog.event.catalog-revision.<branch>.
func SubjectCatalogRevision(branch string) string {
return "mesh.seat.mesh-catalog.event.catalog-revision." + branch
@@ -940,6 +932,8 @@ type StepStatuses struct {
Review string `json:"review,omitempty"`
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
Unit string `json:"unit,omitempty"`
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
Validate string `json:"validate,omitempty"`
}
// The values of StepStatuses's approval.
@@ -984,6 +978,13 @@ const (
StepStatusesUnitBypass = "bypass"
)
// The values of StepStatuses's validate.
const (
StepStatusesValidateRequired = "required"
StepStatusesValidateOptional = "optional"
StepStatusesValidateBypass = "bypass"
)
// ToolchainUsed is a toolchain a fingerprint was computed with (ADR 0405 clause 7).
type ToolchainUsed struct {
Language string `json:"language"`
@@ -1034,107 +1035,43 @@ type VersionEntry struct {
Version string `json:"version"`
}
// TakeInEntry is one module of a taken-in revision (design 47 G section 476, section 648).
// TakeInEntry is one mover of a taken-in source revision (design 47 H §743, §763).
type TakeInEntry struct {
Commit string `json:"commit"`
// the module's build-input fingerprint at the commit
Fingerprint string `json:"fingerprint"`
Module string `json:"module"`
// from a merged message; absent for a pushed one (design 47 G section 648)
Pull int64 `json:"pull,omitempty"`
// from a merged message; absent for a pushed one (design 47 G section 648)
Repository string `json:"repository,omitempty"`
}
// TakeInMember is one pull request at one commit.
type TakeInMember struct {
Head string `json:"head"`
Number int64 `json:"number"`
// the repository the module is registered for
Repository string `json:"repository"`
}
// TakeInMerge is one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it.
type TakeInMerge struct {
Merge string `json:"merge"`
Number int64 `json:"number"`
Repository string `json:"repository"`
}
// TakeInPending is 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).
// TakeInPending is the body of the indexer's take-in.pending: a source revision's take-in held, said once per source (design 47 H §744).
type TakeInPending struct {
// the watched branch the revision is of (design 47 G section 476, section 493)
Branch string `json:"branch,omitempty"`
// who acted by hand, on a taken event
By string `json:"by,omitempty"`
// a hand drop: the merges are not taken in
Dropped bool `json:"dropped,omitempty"`
// the delivery group, for a group being gathered
Group string `json:"group,omitempty"`
// the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered
Key string `json:"key"`
// the event's kind, pending or taken
Kind string `json:"kind"`
// the keys of merges whose message the forge bridge's stream no longer holds
Lost []string `json:"lost,omitempty"`
// every approved member of a group with its head
Members []TakeInMember `json:"members,omitempty"`
// the merges it holds, oldest first
Merges []TakeInMerge `json:"merges"`
// why the indexer holds a merge it does not take in although no indexer build is named
OwnBuildUnknown string `json:"own-build-unknown,omitempty"`
// why the manifest of the indexer the revision names was refused
Refused string `json:"refused,omitempty"`
// when the wait began
Since time.Time `json:"since"`
// the layout version
V int64 `json:"v"`
// the indexer build a revision waits for
WaitsFor string `json:"waits-for,omitempty"`
// what waits: a revision or a group
What string `json:"what"`
// why they acted by hand, on a taken event
Why string `json:"why,omitempty"`
// the watched branch
Branch string `json:"branch"`
// the source revision held
Source int64 `json:"source"`
// why it cannot be written, such as the catalog store full
Why string `json:"why"`
}
// TakeInTaken is 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).
// TakeInTaken is the body of the indexer's take-in.taken: a source revision taken in, said once, with one entry per mover (design 47 H §743, §744).
type TakeInTaken struct {
// the watched branch the revision is of (design 47 G section 476, section 493)
Branch string `json:"branch,omitempty"`
// who acted by hand, on a taken event
// the watched branch
Branch string `json:"branch"`
// who acted by hand
By string `json:"by,omitempty"`
// a hand drop: the merges are not taken in
Dropped bool `json:"dropped,omitempty"`
// one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493)
// the merge call the source revision names
Call string `json:"call"`
// one entry per mover; none for a take-in with no mover or a skip
Entries []TakeInEntry `json:"entries,omitempty"`
// the delivery group, for a group being gathered
Group string `json:"group,omitempty"`
// the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered
Key string `json:"key"`
// the event's kind, pending or taken
Kind string `json:"kind"`
// the keys of merges whose message the forge bridge's stream no longer holds
Lost []string `json:"lost,omitempty"`
// every approved member of a group with its head
Members []TakeInMember `json:"members,omitempty"`
// the merges it holds, oldest first
Merges []TakeInMerge `json:"merges"`
// why the indexer holds a merge it does not take in although no indexer build is named
OwnBuildUnknown string `json:"own-build-unknown,omitempty"`
// why the manifest of the indexer the revision names was refused
Refused string `json:"refused,omitempty"`
// the catalog graph revision of the branch the take-in made, which the pipelines of its entries start at (design 47 G section 476, A-448)
// the catalog revision of the branch the take-in wrote; absent for a skip
Revision int64 `json:"revision,omitempty"`
// when the wait began
Since time.Time `json:"since"`
// the source revision taken in (design 47 G section 476)
Source int64 `json:"source,omitempty"`
// the layout version
V int64 `json:"v"`
// the indexer build a revision waits for
WaitsFor string `json:"waits-for,omitempty"`
// what waits: a revision or a group
What string `json:"what"`
// why they acted by hand, on a taken event
// acknowledged unwritten by the tool indexer_take_in_skip (design 47 H §744)
Skipped bool `json:"skipped,omitempty"`
// the source revision taken in
Source int64 `json:"source"`
// why they acted by hand
Why string `json:"why,omitempty"`
}
@@ -1391,40 +1328,6 @@ type SeatDefinitionRemovedEvent struct {
Seat string `json:"seat"`
}
// ManifestAcceptedEventBusStateItem is a type of the contract.
type ManifestAcceptedEventBusStateItem struct {
Configuration map[string]any `json:"configuration,omitempty"`
Name string `json:"name"`
Options map[string]any `json:"options,omitempty"`
Storage string `json:"storage"`
Template string `json:"template,omitempty"`
Types []map[string]any `json:"types,omitempty"`
}
// ManifestAcceptedEvent is the body of the event manifest-accepted.
type ManifestAcceptedEvent struct {
BusState []ManifestAcceptedEventBusStateItem `json:"bus-state"`
Digest string `json:"digest"`
Judge string `json:"judge"`
Module string `json:"module"`
// 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)
Problems []string `json:"problems"`
// the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it
Revision int64 `json:"revision,omitempty"`
V int64 `json:"v"`
}
// ManifestRefusedEvent is the body of the event manifest-refused.
type ManifestRefusedEvent struct {
Digest string `json:"digest"`
Judge string `json:"judge"`
Module string `json:"module"`
Problems []string `json:"problems"`
// the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it
Revision int64 `json:"revision,omitempty"`
V int64 `json:"v"`
}
// CatalogRevisionEvent is the body of the event catalog-revision.
type CatalogRevisionEvent struct {
At *time.Time `json:"at,omitempty"`
@@ -638,115 +638,6 @@
]
}
},
{
"name": "manifest-accepted",
"body": {
"type": "object",
"properties": {
"v": {
"type": "integer"
},
"module": {
"type": "string"
},
"digest": {
"type": "string"
},
"judge": {
"type": "string"
},
"revision": {
"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": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"storage": {
"type": "string"
},
"template": {
"type": "string"
},
"options": {
"type": "object"
},
"configuration": {
"type": "object"
},
"types": {
"type": "array",
"items": {
"type": "object"
}
}
},
"required": [
"name",
"storage"
]
}
}
},
"required": [
"v",
"module",
"digest",
"judge",
"bus-state",
"problems"
]
}
},
{
"name": "manifest-refused",
"body": {
"type": "object",
"properties": {
"v": {
"type": "integer"
},
"module": {
"type": "string"
},
"digest": {
"type": "string"
},
"judge": {
"type": "string"
},
"revision": {
"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"
}
}
},
"required": [
"v",
"module",
"digest",
"judge",
"problems"
]
}
},
{
"name": "catalog-revision",
"body": {
@@ -2194,6 +2085,15 @@
],
"description": "required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed"
},
"validate": {
"type": "string",
"enum": [
"required",
"optional",
"bypass"
],
"description": "required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed"
},
"composition": {
"type": "string",
"enum": [
@@ -2638,49 +2538,9 @@
}
},
"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)",
"description": "one mover of a taken-in source revision (design 47 H §743, §763)",
"properties": {
"module": {
"type": "string"
@@ -2694,208 +2554,83 @@
},
"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)"
"description": "the repository the module is registered for"
}
},
"required": [
"module",
"commit",
"fingerprint"
"fingerprint",
"repository"
]
},
"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)",
"description": "the body of the indexer's take-in.pending: a source revision's take-in held, said once per source (design 47 H §744)",
"properties": {
"v": {
"branch": {
"type": "string",
"description": "the watched branch"
},
"source": {
"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"
"description": "the source revision held"
},
"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)"
"description": "why it cannot be written, such as the catalog store full"
}
},
"required": [
"v",
"kind",
"key",
"what",
"merges",
"since"
"branch",
"source",
"why"
]
},
"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)",
"description": "the body of the indexer's take-in.taken: a source revision taken in, said once, with one entry per mover (design 47 H §743, §744)",
"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"
},
"revision": {
"type": "integer",
"description": "the catalog graph revision of the branch the take-in made, which the pipelines of its entries start at (design 47 G section 476, A-448)"
},
"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)"
"description": "the watched branch"
},
"source": {
"type": "integer",
"description": "the source revision taken in (design 47 G section 476)"
"description": "the source revision taken in"
},
"revision": {
"type": "integer",
"description": "the catalog revision of the branch the take-in wrote; absent for a skip"
},
"call": {
"type": "string",
"description": "the merge call the source revision names"
},
"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)"
"description": "one entry per mover; none for a take-in with no mover or a skip"
},
"skipped": {
"type": "boolean",
"description": "acknowledged unwritten by the tool indexer_take_in_skip (design 47 H §744)"
},
"by": {
"type": "string",
"description": "who acted by hand"
},
"why": {
"type": "string",
"description": "why they acted by hand"
}
},
"required": [
"v",
"kind",
"key",
"what",
"merges",
"since"
"branch",
"source",
"call"
]
}
}
@@ -25,8 +25,6 @@ export declare const verbs: {
export declare const events: {
readonly seatDefinitionChanged: "seat-definition-changed";
readonly seatDefinitionRemoved: "seat-definition-removed";
readonly manifestAccepted: "manifest-accepted";
readonly manifestRefused: "manifest-refused";
readonly catalogRevision: "catalog-revision";
readonly filling: "filling";
readonly full: "full";
@@ -42,10 +40,6 @@ export declare const seatDefinitionChangedSubject: "mesh.seat.mesh-catalog.event
export declare const seatDefinitionRemovedSubject: "mesh.seat.mesh-catalog.event.seat-definition-removed";
export declare const manifestAcceptedSubject: "mesh.seat.mesh-catalog.event.manifest-accepted";
export declare const manifestRefusedSubject: "mesh.seat.mesh-catalog.event.manifest-refused";
export declare function catalogRevisionSubject(branch: string): string;
export declare const catalogRevisionSubjectAll: "mesh.seat.mesh-catalog.event.catalog-revision.*";
@@ -462,6 +456,8 @@ export interface StepStatuses {
"review"?: "required" | "optional" | "bypass";
/** required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed */
"unit"?: "required" | "optional" | "bypass";
/** required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed */
"validate"?: "required" | "optional" | "bypass";
}
/** a toolchain a fingerprint was computed with (ADR 0405 clause 7) */
@@ -513,107 +509,43 @@ export interface VersionEntry {
"version": string;
}
/** one module of a taken-in revision (design 47 G section 476, section 648) */
/** one mover of a taken-in source revision (design 47 H §743, §763) */
export interface TakeInEntry {
"commit": string;
/** the module's build-input fingerprint at the commit */
"fingerprint": string;
"module": string;
/** from a merged message; absent for a pushed one (design 47 G section 648) */
"pull"?: number;
/** from a merged message; absent for a pushed one (design 47 G section 648) */
"repository"?: string;
}
/** one pull request at one commit */
export interface TakeInMember {
"head": string;
"number": number;
/** the repository the module is registered for */
"repository": string;
}
/** one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it */
export interface TakeInMerge {
"merge": string;
"number": number;
"repository": string;
}
/** 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) */
/** the body of the indexer's take-in.pending: a source revision's take-in held, said once per source (design 47 H §744) */
export interface TakeInPending {
/** the watched branch the revision is of (design 47 G section 476, section 493) */
"branch"?: string;
/** who acted by hand, on a taken event */
"by"?: string;
/** a hand drop: the merges are not taken in */
"dropped"?: boolean;
/** the delivery group, for a group being gathered */
"group"?: string;
/** the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered */
"key": string;
/** the event's kind, pending or taken */
"kind": string;
/** the keys of merges whose message the forge bridge's stream no longer holds */
"lost"?: string[];
/** every approved member of a group with its head */
"members"?: TakeInMember[];
/** the merges it holds, oldest first */
"merges": TakeInMerge[];
/** why the indexer holds a merge it does not take in although no indexer build is named */
"own-build-unknown"?: string;
/** why the manifest of the indexer the revision names was refused */
"refused"?: string;
/** when the wait began */
"since": string;
/** the layout version */
"v": number;
/** the indexer build a revision waits for */
"waits-for"?: string;
/** what waits: a revision or a group */
"what": string;
/** why they acted by hand, on a taken event */
"why"?: string;
/** the watched branch */
"branch": string;
/** the source revision held */
"source": number;
/** why it cannot be written, such as the catalog store full */
"why": string;
}
/** 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) */
/** the body of the indexer's take-in.taken: a source revision taken in, said once, with one entry per mover (design 47 H §743, §744) */
export interface TakeInTaken {
/** the watched branch the revision is of (design 47 G section 476, section 493) */
"branch"?: string;
/** who acted by hand, on a taken event */
/** the watched branch */
"branch": string;
/** who acted by hand */
"by"?: string;
/** a hand drop: the merges are not taken in */
"dropped"?: boolean;
/** one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493) */
/** the merge call the source revision names */
"call": string;
/** one entry per mover; none for a take-in with no mover or a skip */
"entries"?: TakeInEntry[];
/** the delivery group, for a group being gathered */
"group"?: string;
/** the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered */
"key": string;
/** the event's kind, pending or taken */
"kind": string;
/** the keys of merges whose message the forge bridge's stream no longer holds */
"lost"?: string[];
/** every approved member of a group with its head */
"members"?: TakeInMember[];
/** the merges it holds, oldest first */
"merges": TakeInMerge[];
/** why the indexer holds a merge it does not take in although no indexer build is named */
"own-build-unknown"?: string;
/** why the manifest of the indexer the revision names was refused */
"refused"?: string;
/** the catalog graph revision of the branch the take-in made, which the pipelines of its entries start at (design 47 G section 476, A-448) */
/** the catalog revision of the branch the take-in wrote; absent for a skip */
"revision"?: number;
/** when the wait began */
"since": string;
/** the source revision taken in (design 47 G section 476) */
"source"?: number;
/** the layout version */
"v": number;
/** the indexer build a revision waits for */
"waits-for"?: string;
/** what waits: a revision or a group */
"what": string;
/** why they acted by hand, on a taken event */
/** acknowledged unwritten by the tool indexer_take_in_skip (design 47 H §744) */
"skipped"?: boolean;
/** the source revision taken in */
"source": number;
/** why they acted by hand */
"why"?: string;
}
@@ -866,39 +798,6 @@ export interface SeatDefinitionRemovedEvent {
"seat": string;
}
export interface ManifestAcceptedEventBusStateItem {
"configuration"?: Record<string, unknown>;
"name": string;
"options"?: Record<string, unknown>;
"storage": string;
"template"?: string;
"types"?: Record<string, unknown>[];
}
/** is the body of the event manifest-accepted. */
export interface ManifestAcceptedEvent {
"bus-state": ManifestAcceptedEventBusStateItem[];
"digest": string;
"judge": string;
"module": string;
/** 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) */
"problems": string[];
/** the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it */
"revision"?: number;
"v": number;
}
/** is the body of the event manifest-refused. */
export interface ManifestRefusedEvent {
"digest": string;
"judge": string;
"module": string;
"problems": string[];
/** the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it */
"revision"?: number;
"v": number;
}
/** is the body of the event catalog-revision. */
export interface CatalogRevisionEvent {
"at"?: string;
@@ -25,8 +25,6 @@ export const verbs = {
export const events = {
seatDefinitionChanged: "seat-definition-changed",
seatDefinitionRemoved: "seat-definition-removed",
manifestAccepted: "manifest-accepted",
manifestRefused: "manifest-refused",
catalogRevision: "catalog-revision",
filling: "filling",
full: "full",
@@ -42,10 +40,6 @@ export const seatDefinitionChangedSubject = "mesh.seat.mesh-catalog.event.seat-d
export const seatDefinitionRemovedSubject = "mesh.seat.mesh-catalog.event.seat-definition-removed";
export const manifestAcceptedSubject = "mesh.seat.mesh-catalog.event.manifest-accepted";
export const manifestRefusedSubject = "mesh.seat.mesh-catalog.event.manifest-refused";
export function catalogRevisionSubject(branch) {
return "mesh.seat.mesh-catalog.event.catalog-revision." + branch;
}