style(profile): frame comments around what the code does

This commit is contained in:
Erosika 2026-06-30 20:34:02 +00:00 committed by Teknium
parent a6175d1f93
commit 00eefc7f2b
3 changed files with 5 additions and 8 deletions

View file

@ -25,9 +25,7 @@ _MAX_TEXT_CHARS = 2000
def _store_path() -> str:
# Resolve via get_hermes_home() so the profile override is honored; reading
# os.environ["HERMES_HOME"] directly bypassed it and leaked the index into
# the launch profile (multi-profile tui_gateway / gateway).
# Resolve via get_hermes_home() so the active profile override is honored.
from hermes_constants import get_hermes_home
home = get_hermes_home()

View file

@ -144,9 +144,8 @@ def _run_async(coro):
worker_loop.close()
pool = concurrent.futures.ThreadPoolExecutor(max_workers=1)
# Propagate the profile override + approval/sudo callbacks into the
# worker so async tools resolving get_hermes_home() see the active
# profile, not the launch one (multi-profile tui_gateway / gateway).
# Carry the active profile + approval/sudo callbacks into the worker so
# async tools resolve get_hermes_home() under the active profile.
from tools.thread_context import propagate_context_to_thread
future = pool.submit(propagate_context_to_thread(_run_in_worker))

View file

@ -1532,8 +1532,8 @@ class AIAgent:
review_memory=review_memory,
review_skills=review_skills,
)
# Propagate the profile override into the review thread, else it writes
# MEMORY.md / skill review into the launch profile (#54937).
# Carry the active profile into the review thread so MEMORY.md / skill
# review writes land in the right profile (#54937).
t = threading.Thread(
target=propagate_context_to_thread(target), daemon=True, name="bg-review"
)