fix: reset _summary_failure_cooldown_until on session reset (#15547) - #15681
fix: reset _summary_failure_cooldown_until on session reset (#15547)#15681vominh1919 wants to merge 3 commits into
Conversation
The /api/skills endpoint calls _find_all_skills() without a try/except. If skill discovery raises (e.g. corrupted skills directory, permission error), the endpoint returns a 500 Internal Server Error. Wrap the call in try/except and return an empty list on failure, matching the pattern used by _list_all_skills() in skills_config.py. Fixes NousResearch#15486
update_job() merges updates directly via {**job, **updates}, which
overwrites the repeat dict structure {"times": N, "completed": 0}
with a raw integer when the API passes repeat as an int.
This causes mark_job_run() to crash with TypeError when it tries
to subscript the integer: job["repeat"]["completed"].
Add the same normalization that create_job() applies, converting
raw integers to the expected dict structure.
Fixes NousResearch#15582
ContextCompressor.on_session_reset() clears all per-session state except _summary_failure_cooldown_until. When a transient summary error (network timeout, rate limit) sets a cooldown, and the user then runs /new or /reset, the cooldown persists into the new session, silently blocking context compression. Fixes NousResearch#15547
|
duplicate comment posted |
|
I checked #15548 and #15549. The duplicate/superset concern here looks valid, and the scope concern is valid too: the headline fix is the one-line reset in As written, I would prefer to either:
|
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the fixes. The named compressor change has already landed on current main, but the branch also includes two independently relevant changes that should be salvaged separately.
Problems
agent/context_compressor.py:739already clears_summary_failure_cooldown_until; commite2211b268implemented this exact reset.- The cron change remains relevant:
gateway/platforms/api_server.py:3527permitsrepeat,:3654-3672forwards it unchanged,cron/jobs.py:1220merges it directly, and:1410-1413later assumes a dict. hermes_cli/web_server.py:13170still calls_find_all_skills()without a guard. The PR diff contains no regression tests for the cron or dashboard changes.
Suggested changes
- Split out the remaining cron and dashboard fixes, omit the already-landed compressor hunk, and add focused regressions for each path.
Automated hermes-sweeper review.
| self._previous_summary = None | ||
| self._last_compression_savings_pct = 100.0 | ||
| self._ineffective_compression_count = 0 | ||
| self._summary_failure_cooldown_until = 0.0 |
There was a problem hiding this comment.
This exact reset is already on current main as agent/context_compressor.py:739, from commit e2211b268; remove this hunk when splitting the remaining fixes.
Problem
ContextCompressor.on_session_reset()clears all per-session state except_summary_failure_cooldown_until. When a transient summary error (network timeout, rate limit) sets a cooldown, and the user then runs/newor/reset, the cooldown persists into the new session, silently blocking context compression.Fix
Add
self._summary_failure_cooldown_until = 0.0toon_session_reset(), matching the initialization in__init__.Before vs After
/newFixes #15547