Repository navigation
fix: final salvage wave — backend/gateway cluster (#95164 #95173 #95328 #95601 #95237) - #95980
Merged
Merged
Conversation
Co-authored-by: Cursor <[email protected]>
…nd auto-focus (#92703) Kanban/background completion wakes persist as role=user rows typed with display_kind="internal_notification" (the synthetic-wake path in run.py). The model-payload builder already strips display_kind before the request and is_user_originated_turn already ignores it, but two compaction scans still treated those rows as real user turns: - _is_actionable_user_turn (tail anchor) only checked role/content, so a notification became the protected 'last user turn' the compressor keeps. - _derive_auto_focus_topic only skipped synthetic compression turns, so operational notices leaked into the compact focus hint. Both now exclude display_kind-typed rows, mirroring the existing is_user_originated_turn exclusion. No schema change; cache- and role-alternation-safe. Behavior-contract tests feed 1,000 operational notifications around one human turn and assert they never anchor the tail, become the auto-focus source, or count as actionable user turns. Fixes #92703
An interrupted hermes update after git pull advanced HEAD never restarted running gateways, and the next update said "Already up to date" and skipped the fleet. Persist a HERMES_HOME fleet_restart_pending marker after HEAD moves, clear it only when restart completes (or nothing was running), and catch up on the next hermes update even when git is current — also when latest.json records a stale runtime SHA. Co-authored-by: GokayAI <[email protected]>
…alls (#95189) The renderer pings each pool backend every 60s (`hermes:backend:touch` → `touchPoolBackend` → updates `lastActiveAt`). The LRU eviction cap used a keepalive-fresh window of 90s — only 1.5× the ping cadence — to decide whether a backend was "plausibly still alive". One missed or delayed ping pushed a live backend past the threshold and the cap-driven eviction killed the active profile's backend mid-session, restarting the gateway and re-minting runtime ids. On WSL2, where the renderer→Electron IPC roundtrips through 9p, brief 9p hiccups commonly stretch a ping to seconds of observed silence, producing the ~80–90s exit / ~2 min cycle reported in #95189 (122 gateway starts on 2026-08-26 alone, driving renderer OOM via reconnect churn at ~5GB/day). Widen POOL_KEEPALIVE_FRESH_MS to 4 minutes (3× ping cadence + IPC stall headroom, still bounded well below POOL_IDLE_MS=10min). Backends with one or even two missed pings are now spared; truly idle backends (multiple lapses, minutes idle) remain eligible for eviction by the cap and the idle reaper. The constant is also overridable via HERMES_DESKTOP_POOL_KEEPALIVE_FRESH_MS to make this tunable without a rebuild.
૮ >ﻌ< ა ci reviewran on 81e4a97 — fix(desktop): widen pool keepalive-fresh window to absorb WS
|
This was referenced Aug 27, 2026
Closed
teknium1
added a commit
that referenced
this pull request
Aug 27, 2026
…model key Independent review finding on the merged #95980: _apply_live_compression_config only acted on PRESENT keys, so removing tail_mode / model.context_length / target_ratio / model_thresholds / proactive_prune_* / protect_last_n / min_tail_user_messages / threshold / idle_compact_after_seconds from config.yaml left stale values active in live sessions forever (probe-verified: all six stale after applying empty mappings). Absence now restores the normalized default — or the model-derived value — through the SAME derivation the construction path uses: - ContextCompressor ctor defaults read off its real __init__ signature (no hardcoded copies to drift) - compression.threshold removal re-derives via agent_init's _resolve_compression_threshold (Codex gpt-5.4/5.5 + spark autoraise included) - model.context_length removal drops the config override and forces re-inference through the deferred get_model_context_length resolution, which also re-applies the small-context threshold floor - model_thresholds removal clears stale per-model overrides from the live threshold; tail_mode falls back to the ctor's 'lean' (the old present-key path normalized invalid values to 'legacy', diverging from the compressor's own fallback) Also fixes proactive_prune_min_reclaim_tokens's present-but-null default (was 0; the real default is 4096). Refs #94724
and7777
pushed a commit
to and7777/hermes-agent
that referenced
this pull request
Aug 27, 2026
…model key Independent review finding on the merged NousResearch#95980: _apply_live_compression_config only acted on PRESENT keys, so removing tail_mode / model.context_length / target_ratio / model_thresholds / proactive_prune_* / protect_last_n / min_tail_user_messages / threshold / idle_compact_after_seconds from config.yaml left stale values active in live sessions forever (probe-verified: all six stale after applying empty mappings). Absence now restores the normalized default — or the model-derived value — through the SAME derivation the construction path uses: - ContextCompressor ctor defaults read off its real __init__ signature (no hardcoded copies to drift) - compression.threshold removal re-derives via agent_init's _resolve_compression_threshold (Codex gpt-5.4/5.5 + spark autoraise included) - model.context_length removal drops the config override and forces re-inference through the deferred get_model_context_length resolution, which also re-applies the small-context threshold floor - model_thresholds removal clears stale per-model overrides from the live threshold; tail_mode falls back to the ctor's 'lean' (the old present-key path normalized invalid values to 'legacy', diverging from the compressor's own fallback) Also fixes proactive_prune_min_reclaim_tokens's present-but-null default (was 0; the real default is 4096). Refs NousResearch#94724
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…model key Independent review finding on the merged NousResearch#95980: _apply_live_compression_config only acted on PRESENT keys, so removing tail_mode / model.context_length / target_ratio / model_thresholds / proactive_prune_* / protect_last_n / min_tail_user_messages / threshold / idle_compact_after_seconds from config.yaml left stale values active in live sessions forever (probe-verified: all six stale after applying empty mappings). Absence now restores the normalized default — or the model-derived value — through the SAME derivation the construction path uses: - ContextCompressor ctor defaults read off its real __init__ signature (no hardcoded copies to drift) - compression.threshold removal re-derives via agent_init's _resolve_compression_threshold (Codex gpt-5.4/5.5 + spark autoraise included) - model.context_length removal drops the config override and forces re-inference through the deferred get_model_context_length resolution, which also re-applies the small-context threshold floor - model_thresholds removal clears stale per-model overrides from the live threshold; tail_mode falls back to the ctor's 'lean' (the old present-key path normalized invalid values to 'legacy', diverging from the compressor's own fallback) Also fixes proactive_prune_min_reclaim_tokens's present-but-null default (was 0; the real default is 4096). Refs NousResearch#94724
zapabob
pushed a commit
to zapabob/hermes-agent-windows
that referenced
this pull request
Sep 5, 2026
…model key Independent review finding on the merged NousResearch#95980: _apply_live_compression_config only acted on PRESENT keys, so removing tail_mode / model.context_length / target_ratio / model_thresholds / proactive_prune_* / protect_last_n / min_tail_user_messages / threshold / idle_compact_after_seconds from config.yaml left stale values active in live sessions forever (probe-verified: all six stale after applying empty mappings). Absence now restores the normalized default — or the model-derived value — through the SAME derivation the construction path uses: - ContextCompressor ctor defaults read off its real __init__ signature (no hardcoded copies to drift) - compression.threshold removal re-derives via agent_init's _resolve_compression_threshold (Codex gpt-5.4/5.5 + spark autoraise included) - model.context_length removal drops the config override and forces re-inference through the deferred get_model_context_length resolution, which also re-applies the small-context threshold floor - model_thresholds removal clears stale per-model overrides from the live threshold; tail_mode falls back to the ctor's 'lean' (the old present-key path normalized invalid values to 'legacy', diverging from the compressor's own fallback) Also fixes proactive_prune_min_reclaim_tokens's present-but-null default (was 0; the real default is 4096). Refs NousResearch#94724
This was referenced Sep 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final salvage wave — backend/gateway cluster (tracker #94724)
Re-verified and cherry-picked five backend PRs onto current
mainwith original authorship preserved. One PR from the assigned cluster (#91043) was found already merged to main (2552579) and is not included.Salvaged PRs
tui_gatewayadopts livecompression.*/model.context_lengthconfig at turn start (closes #95151); keeps #95571's lean-tail default coherent for Desktop/TUI users changingtail_modelivedisplay_kind-typed synthetic wakes (#92703). Both scan sites re-verified as still unguarded on post-lean-tail mainfleet_restart_pendingmarker: interruptedhermes updatecatches up the fleet restart on the next run (#95294 parts 1+2; part 3 left for maintainer). Rebase-checked against 27385e5 / 306a096 / adb29d8run_in_threadpool— fixes #95559 "Runtime not ready" starvationPOOL_KEEPALIVE_FRESH_MS90s → 4min: pool LRU eviction tolerates missed keepalive pings / WSL2 IPC stalls (#95189; author de-scoped from #95189 fix set)Verification (A/B per pick)
_pending_switch_selection_warningfrom fix(tui_gateway): ask before queueing a guarded model picked mid-turn #91043 and the new compression-sync block coexist; call site runs compression sync after model sync).test_compress_focus, tail-anchor and lean-tail adoption suites (32 tests) all green.test_marker_written_after_pull_cleared_after_successful_restartfails locally only because live gateways on this dev machine leak intocollect_runtime_inventory; the pre-existing main testtest_update_head_moved_gate::test_update_success_when_head_movesfails identically on pristineorigin/mainon the same machine. CI (no live gateways) is the arbiter. Serve-inventory + fail-closed regression suites (22 tests) green.vitest run electron/pool-eviction.test.ts8/8 (3 new [Bug]: Gateway exits uncleanly every ~2 minutes on WSL2 (v0.17.0), driving renderer OOM via reconnect churn #95189 pins). Note the new tests mirror the constant locally (pureselectPoolEvictions), so the behavioural pin is the constant change inmain.tsitself.ruff checkclean on all touched Python files.Credits
All commits carry original authorship: @rainbowgore (rainbowgits), @kvnloo (lesseradmin), @gokay-ai (via Cursor Agent co-author), @fangliquanflq, @Finn763. Contributor email mapping added for
[email protected]→ kvnloo. Rebase-merge to preserve per-commit attribution.Infographic