Context
Follow-up from review on PR #10
In examples/mcp_server.py → run_recall(), when temp_ans_file.read_text() raises an exception (e.g. file read/permission error or damaged descriptor), the except Exception: block currently catches it with pass and falls through to "(no matching notes found)", True.
While isError: True is correctly set (preventing the agent from trusting anything), an I/O read failure is masked behind a "no matching notes found" message.
Proposed Fix
- In
run_recall(), capture except Exception as e: and return an explicit error string:
return f"Recall error: failed to read answer file: {e}", True
- Keep
"(no matching notes found)", True strictly for when the answer file was read without errors, but has empty content.
- Add a unit test verifying read errors produce distinct error text with
isError: True.
Context
Follow-up from review on PR #10
In
examples/mcp_server.py→run_recall(), whentemp_ans_file.read_text()raises an exception (e.g. file read/permission error or damaged descriptor), theexcept Exception:block currently catches it withpassand falls through to"(no matching notes found)", True.While
isError: Trueis correctly set (preventing the agent from trusting anything), an I/O read failure is masked behind a "no matching notes found" message.Proposed Fix
run_recall(), captureexcept Exception as e:and return an explicit error string:return f"Recall error: failed to read answer file: {e}", True"(no matching notes found)", Truestrictly for when the answer file was read without errors, but has empty content.isError: True.