Clear Hermes side-effect env vars before no-send bootstrap
Some checks are pending
CI / lint-and-test (push) Waiting to run
Some checks are pending
CI / lint-and-test (push) Waiting to run
This commit is contained in:
parent
85aa7b346d
commit
bbdb14db4c
1 changed files with 6 additions and 0 deletions
|
|
@ -422,6 +422,12 @@ def execute(prompt_id: str, provider_secret: str) -> dict[str, Any]:
|
|||
from hermes_cli.tools_config import _get_platform_tools # noqa: F401,E402
|
||||
from run_agent import AIAgent # noqa: F401,E402
|
||||
|
||||
# The imports above set HERMES_EXEC_ASK, HERMES_MAX_ITERATIONS, HERMES_QUIET
|
||||
# as side effects. The no-send contract rejects these. Clear them before
|
||||
# bootstrap validates the environment.
|
||||
for key in ("HERMES_EXEC_ASK", "HERMES_MAX_ITERATIONS", "HERMES_QUIET"):
|
||||
os.environ.pop(key, None)
|
||||
|
||||
bootstrap = _load_module("livingip_m5_runtime_bootstrap", BOOTSTRAP)
|
||||
contract, config, _surface, _policy = bootstrap._prepare(PROFILE, template=False)
|
||||
_require(contract.get("runtime_mode") == "gcp_staging_no_send", "runtime mode was not no-send staging")
|
||||
|
|
|
|||
Loading…
Reference in a new issue