fix(state): preserve completed cron runs on resume #131434
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.47) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 294 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.340
Real PR Conversation Timeline
1 comments
"Review active on #131434"
general
weight: 0.35
DireMunchkin
What does this PR do
Preserves a positively classified cron scheduler outcome separately from the mutable session lifecycle. Finalized cron history remains eligible for continuation after resume, while the resumed session becomes live and can record a later close normally. Cleanup/orphan rows remain read-only, and deliberate current closes cannot be replaced by compression publication.
Provenance
Changes made
cron_completeandcron_incomplete_no_output.ended_atandend_reasonare cleared so a later close records a fresh lifecycle boundary.cron_finalized: falsetakes precedence over timestamps, with a separate legacy fallback.Tests
/Users/liyuan/github/ai/hermes-agent/venv/bin/python3 -m pytest tests/hermes_cli/test_session_system_prompt_dedup.py tests/hermes_state/test_cron_attempt_classifier.py -q— 18 passed./Users/liyuan/github/ai/hermes-agent/venv/bin/python3 -m pytest tests/hermes_cli/test_session_system_prompt_dedup.py tests/hermes_state/test_cron_attempt_classifier.py tests/hermes_state/test_hermes_state.py tests/hermes_cli/test_cron_run_scheduler_ownership.py -q -k 'finalized_cron or cron_attempt_classifier or reopen or end_session or scheduler_owned'— 12 passed, 302 deselected.git diff --checkand Pythoncompileallon changed modules — passed.vitest: command not found).Fixes #131433