The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(update): secure the profile home before the config-ro chmod
Ben Barclaye77bb162b474
diff --git a/tests/hermes_cli/test_update_post_commit_safety.py b/tests/hermes_cli/test_update_post_commit_safety.pyindex e5a9769a859..c83791a6580 100644--- a/tests/hermes_cli/test_update_post_commit_safety.py+++ b/tests/hermes_cli/test_update_post_commit_safety.py@@ -45,9 +45,12 @@ _CHILD = textwrap.dedent('''# The selected interpreter is the shim: its SQLite probe is the runtime-safety fact.sys.executable = os.environ["PROBE_SHIM"]import hermes_yaml as yaml- from hermes_cli.config import DEFAULT_CONFIG+ from hermes_cli.config import DEFAULT_CONFIG, ensure_hermes_homehome = Path(os.environ["HERMES_HOME"])home.mkdir(parents=True, exist_ok=True)+ # The process's first config read secures the home (0700) once. Do it now, as a real process+ # has by the time it runs the update tail: config-ro's later chmod must stay in force.+ ensure_hermes_home()(home / "config.yaml").write_text(yaml.safe_dump({"_config_version": DEFAULT_CONFIG["_config_version"] - 1,"telemetry": {"shared_metrics": {"enabled": False}},