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
+5 -3
View File
@@ -11,7 +11,7 @@ def git(root, *args):
return subprocess.check_output(['git', '-C', str(root), *args], text=True, stderr=subprocess.STDOUT).strip()
def check_checkout(root):
def check_checkout(root, updating=False):
if (root / 'contracts/local').exists():
raise ValueError('contracts/local is a forbidden parallel contract source')
entry = git(root, 'ls-files', '--stage', '--', 'contracts/schema').split()
@@ -25,7 +25,9 @@ def check_checkout(root):
raise ValueError('contract submodule origin must be ' + URL)
commit = git(sub, 'rev-parse', 'HEAD')
if commit != entry[1]:
raise ValueError('contract HEAD does not match the project pin; stage the verified contracts/schema pointer')
if not updating:
raise ValueError('contract HEAD does not match the project pin; stage the verified contracts/schema pointer')
git(sub, 'merge-base', '--is-ancestor', entry[1], commit)
if git(sub, 'status', '--porcelain', '--untracked-files=all'):
raise ValueError('contract submodule has uncommitted changes; verify and commit them in the shared repository')
return commit
@@ -39,7 +41,7 @@ def main():
checker = importlib.util.module_from_spec(spec)
spec.loader.exec_module(checker)
count = checker.verify_bundle(checker_path.parent)
print(f'shared contract {commit}: {count} JSON files; source/bundle hashes and offline references valid')
print(f'shared contract {commit}: {count} JSON files; offline references and historical provenance valid')
if __name__ == '__main__':