fix: harden PCB and iCDB verification lifecycle for beta release

This commit is contained in:
阿白叔 committed 2026-10-26 15:32:01 +08:00
1 parent 11a2b2e46e
commit a11eb3c766
33 files changed
+1226 -267

No files matched your search

+6 -6
View File
@@ -17,7 +17,7 @@ def test_parse_icdb_server_address_extracts_port_and_hosts(tmp_path):
}
def test_stale_icdb_address_is_moved_to_evidence(tmp_path, monkeypatch):
def test_unreachable_icdb_address_is_preserved(tmp_path, monkeypatch):
from cbb_refresh_verify import mentor_adapter
database = tmp_path / "database"
@@ -33,12 +33,12 @@ def test_stale_icdb_address_is_moved_to_evidence(tmp_path, monkeypatch):
emit=lambda **event: events.append(event),
)
assert result["status"] == "STALE_MOVED"
assert not address.exists()
assert result["status"] == "UNREACHABLE"
assert address.exists()
moved = list((tmp_path / "evidence" / "diagnostics" / "cdbsvr").glob("sAddress.adr.stale-*"))
assert len(moved) == 1
assert moved[0].read_text(encoding="ascii") == "guid\n127.0.0.1\n10062\n1094\n"
assert events[-1]["stage"] == "icdb_address_stale"
assert len(moved) == 0
assert address.read_text(encoding="ascii") == "guid\n127.0.0.1\n10062\n1094\n"
assert events[-1]["stage"] == "icdb_address_check"
def test_live_icdb_address_is_left_in_place(tmp_path, monkeypatch):