Files
hermes-agent/tests/cron
kshitijk4poor 9715a7c6fe fix(cron): install the fire secret scope before the body's first crash-notice exit
_run_one_job_body's except branch sends _deliver_crash_failure when anything in
the body raises, but the firing profile's secret scope was only installed after
claim_dispatch and mark_execution_running. A raise from either sent the crash
notice with no scope: under multiplex get_secret fails closed
(UnscopedSecretError, "Hermes could not read this profile's
TELEGRAM_HOME_CHANNEL") and the notice never left. Same class as the
dispatch-failure branch fixed for #131585 (and called out in #130431's body).

Install the scope first thing in the try so every exit through the except is
scoped; the outer finally already resets it. The handoff path stays outside it
(#107692), and the external-worker payload path and the post-handoff notice
already run scoped.

Extends the #130431 test with a claim_dispatch-raising case.

Refs #131585
Co-authored-by: skyeyesec333 <skyeyesec333@users.noreply.github.com>
2026-10-04 02:10:55 +05:30
..