fix: guard ICDB diagnostics and exclude READY maintenance targets

This commit is contained in:
阿白叔 committed 2026-11-04 10:27:53 +08:00
1 parent 8180a8a302
commit ef652f3ada
9 files changed
+325 -156

No files matched your search

+4 -2
View File
@@ -65,6 +65,7 @@ class VerifyRequest:
auto_repair: bool = True
maintenance: bool = False
post_repair_proof: object | None = field(default=None, repr=False, compare=False)
diagnostic_only: bool = False
@dataclass(frozen=True)
@@ -757,7 +758,7 @@ def _run_verify(request, *, timing, progress=None, flag_reader=None, process_run
return finish(VerifyResult('BLOCKED', safe_to_continue=False,
stderr=f'ICDB_SESSION_UNCONFIRMED: 无法确认数据库所有权:{error}'))
content_check_enabled = bool(str(request.libspec).strip() and str(request.dms_login_config).strip())
content_check_enabled = not request.diagnostic_only and bool(str(request.libspec).strip() and str(request.dms_login_config).strip())
if content_check_enabled:
try:
executable = resolve_importer(request.mentor_bin)
@@ -801,6 +802,7 @@ def _run_verify(request, *, timing, progress=None, flag_reader=None, process_run
return finish(VerifyResult('BLOCKED', stderr=ports_detail))
job = {'lmc_file': str(absolute_preserving_drive(request.lmc_file)), 'block_name': request.block_name,
'diagnostic_only': request.diagnostic_only,
'supervisor_pid': os.getpid(),
'project': str(project), 'pcb': str(pcb), 'root': str(root), 'timeout': request.timeout_seconds,
'mentor_bin': str(request.mentor_bin or ''),
@@ -1100,7 +1102,7 @@ def _run_verify(request, *, timing, progress=None, flag_reader=None, process_run
win32event.ReleaseMutex(mutex)
mutex.Close()
if result.status == 'PASS':
if result.status == 'PASS' and not request.diagnostic_only:
timing.begin('library_flag')
bridge_records = []
def record_attempt(record):