feat: implement institutional governance and recovery architecture
This commit is contained in:
@@ -165,6 +165,13 @@ def manifest_catalog_entry(
|
||||
entry["dependencies"] = list(manifest.dependencies)
|
||||
if manifest.optional_dependencies:
|
||||
entry["optional_dependencies"] = list(manifest.optional_dependencies)
|
||||
if manifest.architecture is not None:
|
||||
entry["architecture"] = manifest.architecture.to_dict()
|
||||
if manifest.external_providers:
|
||||
entry["external_providers"] = [
|
||||
declaration.to_dict()
|
||||
for declaration in manifest.external_providers
|
||||
]
|
||||
if manifest.provides_interfaces:
|
||||
entry["provides_interfaces"] = [
|
||||
{"name": item.name, "version": item.version}
|
||||
|
||||
@@ -9,6 +9,7 @@ import re
|
||||
import subprocess
|
||||
import tomllib
|
||||
|
||||
from .contracts import parse_manifest_contract
|
||||
from .model import RepositorySnapshot, RepositorySpec, VersionSnapshot
|
||||
from .workspace import resolve_repo_path
|
||||
|
||||
@@ -130,12 +131,9 @@ def read_manifest_versions(path: Path) -> tuple[str, ...]:
|
||||
return ()
|
||||
versions: list[str] = []
|
||||
for manifest in sorted(src.glob("**/backend/manifest.py")):
|
||||
text = manifest.read_text(encoding="utf-8")
|
||||
match = re.search(r'(?m)^\s*version\s*=\s*["\']([^"\']+)["\']', text)
|
||||
if match is None:
|
||||
match = re.search(r'(?m)^MODULE_VERSION\s*=\s*["\']([^"\']+)["\']', text)
|
||||
if match is not None:
|
||||
versions.append(match.group(1))
|
||||
contract = parse_manifest_contract(manifest, repo_name=path.name)
|
||||
if contract is not None and contract.module_version is not None:
|
||||
versions.append(contract.module_version)
|
||||
return tuple(versions)
|
||||
|
||||
|
||||
|
||||
@@ -401,6 +401,7 @@ def manifest_shape_gate_issue(workspace: Path) -> str | None:
|
||||
str(META_ROOT / "tools" / "checks" / "check-manifest-shapes.py"),
|
||||
"--workspace-root",
|
||||
str(workspace),
|
||||
"--require-architecture",
|
||||
)
|
||||
result = run(
|
||||
command,
|
||||
|
||||
Reference in New Issue
Block a user