the ring reads out over ipc as turn decisions (V-564)

Same shape as TickTrace and RecentEvents: a bounded daemon ring, so the store
adapter refuses rather than pretending a table exists. No voice wiring means an
empty list and not an error, because a box with no voice path has had no turns
to arbitrate.
This commit is contained in:
2026-08-06 00:52:48 +04:00
parent 3e6a427e85
commit a5b245dbf5
9 changed files with 70 additions and 0 deletions
+7
View File
@@ -583,6 +583,13 @@ var methodTable = map[Method]handlerFunc{
MethodTickTrace: withoutParams(func(ctx context.Context, api CoreAPI) (TickTrace, error) {
return api.TickTrace(ctx)
}),
MethodTurnDecisions: withParams(func(ctx context.Context, api CoreAPI, p nReq) ([]TurnDecision, error) {
d, err := api.TurnDecisions(ctx, p.N)
if d == nil {
d = []TurnDecision{}
}
return d, err
}),
// MorningStatus intentionally has no nil→[]T{} normalization here — the
// pre-table arm marshaled api.MorningStatus's result as-is (a nil slice
// serializes as JSON null), and this preserves that exact wire shape.