feat(T06): hostPath working-memory sync and repo-relative sink paths
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
Build and Publish Container Image / build-and-push (push) Successful in 1m36s

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:
tegwick 2026-07-07 01:00:49 +02:00
parent 70e3154b05
commit ce03e78e26
10 changed files with 76 additions and 30 deletions

View file

@ -152,12 +152,11 @@ def test_worker_mounts_daily_triage_schema_and_working_memory() -> None:
assert mounts["report-schemas"]["mountPath"] == "/etc/activity-core/schemas"
assert mounts["report-schemas"]["readOnly"] is True
assert volumes["report-schemas"]["configMap"]["name"] == "actcore-report-schemas"
assert mounts["working-memory"]["mountPath"] == (
"/home/worsch/the-custodian/memory/working"
)
assert volumes["working-memory"]["persistentVolumeClaim"]["claimName"] == (
"actcore-working-memory"
assert mounts["working-memory"]["mountPath"] == "/var/custodian/memory/working"
assert volumes["working-memory"]["hostPath"]["path"] == (
"/home/tegwick/the-custodian/memory/working"
)
assert pod_spec["securityContext"]["runAsUser"] == 1000
def test_ops_hub_key_is_secret_only_placeholder() -> None:

View file

@ -61,6 +61,7 @@ def test_working_memory_sink_writes_idempotently(tmp_path) -> None:
assert first[0]["status"] == "written"
assert second[0]["status"] == "exists"
note = tmp_path / "daily-triage-2026-05-19-12345678.md"
assert first[0]["path"].endswith("daily-triage-2026-05-19-12345678.md")
text = note.read_text(encoding="utf-8")
assert "activity_core_run_id: 12345678-aaaa-bbbb-cccc-123456789abc" in text
assert "output_validated: true" in text

View file

@ -14,4 +14,12 @@ def test_resolve_activity_core_uri(monkeypatch) -> None:
monkeypatch.setenv("ACTIVITY_CORE_ROOT", "/etc/activity-core")
assert resolve_runtime_path("activity-core://schemas/daily-triage-report.json") == (
__import__("pathlib").Path("/etc/activity-core/schemas/daily-triage-report.json")
)
)
def test_custodian_repo_relative(monkeypatch) -> None:
from activity_core.runtime_paths import custodian_repo_relative
monkeypatch.setenv("CUSTODIAN_REPO_ROOT", "/var/custodian")
path = __import__("pathlib").Path("/var/custodian/memory/working/note.md")
assert custodian_repo_relative(path) == "memory/working/note.md"