Route delivered HQ tracks to temporary road interception and refresh playtest packages

This commit is contained in:
2026-09-20 11:52:14 +02:00
parent 81c0f060fd
commit ce4004db25
99 changed files with 18755 additions and 19 deletions
+49
View File
@@ -359,6 +359,55 @@ class NativePackageTests(unittest.TestCase):
self.assertTrue(summary['stopped_reason'])
self.assertEqual(len(summary['skipped_projects']), 4)
def cleaned_report(self, **changes):
values = dict(completion_observed='native-or-launcher-exited-prefix-active',
native_exit_code=0, launcher_exit_code=0,
cleanup_report={'cleanup_confirmed': True, 'idle_verified': True, 'errors': []})
values.update(changes)
return self.completed_report(**values)
def test_verified_post_cleanup_allows_only_diagnostic_later_jobs(self):
reports = [self.cleaned_report()] + [self.completed_report() for _ in range(4)]
code, summary, calls = self.orchestration_double(reports)
self.assertEqual(len(calls), 5)
self.assertEqual(code, 1)
self.assertEqual(summary['projects'], reports)
self.assertFalse(summary['all_candidates_created'])
self.assertTrue(summary['diagnostic_continuations'][0]['failed_verdict_retained'])
self.assertIsNone(summary['stopped_reason'])
code, summary, calls = self.orchestration_double([self.cleaned_report()], False)
self.assertEqual(len(calls), 1)
self.assertEqual(summary['diagnostic_continuations'], [])
def test_cleanup_diagnostic_refuses_uncertain_exit_or_cleanup(self):
for change in ({'native_exit_code': None}, {'native_exit_code': 1}, {'native_exit_code': False},
{'launcher_exit_code': 1}, {'cleanup_report': None},
{'cleanup_report': {'cleanup_confirmed': True, 'idle_verified': False, 'errors': []}},
{'cleanup_report': {'cleanup_confirmed': True, 'idle_verified': True, 'errors': ['problem']}}):
with self.subTest(change=change):
code, summary, calls = self.orchestration_double([self.cleaned_report(**change)])
self.assertEqual(code, 1)
self.assertEqual(len(calls), 1)
self.assertTrue(summary['stopped_reason'])
self.assertEqual(summary['diagnostic_continuations'], [])
def test_cleanup_diagnostic_rechecks_prefix_before_later_job(self):
code, summary, calls = self.orchestration_double([self.cleaned_report()],
idle=[None, ValueError('prefix busy again')])
self.assertEqual(len(calls), 1)
self.assertEqual(code, 1)
self.assertIn('diagnostic continuation refused', summary['stopped_reason'])
self.assertEqual(summary['diagnostic_continuations'], [])
def test_cleanup_diagnostic_rechecks_repository_and_copied_sources(self):
for method in ('inventory', 'copied_authored_snapshot'):
with self.subTest(method=method), patch.object(n, method, return_value={}):
code, summary, calls = self.orchestration_double([self.cleaned_report()])
self.assertEqual(len(calls), 1)
self.assertEqual(code, 1)
self.assertIn('authored inputs changed', summary['stopped_reason'])
self.assertEqual(summary['diagnostic_continuations'], [])
def test_prefix_becoming_busy_between_addons_stops_before_next_launch(self):
# First probe owns idle prefix before copy; second is between addons.
code, summary, calls = self.orchestration_double(