Replace the process-global HERMES_CRON_SESSION env var with a per-session ContextVar so a cron tick in the gateway process cannot leak into unrelated live gateway/API/TUI turns. The cron scheduler now sets the ContextVar inside the job's try/finally scope and resets it on cleanup. Gateway, API server, ACP adapter, and TUI gateway all pass cron_session='' to explicitly mark their sessions as non-cron, masking any stale process env. Co-authored-by: hinablue <hinablue@gmail.com> Closes #37968 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| auth.py | ||
| edit_approval.py | ||
| entry.py | ||
| events.py | ||
| permissions.py | ||
| provenance.py | ||
| server.py | ||
| session.py | ||
| tools.py | ||