autonomy-smoke-tests V2R2C2 release-runtime binding smoke and offline package preflight PASS
autonomy-unit-tests 782 passed, 3 skipped, 154 subtests passed on source branch
git-diff-check governed source diff-check PASS against merged main f1695ce
py-compile all tracked Python source compile PASS
reconciliation-contract completed-replay reconciliation contract preserved; 11 focused tests PASS
secret-scan narrow source and deployable payload secret scan PASS; no credentials included
signer-validator-contract trusted release plan/adapter contract 48 tests PASS; formal Owner signature not asserted here
campaign-approval-gate V2R2C2 candidate binding contract PASS; production approval remains formal-envelope gated
release-state-machine V2R2C2 plan-driven release state contract PASS; no production mutation performed
24 lines
1.3 KiB
Python
24 lines
1.3 KiB
Python
from pathlib import Path
|
|
import json, subprocess, sys
|
|
|
|
def test_trusted_builder_emits_plan_bound_payload(tmp_path):
|
|
source = tmp_path / "source"; source.mkdir()
|
|
files = {
|
|
"active-runtime/app/deployment_state.py": "x\n",
|
|
"active-runtime/app/v2r1c6_privacy_tools.py": "x\n",
|
|
"active-runtime/app/v2r2c2_health_service.py": "x\n",
|
|
"deploy/aios-v2/systemd/aios-v2r2c2-production.service": "x\n",
|
|
}
|
|
for rel, text in files.items():
|
|
path = source / rel; path.parent.mkdir(parents=True, exist_ok=True); path.write_text(text)
|
|
output = tmp_path / "release.tar"
|
|
script = Path(__file__).resolve().parents[1] / "scripts/autonomous-release/build_trusted_release_artifact.py"
|
|
result = subprocess.run([sys.executable, str(script), "--source", str(source), "--output", str(output),
|
|
"--version", "V2R2C2", "--source-oid", "1" * 40, "--tree-oid", "2" * 40,
|
|
"--rollback-version", "V2R2C1", "--rollback-target-oid", "3" * 40,
|
|
"--rollback-artifact-sha256", "4" * 64, "--service", "aios-v2r2c2-production.service", "--port", "18928"],
|
|
check=True, capture_output=True, text=True)
|
|
receipt = json.loads(result.stdout)
|
|
assert receipt["source_commit"] == "1" * 40
|
|
assert output.is_file() and receipt["artifact_size"] == output.stat().st_size
|