feat: Phase 5 stabilization schedules and custodian path URIs
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 9s
Build and Publish Container Image / build-and-push (push) Successful in 2m58s

Add phase5_stabilization_check State Hub resolver with progress evidence
sinks, schedule projections for daily and closeout checks, custodian:// and
activity-core:// runtime path resolution, and Railiance mounts under /var/custodian.
This commit is contained in:
tegwick 2026-07-07 00:48:36 +02:00
parent 5c3a89c495
commit 70e3154b05
10 changed files with 672 additions and 18 deletions

View file

@ -0,0 +1,37 @@
"""Resolve repo-relative runtime paths for Custodian-owned assets."""
from __future__ import annotations
import os
from pathlib import Path
_DEFAULT_CUSTODIAN_ROOT = Path("/home/worsch/the-custodian")
_DEFAULT_ACTIVITY_CORE_ROOT = Path("/etc/activity-core")
_CUSTODIAN_SCHEME = "custodian://"
_ACTIVITY_CORE_SCHEME = "activity-core://"
def custodian_repo_root() -> Path:
raw = os.environ.get("CUSTODIAN_REPO_ROOT", "").strip()
return Path(raw).expanduser() if raw else _DEFAULT_CUSTODIAN_ROOT
def activity_core_root() -> Path:
raw = os.environ.get("ACTIVITY_CORE_ROOT", "").strip()
return Path(raw).expanduser() if raw else _DEFAULT_ACTIVITY_CORE_ROOT
def resolve_runtime_path(raw_path: str) -> Path:
"""Map custodian:// and activity-core:// URIs to mounted runtime paths."""
value = str(raw_path or "").strip()
if not value:
return Path(value)
if value.startswith(_CUSTODIAN_SCHEME):
return (custodian_repo_root() / value.removeprefix(_CUSTODIAN_SCHEME)).resolve()
if value.startswith(_ACTIVITY_CORE_SCHEME):
return (activity_core_root() / value.removeprefix(_ACTIVITY_CORE_SCHEME)).resolve()
return Path(value).expanduser()