fix: recognize native startup journal order during recovery

This commit is contained in:
阿白叔 committed 2026-11-25 09:48:26 +08:00
1 parent 5bab125122
commit 806c1696ab
2 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -186,10 +186,13 @@ def test_restarted_verify_closes_exact_prewrite_orphan(tmp_path, monkeypatch, ob
import json
from contextlib import nullcontext
from types import SimpleNamespace
import win32event
from test_owned_idle_cleanup import owned_fixture
from cbb_refresh_verify import failed_session, residual_sessions
root, job, _, windows, state = owned_fixture(tmp_path, monkeypatch)
create_mutex = win32event.CreateMutex
monkeypatch.setattr(win32event, 'CreateMutex', lambda *args: create_mutex(None, False, None))
path = root/'session.json'
session = session_record.read_session_record(path, evidence_root=root)
supervisor = dict(pid=10, image='C:/App/CbbRefreshVerify.exe', created_handle='supervisor-created',
@@ -214,9 +217,9 @@ def test_restarted_verify_closes_exact_prewrite_orphan(tmp_path, monkeypatch, ob
if obstacle == 'wrong_pcb':
command = command.replace(job['pcb'], job['pcb'] + '.wrong')
rows = [dict(stage='startup_supervisor_no_write', **binding),
dict(stage='pcb_baseline', pids=[]),
dict(stage='startup_prewrite_ready', worker_identity=session['processes'][0],
baseline=dict(started_ns=42, files={}), **binding),
dict(stage='pcb_baseline', pids=[]),
dict(stage='pcb_worker_started', pcb_pid=12, command=command)]
if obstacle == 'possible_write':
rows.append(dict(stage='startup_supervisor_write_possible', **binding))