Repository navigation
fix: scope learned notes to the failing tool; untrack .pyc files - #3
Merged
forumevi merged 1 commit intoSep 27, 2026
Merged
Conversation
query_patch matched on error_type/error_message only, so a note stored for one tool was injected for another tool's error. Add tool_name to the FTS5 table and require it in the lookup. Untrack the 8 committed .pyc files and replace the UTF-16 .gitignore (unreadable by git) with an ASCII one. Drop the unused core/error_analyzer.py. Signed-off-by: teknium1 <teknium1@users.noreply.github.com>
3 tasks done
Owner
|
Thanks @teknium1 for the direct fixes! Merged into main. I really appreciate the hands-on help. 🚀 |
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.
Why
Follow-up to the Hermes plugin-catalog review of NousResearch/hermes-agent#124519 (the two leftovers noted there):
query_patchmatched onerror_type/error_messageonly, so a session'sbashValueErrorcould receive "Previous tool 'read_file' failed…" from a row another session had stored (reproduced live during the review).bf9f3fdstopped persisting the generic fallback, but the lookup still had no tool scope, and rows written by earlier versions stay inmemory.db..pycfiles were still tracked and the.gitignoreadded inbf9f3fdis UTF-16 with a BOM, which git does not read as ignore rules — so__pycache__/was never actually ignored.What
core/fts5_memory_patcher.py:tool_nameis now a column of the FTS5 table;query_patch(tool_name, …)requirestool_name:"<tool>" AND (…);learn_from_outcome(tool_name, …)stores it. On amemory.dbcreated by an older version the column does not exist, the query raisesOperationalError, which the existing handler turns intoNone→ the plugin falls back to the in-memory generic note instead of replaying another tool's row.core/runtime_interceptor.py: passestool_namethrough.git rm --cachedthe 8.pyc;.gitignorerewritten as ASCII (__pycache__/,*.pyc).core/error_analyzer.pydeleted — nothing imports it (README row removed too).test_patch_is_scoped_to_tool: aread_filenote is not returned for abasherror).python -m pytest tests/test_self_healing.py→ 19 passed.hermes plugins validate→ ok, no warnings; install scanner → safe.Once merged, the catalog entry can be re-pinned to the merge sha.