IX17: the pinned event's catalog entries name their branch
Pins.catalog is a list of {branch, revision} in the mesh-delivery seat's definition (revisions are numbered per watched branch),
the Go and TypeScript contracts regenerated, the fixtures follow.
Builds: design 47 G §579, A-169, A-171
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -434,12 +434,20 @@ const (
|
||||
OwedActNote = "note"
|
||||
)
|
||||
|
||||
// PinsCatalogItem is one catalog graph revision, named by its watched branch and its number on the seat mesh-catalog (revisions are numbered per branch).
|
||||
type PinsCatalogItem struct {
|
||||
// the watched branch the revision belongs to
|
||||
Branch string `json:"branch"`
|
||||
// its number on that branch
|
||||
Revision int64 `json:"revision"`
|
||||
}
|
||||
|
||||
// Pins is the graph revisions a delivery record starts or stops pointing at.
|
||||
type Pins struct {
|
||||
// assignment graph revisions, by their number on the seat mesh-wants
|
||||
Assignment []int64 `json:"assignment,omitempty"`
|
||||
// catalog graph revisions, by their number on the seat mesh-catalog
|
||||
Catalog []int64 `json:"catalog,omitempty"`
|
||||
// catalog graph revisions, by watched branch and number on the seat mesh-catalog
|
||||
Catalog []PinsCatalogItem `json:"catalog,omitempty"`
|
||||
// the record's milestone
|
||||
Milestone string `json:"milestone"`
|
||||
// the record's id
|
||||
|
||||
@@ -21,9 +21,9 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v OwedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-delivery\\.event\\.owed\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "owed is said, a status", subject: "mesh.seat.mesh-delivery.event.owed.novox/mesh-sdk.178", given: "{\"act\":\"status\",\"context\":\"mesh/merge-gate\",\"description\":\"waits for the operator's Approve\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"id\":\"status.novox/mesh-sdk#178.aaaaaaaaaaaa.mesh/merge-gate\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"pending\",\"target\":\"https://forge.test/x\"}", wire: "{\"act\":\"status\",\"context\":\"mesh/merge-gate\",\"description\":\"waits for the operator's Approve\",\"head\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"id\":\"status.novox/mesh-sdk#178.aaaaaaaaaaaa.mesh/merge-gate\",\"number\":178,\"repository\":\"novox/mesh-sdk\",\"state\":\"pending\",\"target\":\"https://forge.test/x\"}",
|
||||
decode: func(b []byte) (any, error) { var v OwedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-delivery\\.event\\.owed\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "pinned is said", subject: "mesh.seat.mesh-delivery.event.pinned", given: "{\"assignment\":[1204],\"catalog\":[3610],\"milestone\":\"47/G\",\"record\":\"47-G\"}", wire: "{\"assignment\":[1204],\"catalog\":[3610],\"milestone\":\"47/G\",\"record\":\"47-G\"}",
|
||||
{name: "pinned is said", subject: "mesh.seat.mesh-delivery.event.pinned", given: "{\"assignment\":[1204],\"catalog\":[{\"branch\":\"main\",\"revision\":3610}],\"milestone\":\"47/G\",\"record\":\"47-G\"}", wire: "{\"assignment\":[1204],\"catalog\":[{\"branch\":\"main\",\"revision\":3610}],\"milestone\":\"47/G\",\"record\":\"47-G\"}",
|
||||
decode: func(b []byte) (any, error) { var v PinnedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-delivery\\.event\\.pinned$")},
|
||||
{name: "freed is said", subject: "mesh.seat.mesh-delivery.event.freed", given: "{\"assignment\":[1204],\"catalog\":[3610],\"milestone\":\"47/G\",\"record\":\"47-G\",\"why\":\"past its retention of 90 days\"}", wire: "{\"assignment\":[1204],\"catalog\":[3610],\"milestone\":\"47/G\",\"record\":\"47-G\",\"why\":\"past its retention of 90 days\"}",
|
||||
{name: "freed is said", subject: "mesh.seat.mesh-delivery.event.freed", given: "{\"assignment\":[1204],\"catalog\":[{\"branch\":\"main\",\"revision\":3610}],\"milestone\":\"47/G\",\"record\":\"47-G\",\"why\":\"past its retention of 90 days\"}", wire: "{\"assignment\":[1204],\"catalog\":[{\"branch\":\"main\",\"revision\":3610}],\"milestone\":\"47/G\",\"record\":\"47-G\",\"why\":\"past its retention of 90 days\"}",
|
||||
decode: func(b []byte) (any, error) { var v FreedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-delivery\\.event\\.freed$")},
|
||||
{name: "heads-replaced is said", subject: "mesh.seat.mesh-delivery.event.heads-replaced", given: "{\"at\":\"2026-11-09T20:05:00Z\",\"group\":\"feat/47-G\",\"head\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"heads\":\"0123456789ab\",\"number\":178,\"repository\":\"novox/mesh-sdk\"}", wire: "{\"at\":\"2026-11-09T20:05:00Z\",\"group\":\"feat/47-G\",\"head\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\"heads\":\"0123456789ab\",\"number\":178,\"repository\":\"novox/mesh-sdk\"}",
|
||||
decode: func(b []byte) (any, error) { var v HeadsReplacedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-delivery\\.event\\.heads-replaced$")},
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
"record": "47-G",
|
||||
"milestone": "47/G",
|
||||
"catalog": [
|
||||
3610
|
||||
{
|
||||
"branch": "main",
|
||||
"revision": 3610
|
||||
}
|
||||
],
|
||||
"assignment": [
|
||||
1204
|
||||
@@ -53,7 +56,10 @@
|
||||
"record": "47-G",
|
||||
"milestone": "47/G",
|
||||
"catalog": [
|
||||
3610
|
||||
{
|
||||
"branch": "main",
|
||||
"revision": 3610
|
||||
}
|
||||
],
|
||||
"assignment": [
|
||||
1204
|
||||
|
||||
@@ -1055,9 +1055,24 @@
|
||||
"catalog": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
"type": "object",
|
||||
"description": "one catalog graph revision, named by its watched branch and its number on the seat mesh-catalog (revisions are numbered per branch)",
|
||||
"properties": {
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch the revision belongs to"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "its number on that branch"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"branch",
|
||||
"revision"
|
||||
]
|
||||
},
|
||||
"description": "catalog graph revisions, by their number on the seat mesh-catalog"
|
||||
"description": "catalog graph revisions, by watched branch and number on the seat mesh-catalog"
|
||||
},
|
||||
"assignment": {
|
||||
"type": "array",
|
||||
|
||||
@@ -217,12 +217,20 @@ export interface Owed {
|
||||
"text"?: string;
|
||||
}
|
||||
|
||||
/** one catalog graph revision, named by its watched branch and its number on the seat mesh-catalog (revisions are numbered per branch) */
|
||||
export interface PinsCatalogItem {
|
||||
/** the watched branch the revision belongs to */
|
||||
"branch": string;
|
||||
/** its number on that branch */
|
||||
"revision": number;
|
||||
}
|
||||
|
||||
/** the graph revisions a delivery record starts or stops pointing at */
|
||||
export interface Pins {
|
||||
/** assignment graph revisions, by their number on the seat mesh-wants */
|
||||
"assignment"?: number[];
|
||||
/** catalog graph revisions, by their number on the seat mesh-catalog */
|
||||
"catalog"?: number[];
|
||||
/** catalog graph revisions, by watched branch and number on the seat mesh-catalog */
|
||||
"catalog"?: PinsCatalogItem[];
|
||||
/** the record's milestone */
|
||||
"milestone": string;
|
||||
/** the record's id */
|
||||
|
||||
Reference in New Issue
Block a user