T4: the runtime answers mesh/queue.waiting, a holder's own queue read without consuming

mesh/queue.waiting {seat} answers {asks: [{id, module, age_seconds}], capped}: for each worker the
holder's membership lists on the seat's stream, every message after the worker's delivered
sequence, read by a direct get by subject, never consumed; at most 768 KB; refused for a seat the
module holds no queue of (ADR 0596: a holder reads its own store).

Builds: design 47 H2 §777, H-A-410
This commit is contained in:
2026-11-22 00:58:23 +01:00
parent bebf2538db
commit 917195a302
4 changed files with 157 additions and 2 deletions
+12 -2
View File
@@ -1441,8 +1441,10 @@ type seatAsked struct {
Body json.RawMessage `json:"body"`
ID string `json:"id"`
Worker string `json:"worker"`
Bucket string `json:"bucket"`
Key string `json:"key"`
// Seat is the seat whose work queue a waiting read reads (design 47 H2 H-A-410).
Seat string `json:"seat"`
Bucket string `json:"bucket"`
Key string `json:"key"`
// WaitMS is how long a pull waits for a message (none when 0); Fate what a settle gives one (issue 1887 A11).
WaitMS int `json:"wait_ms"`
// DelayMS is how long a settle with the fate nak-after waits before the bus gives the message again.
@@ -1481,6 +1483,14 @@ func (b *moduleBus) Seat(verb string, params json.RawMessage, handOn func(string
return json.RawMessage("null"), err
}
return json.Marshal(entry)
case "waiting":
// mesh/queue.waiting: the asks that wait on the holder's own queue of a seat, read without consuming them (design 47
// H2 H-A-410, ADR 0596).
waiting, err := conn.QueueWaitingOf(b.module, asked.Seat)
if err != nil {
return nil, err
}
return json.Marshal(waiting)
case "pull":
// One message from a worker the membership lists, never a prefetch: a build module pulls an ask only when it
// has room, from its workers in their order (novox/hq ADR 0525 §4; issue 1887 A11).