From 2ef69ddffd55279ee792ea608b26a6abcc36f667 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:31:33 +0000 Subject: [PATCH 1/3] Initial plan From 78b9801f8e0f1d7e46b181c6b5b356860b19f321 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:34:34 +0000 Subject: [PATCH 2/3] fix: add explanatory comment and explicit assignment in exception handler Address code review feedback by adding comments explaining why the exception is silently handled and making the source_range = None assignment explicit. Co-authored-by: zircote <307960+zircote@users.noreply.github.com> --- .../subconsciousness/implicit_capture_agent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git_notes_memory/subconsciousness/implicit_capture_agent.py b/src/git_notes_memory/subconsciousness/implicit_capture_agent.py index 728d1ee3..7f8105a4 100644 --- a/src/git_notes_memory/subconsciousness/implicit_capture_agent.py +++ b/src/git_notes_memory/subconsciousness/implicit_capture_agent.py @@ -283,7 +283,9 @@ def _parse_memory_item( end = chunk.line_range[0] + int(source_lines[1]) source_range = (start, end) except (ValueError, TypeError): - pass + # Invalid source_lines format - skip source range extraction + # This can happen if LLM returns non-integer values + source_range = None # Parse tags tags_raw = item.get("tags", []) From fad9d71babdc43e5ab65dcba47e2a589c07a3765 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:35:16 +0000 Subject: [PATCH 3/3] refactor: improve exception handler comments for clarity Make comments more specific about what each exception type means: - ValueError: when LLM returns non-integer values - TypeError: when source_lines is None or incompatible type Co-authored-by: zircote <307960+zircote@users.noreply.github.com> --- .../subconsciousness/implicit_capture_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git_notes_memory/subconsciousness/implicit_capture_agent.py b/src/git_notes_memory/subconsciousness/implicit_capture_agent.py index 7f8105a4..9a4d99a4 100644 --- a/src/git_notes_memory/subconsciousness/implicit_capture_agent.py +++ b/src/git_notes_memory/subconsciousness/implicit_capture_agent.py @@ -284,7 +284,8 @@ def _parse_memory_item( source_range = (start, end) except (ValueError, TypeError): # Invalid source_lines format - skip source range extraction - # This can happen if LLM returns non-integer values + # ValueError: LLM returned non-integer values + # TypeError: source_lines is None or incompatible type source_range = None # Parse tags