feat: complete native BOM and Harness execution acceptance
This commit is contained in:
1 parent
4f8fbd7806
commit
65438cb7e5
234 files changed
+24402
-865
No files matched your search
@@ -184,6 +184,7 @@ def test_new_manual_run_denies_old_ai_mutation_without_touching_controls(
|
||||
|
||||
window, automation, published, start = slow_diagnosis
|
||||
mutations = []
|
||||
receipt_started, release_receipt = Event(), Event()
|
||||
monkeypatch.setattr(window.service, 'cleanup_batch_resources', lambda: mutations.append('cleanup'))
|
||||
monkeypatch.setattr(window.service, 'prepare_failed_quick_run', lambda _task: mutations.append('prepare'))
|
||||
if action == 'cleanup_resources':
|
||||
@@ -193,15 +194,25 @@ def test_new_manual_run_denies_old_ai_mutation_without_touching_controls(
|
||||
interrupted=False, phase='retry')
|
||||
monkeypatch.setattr(dsh_automation.IncidentRunner, '_snapshot',
|
||||
lambda _self, task_id, _code, _message: ({'task_id': task_id, 'status': 'running'}, context))
|
||||
def certified_receipt(_task):
|
||||
receipt_started.set()
|
||||
assert release_receipt.wait(5), 'Controlled receipt read was not released'
|
||||
return {'items': [{'auto_retries_remaining': 1}]}
|
||||
monkeypatch.setattr(window.service, 'execution_problem_overview', certified_receipt)
|
||||
automation.enqueue(window._task_id, 'execution_failed', 'Controlled retryable failure',
|
||||
execution_authorized=True, run_id='d' * 32)
|
||||
automation._drain()
|
||||
qtbot.waitUntil(lambda: bool(window._dsh_view.requests), timeout=5000)
|
||||
# Certified replay precedes diagnosis; change the GUI execution epoch
|
||||
# while collecting its receipt, before action admission or any mutation.
|
||||
qtbot.waitUntil(receipt_started.is_set, timeout=5000)
|
||||
view = window._dsh_view
|
||||
window._begin_run(ui.tasks[1].task_id)
|
||||
manual_stop = window._batch_stop
|
||||
owner = window._active_quick_run_task_id
|
||||
try:
|
||||
release_receipt.set()
|
||||
qtbot.waitUntil(lambda: window._dsh_view is not None and bool(window._dsh_view.requests), timeout=5000)
|
||||
view = window._dsh_view
|
||||
reply_to_model(view, action)
|
||||
qtbot.waitUntil(lambda: len(view.requests) == 2, timeout=5000)
|
||||
assert not mutations
|
||||
@@ -217,6 +228,9 @@ def test_new_manual_run_denies_old_ai_mutation_without_touching_controls(
|
||||
assert window._active_quick_run_task_id == owner
|
||||
assert len(published) == 1
|
||||
finally:
|
||||
release_receipt.set()
|
||||
automation.cancel()
|
||||
qtbot.waitUntil(lambda: automation.worker is None, timeout=5000)
|
||||
window._finish_run()
|
||||
ui.settle()
|
||||
|
||||
|
||||
Reference in new issue
Block a user