Make a ledger regression fail the scenario harness instead of hanging it

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 15:49:21 +02:00
commit 9ab4ab4519

View file

@ -45,8 +45,11 @@ internal sealed class EditorProbe : IDisposable
internal async Task TickAsync()
{
await ledger.PullAsync();
var drained = 0;
while (ledger.TryNextPending(out var command))
{
if (++drained > 10000)
throw new InvalidOperationException("The ledger keeps offering answered intents; a regression would otherwise hang the suite.");
Executed.Add(command);
await node.Database.PutAsync(
BrokkrCommandLedger.ReceiptKey(command.commandId),