fix: preserve accepted native calls and explain retained queue waits

This commit is contained in:
阿白叔 committed 2026-11-09 14:33:44 +08:00
1 parent d0a5ce5d17
commit 78ff118f82
13 files changed
+357 -30

No files matched your search

+4 -2
View File
@@ -122,7 +122,8 @@ def batch_cli(tmp_path, monkeypatch):
monkeypatch.setattr(reader, 'read_library_fast', lambda *a, **kw: LibraryReadResult((
CbbRecord('Ready', 'LP', status='READY'), CbbRecord('One', 'LP'),
CbbRecord('Two', 'LP'), CbbRecord('Three', 'LP'))))
def run(requests):
def run(requests, **kwargs):
assert kwargs.get('stop') is not None
requested.extend(request.block_name for request in requests)
return [VerifyResult('PASS') for _ in requests]
monkeypatch.setattr(runner, 'run_batch', run)
@@ -154,7 +155,8 @@ def test_batch_cli_rejects_nonpositive_limit(batch_cli, value):
@pytest.mark.parametrize('raised', [False, True])
def test_retained_mapping_logs_context_and_confirmed_release_guidance(batch_cli, monkeypatch, raised):
app, runner, log, _, retained = batch_cli
def run(_):
def run(_, **kwargs):
assert kwargs.get('stop') is not None
if raised: raise RuntimeError('native writer status unknown')
return [VerifyResult('FAIL', safe_to_continue=False)]
monkeypatch.setattr(runner, 'run_batch', run)