T1a verb-timeout-ask: a bundle's ask waits the timeout its verb's definition names
The runner reads the `timeout` (whole seconds) of a seat's verb from the seat list's definitions beside `chunked` and hands it to the bus connection's ask (AskWithin, AskAsWithin, AskAsChunkedWithin); a verb that names none, a seat the definitions do not hold and a module's tool wait the runner's own bound, RequestTimeout. Builds: design 47 H §760, H-A-43 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -876,7 +876,7 @@ type consumers struct {
|
||||
rereadMu sync.Mutex
|
||||
rereading *rereadFlight
|
||||
// askPlain and askChunked are how a bundle's ask is sent (the bus connection's AskAs and AskAsChunked); a test gives its own.
|
||||
askPlain, askChunked func(module, key string, body any) (bus.Answered, error)
|
||||
askPlain, askChunked func(module, key string, body any, within time.Duration) (bus.Answered, error)
|
||||
}
|
||||
|
||||
type moduleEvents struct {
|
||||
@@ -1007,7 +1007,7 @@ func (b *moduleBus) Ask(params json.RawMessage) (json.RawMessage, error) {
|
||||
}
|
||||
ask := b.all.askPlain
|
||||
if ask == nil {
|
||||
ask = b.all.conn.AskAs
|
||||
ask = b.all.conn.AskAsWithin
|
||||
}
|
||||
chunks, err := b.all.chunkedAsked(asked.Key)
|
||||
if err != nil {
|
||||
@@ -1015,11 +1015,11 @@ func (b *moduleBus) Ask(params json.RawMessage) (json.RawMessage, error) {
|
||||
}
|
||||
if chunks {
|
||||
if ask = b.all.askChunked; ask == nil {
|
||||
ask = b.all.conn.AskAsChunked
|
||||
ask = b.all.conn.AskAsChunkedWithin
|
||||
}
|
||||
// the runner receives the chunks of the answer; the bundle receives none (design 47 G A-249)
|
||||
}
|
||||
answered, err := ask(b.module, asked.Key, body)
|
||||
answered, err := ask(b.module, asked.Key, body, b.all.withinOf(asked.Key))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user