feat: enable validated pinned native Add and replacement routes
This commit is contained in:
1 parent
f21781f170
commit
e915aaa865
6 files changed
+60
-12
No files matched your search
@@ -17,7 +17,7 @@ from .scoped_manifest import ManifestScope, build_manifest, hash_file
|
||||
POLICY = 'mentor795-native-content-v1'
|
||||
COVERAGE = {'logical_connectivity_and_properties': 'native hierarchy/flat ASCII and CSV',
|
||||
'physical_design_and_primary_assets': 'raw SHA256',
|
||||
'schematic_graphical_geometry': 'native EDIF schematic', 'production_acceptance': False}
|
||||
'schematic_graphical_geometry': 'native EDIF schematic', 'production_acceptance': True}
|
||||
EXPORTER_PROOF = {
|
||||
'icdb2ascii.exe': 'e37c87356eaf57c0b97e4183458bc8c5eb6eb0ac497cc7ad40dcd585d8cd213b',
|
||||
'icdb2csv.exe': '22059f4a432e8eabf30a5326ebcbd463ed6fa6495af21d7aad5ab5d2f892f255',
|
||||
|
||||
@@ -21,9 +21,10 @@ from .scoped_manifest import hash_file
|
||||
from .network_path import absolute_preserving_drive
|
||||
|
||||
_retained_workers = []
|
||||
# Promotion requires coordinator-owned native CRUD evidence, in a separate change.
|
||||
_PRODUCTION_ADD_VALIDATED = False
|
||||
_PRODUCTION_UPDATE_VALIDATED = False
|
||||
# Coordinator-owned Create/Add/conflict/update/remove/backup-reimport evidence:
|
||||
# diagnostics/issue2-native-crud-20261103/engine-e2e/cycle-result.json
|
||||
_PRODUCTION_ADD_VALIDATED = True
|
||||
_PRODUCTION_UPDATE_VALIDATED = True
|
||||
_BINARY_PROOF = {
|
||||
'lm/win32/bin/CleanWGLib.exe': '7808ded326555f1fd5d5c14f68803dbb4f970d624f9ad6e1c7982dc9ed867917',
|
||||
'lm/win32/bin/LibraryManager.exe': 'a9c4c3d806794dbdc56d2bc4c637a1cf25e87e98644a7d5fd4eb0067ca5845e0',
|
||||
@@ -85,16 +86,22 @@ class NativeManagementAdapter:
|
||||
return {
|
||||
'remove': Capability(not reason, reason or 'CleanWGLib/F4 route ready.'),
|
||||
'add': Capability(not reason, reason or 'Library Manager Logical-Physical Add route ready.'),
|
||||
'update': Capability(False, 'Update remains remove plus Add while identity readback is gated.'),
|
||||
'update': Capability(False, 'Update is composed from Remove and Add; there is no separate native Update call.'),
|
||||
}
|
||||
|
||||
def capabilities(self):
|
||||
reason = self._binary_capability()
|
||||
add_reason = reason
|
||||
if not add_reason:
|
||||
from .native_engineering_identity import check_exporters
|
||||
try: check_exporters(self.home)
|
||||
except (ValueError, OSError, TypeError) as error: add_reason = str(error)
|
||||
return {
|
||||
'remove': Capability(not reason, reason or '已验证 CleanWGLib/F4;仅 ASCII 名称、Logical-Physical 和 DxDesigner 库。'),
|
||||
'add': Capability(not reason and _PRODUCTION_ADD_VALIDATED, '原生新增及工程身份已有隔离证据;完整事务验证通过前生产新增保持禁用。'),
|
||||
'update': Capability(not reason and _PRODUCTION_ADD_VALIDATED and _PRODUCTION_UPDATE_VALIDATED,
|
||||
'同名更新需要原生移除、重新导入及完整端到端隔离验证,目前不可用。'),
|
||||
'add': Capability(not add_reason and _PRODUCTION_ADD_VALIDATED, add_reason or
|
||||
'已验证 EE7.9.5 原生导入及完整工程复读;仅 ASCII 名称、Logical-Physical 和 DxDesigner 库。'),
|
||||
'update': Capability(not add_reason and _PRODUCTION_ADD_VALIDATED and _PRODUCTION_UPDATE_VALIDATED,
|
||||
add_reason or '已验证同名原生替换:完整备份后移除并重新导入,失败时保留恢复证据。'),
|
||||
}
|
||||
|
||||
def _worker(self, job, evidence):
|
||||
@@ -198,7 +205,7 @@ class NativeManagementAdapter:
|
||||
return NativeOutcome(bool(result.get('success')), bool(result.get('safe_to_continue')), result.get('detail', ''))
|
||||
|
||||
def preflight(self, request, catalog):
|
||||
if request.operation in ('remove', 'update'):
|
||||
if request.operation in ('add', 'remove', 'update'):
|
||||
removal_input(request.name, request.partition)
|
||||
if request.partition != 'Logical-Physical' or catalog.flow != 1:
|
||||
raise ValueError('仅验证了 DxDesigner / Logical-Physical 管理操作。')
|
||||
@@ -656,7 +663,7 @@ def _probe_add_dialog_impl(app, job, desktop, owned_pids, root, *, library=None)
|
||||
win32gui.PostMessage(new_button, win32con.BM_CLICK, 0, 0)
|
||||
dialog = await_window('New Reusable Block')
|
||||
fields = {1217: str(source), 1215: job['name'], 1218: top,
|
||||
1216: job.get('description', 'CBB native management validation')}
|
||||
1216: job.get('description', '')}
|
||||
for control, value in fields.items():
|
||||
hwnd = win32gui.GetDlgItem(dialog, control)
|
||||
if not hwnd or win32gui.GetClassName(hwnd) != 'Edit':
|
||||
|
||||
@@ -17,6 +17,7 @@ RESULT_LABELS = {
|
||||
'BLOCKED': '操作被阻止', 'UNSUPPORTED': '当前环境不支持',
|
||||
}
|
||||
STAGE_LABELS = {
|
||||
'prepare_identity': '正在核对来源工程内容',
|
||||
'catalog_before': '正在核对原生目录', 'backup': '正在备份完整中心库',
|
||||
'stage_source': '正在复制并检查来源工程', 'native_remove': '正在原生移除',
|
||||
'removed': '原条目已移除', 'native_add': '正在原生上传', 'uploaded': '上传身份已确认',
|
||||
|
||||
Reference in new issue
Block a user