From 99e255cf818ff6e78bc09bb5f320a6f2561c3ea9 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Tue, 21 Jul 2026 13:24:37 +0200 Subject: [PATCH] fix(release): separate artifact and source contracts --- tests/test_release_integration.py | 12 +++++++ tools/checks/check-release-integration.sh | 44 +++-------------------- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/tests/test_release_integration.py b/tests/test_release_integration.py index 4caf9c8..95b52e0 100644 --- a/tests/test_release_integration.py +++ b/tests/test_release_integration.py @@ -79,6 +79,18 @@ class ReleaseIntegrationTests(unittest.TestCase): self.assertEqual([test.id() for test in filtered], [retained_id]) self.assertEqual(len(SOURCE_COUPLED_CORE_TESTS), 4) + def test_release_entrypoint_uses_artifact_checks_and_filtered_core_suite(self) -> None: + meta_root = Path(__file__).resolve().parents[1] + script = (meta_root / "tools" / "checks" / "check-release-integration.sh").read_text(encoding="utf-8") + + artifact_check = script.index('"$META_ROOT/tools/checks/release_integration.py" artifacts') + core_tests = script.index('"$META_ROOT/tools/checks/release_integration.py" core-tests') + module_tests = script.index('run_step "Run cloned module backend tests"') + + self.assertLess(artifact_check, core_tests) + self.assertLess(core_tests, module_tests) + self.assertNotIn('"$PYTHON" -m unittest \\\n tests.test_module_system', script) + if __name__ == "__main__": unittest.main() diff --git a/tools/checks/check-release-integration.sh b/tools/checks/check-release-integration.sh index 8738364..2b62f36 100644 --- a/tools/checks/check-release-integration.sh +++ b/tools/checks/check-release-integration.sh @@ -197,40 +197,8 @@ print(f"Release refs and metadata passed for {len(python_requirements)} Python p PY run_step "Validate installed module manifests and registry" -"$PYTHON" - <<'PY' -from __future__ import annotations - -import sys -from govoplan_core.server.registry import available_module_manifests, build_platform_registry - -expected = { - "access", - "admin", - "audit", - "calendar", - "campaigns", - "dashboard", - "docs", - "files", - "identity", - "idm", - "mail", - "ops", - "organizations", - "policy", - "tenancy", -} - -manifests = available_module_manifests() -missing = sorted(expected - set(manifests)) -if missing: - print(f"Missing installed module manifests: {', '.join(missing)}", file=sys.stderr) - raise SystemExit(1) - -registry = build_platform_registry(tuple(sorted(expected))) -snapshot = registry.validate() -print("Registry modules:", ", ".join(manifest.id for manifest in snapshot.manifests)) -PY +"$PYTHON" "$META_ROOT/tools/checks/release_integration.py" artifacts \ + --requirements "$META_ROOT/requirements-release.txt" run_step "Generate release dependency provenance" "$PYTHON" "$META_ROOT/tools/release/generate-release-sbom.py" \ @@ -280,12 +248,8 @@ for repo in govoplan-mail govoplan-calendar govoplan-campaign; do done run_step "Run core backend release tests" -"$PYTHON" -m unittest \ - tests.test_module_system \ - tests.test_access_contracts \ - tests.test_identity_organization_contracts \ - tests.test_core_events \ - tests.test_policy_contracts +"$PYTHON" "$META_ROOT/tools/checks/release_integration.py" core-tests \ + --core-root "$ROOT" "$PYTHON" "$META_ROOT/tools/checks/check_dependency_boundaries.py" run_step "Run cloned module backend tests"