feat(T06): hostPath working-memory sync and repo-relative sink paths
Mount the-custodian memory/working from the railiance01 clone (hostPath) so sweep writeback commits daily-triage notes; worker runs as uid 1000; progress events store repo-relative working_memory_path; ops inventory defaults use custodian:// URIs.
This commit is contained in:
parent
70e3154b05
commit
ce03e78e26
10 changed files with 76 additions and 30 deletions
|
|
@ -34,4 +34,24 @@ def resolve_runtime_path(raw_path: str) -> Path:
|
|||
if value.startswith(_ACTIVITY_CORE_SCHEME):
|
||||
return (activity_core_root() / value.removeprefix(_ACTIVITY_CORE_SCHEME)).resolve()
|
||||
|
||||
return Path(value).expanduser()
|
||||
return Path(value).expanduser()
|
||||
|
||||
|
||||
def custodian_working_memory_dir() -> Path:
|
||||
return resolve_runtime_path("custodian://memory/working")
|
||||
|
||||
|
||||
def custodian_repo_relative(path: Path) -> str:
|
||||
"""Return a repo-relative POSIX path when under CUSTODIAN_REPO_ROOT."""
|
||||
root = custodian_repo_root().resolve()
|
||||
try:
|
||||
return path.resolve().relative_to(root).as_posix()
|
||||
except ValueError:
|
||||
return path.as_posix()
|
||||
|
||||
|
||||
def default_ops_inventory_path() -> Path:
|
||||
raw = os.environ.get("OPS_INVENTORY_PATH", "").strip()
|
||||
if raw:
|
||||
return resolve_runtime_path(raw)
|
||||
return resolve_runtime_path("custodian://ops/service-inventory.yml")
|
||||
Loading…
Add table
Add a link
Reference in a new issue