fix: resolve runtime stability issues across core, web, delegate, and browser tools (salvage #4828)#4843
Merged
Merged
Conversation
…rdcoded HERMES_HOME instances The original PR fixed 4 of 7 instances. This fixes the remaining 3: - _launch_local_browser() PATH setup (line 908) - _start_recording() config read (line 1545) - _cleanup_old_recordings() path (line 1834)
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.
Summary
Salvage of PR #4828 by @Dusk1e with completion of the browser_tool profile isolation fix.
Four surgical bugfixes for runtime stability issues found during a stability audit:
Changes (from #4828)
1. Fix unbounded WAL file growth on SessionDB.close() (hermes_state.py)
A duplicate
close()at line 352 silently overrode the WAL-checkpointing version at line 238. Python uses the last definition, so the checkpoint was never performed. Removed the duplicate.2. Fix TypeError crash in chunked web content synthesis (tools/web_tools.py)
When both synthesis LLM calls return reasoning-only responses,
final_summarystays None andlen(final_summary)crashes. Added explicit None guard with fallback to concatenated chunk summaries.3. Fix silent memory loss in single-task delegation (tools/delegate_tool.py)
Memory notification referenced
tasks(raw input, None in single-task mode) instead oftask_list(normalized list). TypeError silently swallowed byexcept Exception: pass— memory provider notifications never fired for single-task delegations.4. Fix profile isolation in browser tool config (tools/browser_tool.py)
Hardcoded
Path(os.environ.get("HERMES_HOME", Path.home() / ".hermes"))pattern instead ofget_hermes_home(). Breaks profile isolation when usinghermes -p <profile>.Follow-up fix (our addition)
The original PR fixed 4 of 7 hardcoded HERMES_HOME instances in browser_tool.py. Our follow-up commit completes the remaining 3:
_launch_local_browser()PATH setup_start_recording()config read_cleanup_old_recordings()pathTest results
Closes #4828