From eef60cc1ff7cda6e0441e4bc6b185acdbeb69835 Mon Sep 17 00:00:00 2001 From: liuhao1024 Date: Mon, 14 Sep 2026 19:31:33 +0800 Subject: [PATCH] fix(update): also ignore the cron job store on flat installs The per-profile job store lives at HERMES_HOME/cron/jobs.json, so a flat install keeps it beside executions.db inside the checkout-root stash domain. Without an ignore rule the untracked autostash of hermes update sweeps it away with the rest of the runtime state. Absorb the path (noted in #110670) and its regression assertion into the runtime-state carrier. (cherry picked from commit 66282e6dc3ac5f276cdee5b92a22856f146c9a45) --- .gitignore | 6 ++++-- .../hermes_cli/test_update_flat_install_state_gitignore.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1d097fb4d5..b187c7a36a 100644 --- a/.gitignore +++ b/.gitignore @@ -171,8 +171,9 @@ docs/superpowers/* # Flat-install runtime state (checkout root == $HERMES_HOME, e.g. installs made # with HERMES_INSTALL_DIR=$HERMES_HOME or by older installers): the live session # store, its SQLite sidecars and retired-WAL capture dirs, quick snapshots, the -# legacy transcripts, the cron executions ledger, gateway lock/pid files, and -# cache/spill directories are Hermes-managed runtime state, never code changes. +# legacy transcripts, the cron job store (jobs.json) and executions ledger, +# gateway lock/pid files, and cache/spill directories are Hermes-managed runtime +# state, never code changes. # Ignore them so `hermes update`'s `git stash push --include-untracked` cannot # sweep the live state.db/-wal into the stash and unlink it under the running # gateway (#110648). Nested installs keep all of this under $HERMES_HOME outside @@ -190,6 +191,7 @@ docs/superpowers/* /sessions/ /browser-profile/ /cron/executions.db +/cron/jobs.json /gateway.lock /gateway.pid /hook_outputs/ diff --git a/tests/hermes_cli/test_update_flat_install_state_gitignore.py b/tests/hermes_cli/test_update_flat_install_state_gitignore.py index 712a2fdc9c..55fe11753f 100644 --- a/tests/hermes_cli/test_update_flat_install_state_gitignore.py +++ b/tests/hermes_cli/test_update_flat_install_state_gitignore.py @@ -21,8 +21,8 @@ REPO_ROOT = Path(__file__).resolve().parents[2] # ``hermes update`` would sweep it: the session store plus its SQLite sidecars # (gateway/platforms/base.py _ROOT_CREDENTIAL_PATHS enumerates the same set) and # retired-WAL capture dirs, quick snapshots, the legacy transcript dir, the -# default kanban board, the cron executions ledger, gateway lock/pid files and -# the cache/spill directories. +# default kanban board, the cron job store (cron/jobs.py JOBS_FILE) and +# executions ledger, gateway lock/pid files and the cache/spill directories. FLAT_INSTALL_RUNTIME_STATE = ( "state.db", "state.db-wal", @@ -37,6 +37,7 @@ FLAT_INSTALL_RUNTIME_STATE = ( "sessions/2026-09-14_06-00-00_abcd123d.jsonl", "browser-profile/Cookies", "cron/executions.db", + "cron/jobs.json", "gateway.lock", "gateway.pid", "hook_outputs/2026-09-14_06-00-00/tool.json",