Files
hermes-agent/tests/hermes_cli
Hermes Agent 17c6a566f5 fix(cron): reconcile run history per execution and read it in the owner's scope
Review of the run-history fallback:

- Merge agent sessions with script-only output docs per execution instead of
  branching on 'any sessions exist': a job converted to no_agent keeps its id
  (update_job supports it), so a surviving historical agent session must not
  hide newer script-only fires. Same-execution rows dedupe by session span.
- Decode output-doc filenames and read the execution ledger inside the owner
  profile's home scope: hermes_time resolves the configured zone through the
  current HERMES_HOME, so a cross-profile request decoded with the
  dashboard's zone and read the dashboard's executions.db.
- Attach per-run status from the execution ledger (one row per fire) matched
  by claim window instead of last_run_at proximity, and surface terminal
  attempts with no surviving doc as their own rows — the latest failed run
  no longer disappears behind (or relabels) an older successful document.
- Read output docs with encoding='utf-8-sig' (Windows footgun: PowerShell and
  some editors BOM files; plain utf-8 breaks on BOM-prefixed docs).

Three regressions cover the converted-job merge, the per-profile timezone
decode, and the missing-newest-doc case.
2026-09-26 17:19:04 -05:00
..