feat: integrate native diagnostics and coordinated CBB transactions

This commit is contained in:
阿白叔 committed 2026-11-05 23:18:00 +08:00
1 parent 9e230e1a46
commit da67de026f
91 files changed
+14370 -435

No files matched your search

+6 -5
View File
@@ -258,7 +258,7 @@ def test_native_log_capture_generates_only_fresh_repair_evidence(tmp_path, name)
assert log.read_text('utf-8') == ERROR
def test_contents_session_loss_stops_batch_before_any_pcb_launch(tmp_path, monkeypatch):
def test_contents_session_loss_records_each_item_without_launching_pcb_or_repair(tmp_path, monkeypatch):
from test_verify_runner import fixture, request
fixture(tmp_path)
monkeypatch.setattr(runner, 'resolve_importer', lambda *_: Path('ReuseBlockImporter.exe'))
@@ -269,11 +269,12 @@ def test_contents_session_loss_stops_batch_before_any_pcb_launch(tmp_path, monke
results = runner.run_batch([request(tmp_path, libspec='EE', dms_login_config='login')]*2,
verifier=lambda req: runner.run_verify(req, process_runner=content_check,
port_check=lambda: pytest.fail('PCB must not start')))
assert len(calls) == 1
assert len(calls) == 2
assert results[0].error_category == 'ICDB_REPAIR_REQUIRED'
assert results[0].safe_to_continue is False
assert results[0].safe_to_continue is True
assert 'Repair project' in results[0].stderr
assert results[1].status == 'SKIPPED'
assert results[1].status == 'FAIL'
assert results[1].error_category == 'ICDB_REPAIR_REQUIRED'
def test_supervisor_enriches_generic_failure_from_fresh_native_log(tmp_path, monkeypatch):
@@ -302,7 +303,7 @@ def test_supervisor_enriches_generic_failure_from_fresh_native_log(tmp_path, mon
monkeypatch.setattr('cbb_refresh_verify.verify_diagnostics.capture_failure_logs_with_timeout', failure_logs_main)
result = runner.run_verify(request(tmp_path), port_check=lambda: (True, ''))
assert result.error_category == 'ICDB_REPAIR_REQUIRED'
assert result.safe_to_continue is False
assert result.safe_to_continue is True
assert 'opening failed' in result.stderr
assert '200091-CBB' in result.stderr
assert '__ReusableBlocksSymb' in result.stderr