fix: close audit 660 adapter and desktop admission gaps
Core regression / Python core, intervention UI and release configuration (push) Successful in 7m18s
Core regression / JavaScript syntax (push) Successful in 12s
Core regression / Python core, intervention UI and release configuration (pull_request) Successful in 7m49s
Core regression / JavaScript syntax (pull_request) Successful in 12s
Core regression / Python core, intervention UI and release configuration (push) Successful in 7m18s
Core regression / JavaScript syntax (push) Successful in 12s
Core regression / Python core, intervention UI and release configuration (pull_request) Successful in 7m49s
Core regression / JavaScript syntax (pull_request) Successful in 12s
This commit is contained in:
1 parent
c25db8ca25
commit
a23e980b4f
15 files changed
+229
-14
No files matched your search
@@ -21,6 +21,16 @@ SKIPPED_ID = 'b' * 32
|
||||
PLAN_HASHES = {TASK_ID: 'a' * 64}
|
||||
|
||||
|
||||
def _record_verified_round(child):
|
||||
with child.transaction():
|
||||
child._connection.execute('INSERT INTO execution_rounds (task_id,round_id) VALUES (?,?)', (TASK_ID, 'round'))
|
||||
child._connection.execute('INSERT INTO execution_operations VALUES (?,?,?,?,?,?,?,?)',
|
||||
(TASK_ID, 'round', 'key', json.dumps({'target_scope': 'targets',
|
||||
'project_path': 'board.prj', 'schematic_name': 'MAIN', 'sheet_number': '1',
|
||||
'target_selectors': 'uid1\x1fR1'}), 'verified', 'a', 1, '{}'))
|
||||
return {TASK_ID: 'round'}
|
||||
|
||||
|
||||
def test_known_manifest_run_cannot_resume_through_legacy_path_when_manifest_is_missing(batch):
|
||||
service, child, data, report, admission = batch
|
||||
journal = RunJournal(data)
|
||||
@@ -72,14 +82,12 @@ def test_bound_receipt_preserves_verified_result_and_checks_resource_state(batch
|
||||
kwargs['revalidate']()
|
||||
dispatches.append(scope)
|
||||
assert RunJournal(data).get(RUN_ID)['task_ids'] == [TASK_ID]
|
||||
with child.transaction():
|
||||
child._connection.execute('INSERT INTO execution_rounds (task_id,round_id) VALUES (?,?)', (TASK_ID, 'round'))
|
||||
child._connection.execute('INSERT INTO execution_operations VALUES (?,?,?,?,?,?,?,?)',
|
||||
(TASK_ID, 'round', 'key', json.dumps({'target_scope': 'targets',
|
||||
'project_path': 'board.prj', 'schematic_name': 'MAIN', 'sheet_number': '1',
|
||||
'target_selectors': 'uid1\x1fR1'}), 'verified', 'a', 1, '{}'))
|
||||
round_ids = _record_verified_round(child)
|
||||
result = TaskQueueResult(RUN_ID, (TaskQueueEntry(TASK_ID, 'completed'),), False,
|
||||
netlist_verification={TASK_ID: {'status': 'verified', 'verified': True}})
|
||||
batch_resources.write_record(data / 'task-queues' / (RUN_ID + '.json'),
|
||||
{'task_ids': [TASK_ID], 'plan_hashes': PLAN_HASHES, 'manifest_digest': 'd' * 64,
|
||||
'round_ids': round_ids, 'entries': {TASK_ID: {'state': 'completed', 'message': ''}}})
|
||||
_durable_supervisor_result(data, result)
|
||||
path = data / 'batch-resources' / BATCH_ID / 'session.json'
|
||||
record = json.loads(path.read_bytes())
|
||||
@@ -235,8 +243,9 @@ def _durable_supervisor_result(data, result, *, stopping_reason=None, batch_id=B
|
||||
|
||||
|
||||
def test_restart_recovers_business_and_netlist_before_first_journal_finish(batch, monkeypatch):
|
||||
service, _, data, _, admission = batch
|
||||
service, child, data, _, admission = batch
|
||||
checkpoint = {'task_ids': [TASK_ID], 'plan_hashes': PLAN_HASHES, 'manifest_digest': 'd' * 64,
|
||||
'round_ids': _record_verified_round(child),
|
||||
'entries': {TASK_ID: {'state': 'completed', 'message': 'saved'}}}
|
||||
directory = data / 'batch-runs' / RUN_ID
|
||||
batch_resources.write_record(directory / 'manifest.json', dict(admission, run_id=RUN_ID))
|
||||
@@ -257,13 +266,17 @@ def test_restart_recovers_business_and_netlist_before_first_journal_finish(batch
|
||||
|
||||
|
||||
def test_cleanup_only_stop_reason_resolves_without_replay(batch, monkeypatch):
|
||||
service, _, data, report, admission = batch
|
||||
service, child, data, report, admission = batch
|
||||
directory = data / 'batch-runs' / RUN_ID
|
||||
|
||||
def dispatch(*args, **kwargs):
|
||||
kwargs['revalidate']()
|
||||
result = TaskQueueResult(RUN_ID, (TaskQueueEntry(TASK_ID, 'completed', 'saved'),), False,
|
||||
netlist_verification={TASK_ID: {'status': 'verified', 'verified': True}})
|
||||
batch_resources.write_record(data / 'task-queues' / (RUN_ID + '.json'),
|
||||
{'task_ids': [TASK_ID], 'plan_hashes': PLAN_HASHES, 'manifest_digest': 'd' * 64,
|
||||
'round_ids': _record_verified_round(child),
|
||||
'entries': {TASK_ID: {'state': 'completed', 'message': 'saved'}}})
|
||||
_durable_supervisor_result(data, result)
|
||||
session = data / 'batch-resources' / BATCH_ID / 'session.json'
|
||||
batch_resources.write_record(session, dict(json.loads(session.read_bytes()), state='isolated'))
|
||||
@@ -314,6 +327,9 @@ def test_current_lookup_problem_codes_are_exported(batch):
|
||||
(task_id,round_id,problem_key,operation_key,classification,state,code,message,rule_version)
|
||||
VALUES (?,?,?,?,?,?,?,?,?)''', (TASK_ID, 'r', key, key, 'action_required', 'open',
|
||||
code, 'Native lookup report', 'test'))
|
||||
batch_resources.write_record(data / 'task-queues' / (RUN_ID + '.json'),
|
||||
{'task_ids': [TASK_ID], 'plan_hashes': PLAN_HASHES, 'manifest_digest': 'd' * 64,
|
||||
'round_ids': {TASK_ID: 'r'}, 'entries': {TASK_ID: {'state': 'failed', 'message': 'Native lookup report'}}})
|
||||
journal.finish(RUN_ID, {'status': 'failed', 'entries': [{'task_id': TASK_ID, 'state': 'failed'}]})
|
||||
execution_runs.recover_batch_receipts(service, data)
|
||||
summary = json.loads((directory / 'batch-receipt.json').read_bytes())
|
||||
@@ -343,7 +359,7 @@ def test_restart_keeps_supervisor_stop_cause(batch, reason):
|
||||
|
||||
|
||||
def test_restart_recovers_new_supervisor_result_after_resumed_run(batch, monkeypatch):
|
||||
service, _, data, _, admission = batch
|
||||
service, child, data, _, admission = batch
|
||||
directory = data / 'batch-runs' / RUN_ID
|
||||
checkpoint_path = data / 'task-queues' / (RUN_ID + '.json')
|
||||
checkpoint = {'task_ids': [TASK_ID], 'plan_hashes': PLAN_HASHES, 'manifest_digest': 'd' * 64,
|
||||
@@ -365,7 +381,8 @@ def test_restart_recovers_new_supervisor_result_after_resumed_run(batch, monkeyp
|
||||
netlist_verification={TASK_ID: {'status': 'verified', 'verified': True}})
|
||||
_durable_supervisor_result(data, new_result, batch_id='4' * 32, resumed=True)
|
||||
checkpoint.update(entries={TASK_ID: {'state': 'completed', 'message': 'resumed and saved'}},
|
||||
netlist_verification=new_result.netlist_verification)
|
||||
netlist_verification=new_result.netlist_verification,
|
||||
round_ids=_record_verified_round(child))
|
||||
batch_resources.write_record(checkpoint_path, checkpoint)
|
||||
execution_runs.recover_batch_receipts(service, data)
|
||||
|
||||
|
||||
Reference in new issue
Block a user