fix: handle shared database proof and stale generated cell libraries

This commit is contained in:
阿白叔 committed 2026-11-23 18:33:41 +08:00
1 parent 4fb978ee21
commit 8e0f78979a
8 files changed
+378 -5

No files matched your search

+27 -1
View File
@@ -673,8 +673,34 @@ def _run_verify_task(request, *, progress=None, flag_reader=None, process_runner
request, progress=progress, flag_reader=flag_reader,
process_runner=process_runner, port_check=port_check,
dialog_supervisor_factory=dialog_supervisor_factory, version_prompt=version_prompt, stop=stop)
local_retry = None
if (library_lock is not None and result.error_category == 'MENTOR_LOCAL_CELL_LIBRARY'
and not request.diagnostic_only and not request.auto_repair and not request.native_lm_verify
and not request.interactive_input and request.post_repair_proof is None):
from .local_cell_library import preserve_failed_cache
release_confirmed = result.safe_to_continue
local_retry = preserve_failed_cache(request, result, stop=stop)
if local_retry is not None:
initial_seconds = result.timings_seconds.get('total', 0.0)
original_evidence = result.evidence_path
_notify_progress(progress, {'stage': 'local_cell_library_retry', 'block': request.block_name,
'detail': '已保留旧本地 Cell Library,重新打开一次让 Mentor 重建。'})
check_active()
release_confirmed = False
result = _run_verify_serialized(request, progress=progress, flag_reader=flag_reader,
process_runner=process_runner, port_check=port_check,
dialog_supervisor_factory=dialog_supervisor_factory, version_prompt=version_prompt, stop=stop)
local_retry.update(status='REBUILT_AND_VERIFIED' if result.status == 'PASS' else 'REVERIFY_FAILED',
retry_evidence=str(result.evidence_path or ''))
_write_optional_evidence(original_evidence.with_name('local-cell-library-retry.json'), local_retry)
retry_seconds = result.timings_seconds.get('total', 0.0)
result = replace(result, recovery_attempts=(*result.recovery_attempts, local_retry),
timings_seconds={**result.timings_seconds, 'initial_verify': initial_seconds,
'local_cell_library_retry': retry_seconds, 'total': initial_seconds + retry_seconds})
if result.evidence_path:
_write_optional_evidence(result.evidence_path, {'block_name': request.block_name, **asdict(result)})
facts = result.write_outcome or {}
if (not request.diagnostic_only and not request.auto_repair and request.post_repair_proof is None
if (local_retry is None and not request.diagnostic_only and not request.auto_repair and request.post_repair_proof is None
and result.status == 'FAIL' and result.safe_to_continue and result.evidence_path
and result.library_flag == 'NOT_GREEN' and result.error_stage == 'library_flag'
and result.error_category == 'MENTOR_VERIFY_NOT_COMMITTED'