From 6fd661d64bc690815559ce90ca4d62bc2871a861 Mon Sep 17 00:00:00 2001 From: KeyArgo Date: Sat, 13 Jun 2026 07:55:51 -0600 Subject: [PATCH] docs: clean up three stale comments from the #32848 audit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tools/memory_tool.py:20 — 'read' action was intentionally removed but the docstring still listed it. Now matches the schema. - tools/fuzzy_match.py:9 — unicode_normalized was added but the chain-count docstring still said '8-strategy'. Now says '9'. - run_agent.py:1485 — 'See #.' placeholder was never filled in. Replaced with a backfill note. Fixes #32848 (parts 3, 4, and 12) --- run_agent.py | 2 +- tools/fuzzy_match.py | 2 +- tools/memory_tool.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run_agent.py b/run_agent.py index 9c720bcbfe0..a01401b0870 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1482,7 +1482,7 @@ class AIAgent: a raw ``tool`` message and the next user turn lands as ``...tool, user, user`` — a protocol-invalid sequence that most providers silently reject (returns empty content), causing the - empty-retry loop to fire forever. See #. + empty-retry loop to fire forever. (issue number to be backfilled once filed) """ # Pass 1: strip the flagged scaffolding messages themselves. dropped_scaffolding = False diff --git a/tools/fuzzy_match.py b/tools/fuzzy_match.py index b6991e7a24f..5ebb2b8b26f 100644 --- a/tools/fuzzy_match.py +++ b/tools/fuzzy_match.py @@ -6,7 +6,7 @@ Implements a multi-strategy matching chain to robustly find and replace text, accommodating variations in whitespace, indentation, and escaping common in LLM-generated code. -The 8-strategy chain (inspired by OpenCode), tried in order: +The 9-strategy chain (inspired by OpenCode), tried in order: 1. Exact match - Direct string comparison 2. Line-trimmed - Strip leading/trailing whitespace per line 3. Whitespace normalized - Collapse multiple spaces/tabs to single space diff --git a/tools/memory_tool.py b/tools/memory_tool.py index a8312fa2145..32671b54672 100644 --- a/tools/memory_tool.py +++ b/tools/memory_tool.py @@ -17,7 +17,7 @@ Entry delimiter: § (section sign). Entries can be multiline. Character limits (not tokens) because char counts are model-independent. Design: -- Single `memory` tool with action parameter: add, replace, remove, read +- Single `memory` tool with action parameter: add, replace, remove - replace/remove use short unique substring matching (not full text or IDs) - Behavioral guidance lives in the tool schema description - Frozen snapshot pattern: system prompt is stable, tool responses show live state