fix(#3961): keep mirrored worker env updates and pool helpers compatible

This commit is contained in:
Rod Boev 2026-06-20 20:01:58 -04:00
parent 62ff54d5da
commit c237946ea3
2 changed files with 2 additions and 2 deletions

View file

@ -4219,7 +4219,7 @@ def _pool_entry_payloads(provider_id: str) -> list[dict[str, Any]]:
str(getattr(entry, "key_source", "") or ""),
):
continue
if hasattr(entry, "to_dict") and callable(getattr(entry, "to_dict")):
if hasattr(entry, "to_dict") and callable(entry.to_dict):
payload = entry.to_dict()
elif isinstance(entry, dict):
payload = dict(entry)

View file

@ -865,7 +865,6 @@ def _apply_profile_env_to_process(
for key in secret_env_names:
if key not in safe_runtime_env:
process_env.pop(key, None)
process_env.update(safe_runtime_env)
return previous_env
@ -936,6 +935,7 @@ def profile_env_for_background_worker(
had_hermes_home = "HERMES_HOME" in os.environ
old_hermes_home = os.environ.get("HERMES_HOME")
skill_home_snapshot = snapshot_skill_home_modules()
os.environ.update(safe_runtime_env)
os.environ["HERMES_HOME"] = str(profile_home_path)
try:
patch_skill_home_modules(profile_home_path)