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

+11
View File
@@ -12,6 +12,17 @@ def test_phase_duration_uses_worker_monotonic_time_not_delayed_poll_time():
assert timer.snapshot()[0]['pcb_startup'] == 132.0
def test_opening_check_ends_startup_and_close_without_starting_integration():
timer = RunTimings(clock=lambda: 50.0)
timer.record({'stage': 'pcb_launch', 'monotonic_seconds': 10})
timer.record({'stage': 'diagnostic_native_loaded_candidate', 'monotonic_seconds': 30})
timer.record({'stage': 'diagnostic_complete', 'monotonic_seconds': 38})
values, unfinished = timer.snapshot()
assert values['pcb_startup'] == 20
assert values['diagnostic_close'] == 8
assert 'integration' not in values and not unfinished
def test_action_and_save_subtimings_accumulate_real_durations():
timer = RunTimings(clock=lambda: 1000.0)
timer.record({'stage': 'integration_action_complete', 'action': 'ForwardAnnotate',