feat: import governed sandbox commits and enforce native CLI limits
Some checks are pending
Governed runtime contract / contract (push) Waiting to run

Assistant: codex
Assistant-Model: gpt-5.6-luna
Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
tegwick 2026-09-09 14:08:10 +02:00
parent 1429db5ad4
commit c63caf5568
16 changed files with 1236 additions and 7 deletions

View file

@ -296,6 +296,15 @@ class RepositoryTransaction:
evidence["acceptance"] = self.acceptance.evidence()
return evidence
def assert_baseline_unchanged(self) -> None:
"""Refuse artifact import if the locked source no longer matches admission."""
if not self.locked or self.baseline is None:
raise RepositoryTransactionError("baseline verification requires an active transaction")
baseline = self.baseline
current = _capture_baseline(baseline.repo_root, baseline.git_common_dir, baseline.repo_id)
if current != baseline:
raise RepositoryAcceptanceError("baseline-changed", "source changed before artifact import")
def validate_acceptance(
self,
policy: RepositoryAcceptancePolicy,