fix: bind native retry evidence to current batch operation
This commit is contained in:
1 parent
a94276494a
commit
681403a4d2
2 files changed
+5
No files matched your search
@@ -176,6 +176,7 @@ class NativeInventoryReader:
|
||||
'version': 1, 'native_read_only': True, 'project_path': str(project),
|
||||
'source_hashes': {str(path): digest for path, digest in source_hashes.items()},
|
||||
'workers_closed': True, 'evidence_root': str(evidence.resolve()),
|
||||
'binding': dict(desktop.identity),
|
||||
})
|
||||
_verify_sources(source_hashes)
|
||||
retry = runtime.recover_native_failure(project, evidence, str(error))
|
||||
|
||||
@@ -130,6 +130,8 @@ def test_only_transient_native_process_failure_requests_one_proven_rebuild(tmp_p
|
||||
def native_scope(self, evidence):
|
||||
value = reader.desktop_factory('shared')
|
||||
value.cleanup_record = {'workers_closed': True}
|
||||
value.identity = {'session_id': 'current-batch', 'generation': 1,
|
||||
'attempt_id': f'native-{len(scopes) + 1}'}
|
||||
original = value.start_process
|
||||
first = not scopes
|
||||
scopes.append(evidence)
|
||||
@@ -149,6 +151,8 @@ def test_only_transient_native_process_failure_requests_one_proven_rebuild(tmp_p
|
||||
proof = json.loads((evidence / 'native-retry-proof.json').read_text())
|
||||
assert path == project and reason
|
||||
assert proof['native_read_only'] and proof['workers_closed']
|
||||
assert proof['binding'] == {'session_id': 'current-batch', 'generation': 1,
|
||||
'attempt_id': 'native-1'}
|
||||
assert proof['project_path'] == str(project.resolve())
|
||||
assert set(proof['source_hashes']) == {str(project), str(project.parent / 'database/icdb.dat')}
|
||||
assert released == [True]
|
||||
|
||||
Reference in new issue
Block a user