feat: complete native BOM and Harness execution acceptance

This commit is contained in:
阿白叔 committed 2026-11-12 19:21:55 +08:00
1 parent 4f8fbd7806
commit 65438cb7e5
234 files changed
+24402 -865

No files matched your search

+30
View File
@@ -56,6 +56,36 @@ def test_new_raw_rule_freezes_two_equal_value_targets_as_separate_uids(scope_cas
assert _queue_matches_inputs(handoff.command_path, _read_commands(handoff.command_path), (project,), rules)
def test_explicit_cell_preflight_uses_cache_shared_with_native_helper(scope_case, tmp_path, monkeypatch):
from contextlib import closing
from dx_productivity.trial_task_center import cell_catalog, quick_run
from dx_productivity.trial_task_center.logging_setup import configure_logging
from dx_productivity.trial_task_center.service import TaskCenterService
from dx_productivity.trial_task_center.store import TaskStore
preparer, project, *_ = scope_case
project.path.write_text(project.path.read_text() + 'KEY CentralLibrary "library/lib.lmc"\n')
data = preparer.data_root
def boundary(*args, **kwargs):
raise RuntimeError('native dispatch boundary')
monkeypatch.setattr(quick_run, '_run_process', boundary)
preparer._process_runner = boundary
def read(library, part, root, **kwargs):
assert root == data / 'cell-catalog'
raise RuntimeError('shared library cache reached')
monkeypatch.setattr(cell_catalog, 'read_library_cell_catalog', read)
with closing(TaskStore(tmp_path / 'scope.db')) as store:
service = TaskCenterService(store, configure_logging(data), quick_run_preparer=preparer)
task = service.create_project_tasks(project.path.parent)[0]
service.add_rule(task.task_id, 'OLD', 'NEW', target_cell='CELL')
child = service.for_project_task(task.task_id)._quick_run_preparer
monkeypatch.setattr(child, 'discover_project', preparer.discover_project)
projects, rules = store.list_projects(task.task_id), store.list_rules(task.task_id)
session = child.begin_batch_session(task.task_id, projects, rules)
with pytest.raises(RuntimeError, match='shared library cache reached'):
child.execute_step(task.task_id, projects, rules, batch_mode=True, batch_session=session)
@pytest.mark.parametrize('read_failed', [False, True])
def test_missing_project_sheet_manifest_is_a_controlled_scope_error(scope_case, read_failed):
from dx_productivity.trial_task_center.component_scope import freeze