feat: align AI configuration and task trunk concurrency with shared schema

This commit is contained in:
2026-10-08 23:34:17 +08:00
parent 3d3d1900ff
commit 12c6bd63f1
68 changed files with 1524 additions and 1425 deletions
+16
View File
@@ -49,6 +49,22 @@ class ContractCheckoutTest(unittest.TestCase):
with self.assertRaisesRegex(ValueError, 'does not match'):
checker.check_checkout(self.root)
def test_update_rechecks_an_unstaged_fast_forward(self):
(self.sub / 'test.schema.json').write_text('{"changed": true}\n')
self.git(self.sub, 'add', '.')
self.git(self.sub, 'commit', '-qm', 'changed')
self.assertEqual(checker.check_checkout(self.root, updating=True), self.git(self.sub, 'rev-parse', 'HEAD'))
(self.sub / 'untracked.txt').write_text('unexpected\n')
with self.assertRaisesRegex(ValueError, 'uncommitted'):
checker.check_checkout(self.root, updating=True)
def test_update_rejects_divergent_contract_history(self):
self.git(self.sub, 'checkout', '--orphan', 'unrelated')
self.git(self.sub, 'add', '.')
self.git(self.sub, 'commit', '-qm', 'unrelated root')
with self.assertRaises(subprocess.CalledProcessError):
checker.check_checkout(self.root, updating=True)
def test_dirty_submodule_is_rejected(self):
(self.sub / 'untracked.txt').write_text('unexpected\n')
with self.assertRaisesRegex(ValueError, 'uncommitted'):