Skip to content

Commit 1f75d66

Browse files
committed
fix(sync): CI fallout from the 301-commit merge (2 cross-feature gaps)
1. conversation_loop.py non-retryable fail-fast (#366) returned str(api_error) — a 403 Cloudflare body is ~60 KB of raw HTML that leaked into result['error'] and got delivered to chat. Our fail-fast path predates upstream's 'summarize non-retryable error' fix; return the already-computed _nr_summary instead (matches the other non-retryable paths). Fixes test_nonretryable_error_html_summary. 2. test_setup_blank_slate expected the upstream baseline tool set; our fork's repo_map (#320) lives in the file toolset so blank-slate includes it. Added repo_map to the expected set with a note.
1 parent 8d67f40 commit 1f75d66

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

agent/conversation_loop.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,12 @@ def _perform_api_call(next_api_kwargs):
31333133
"api_calls": api_call_count,
31343134
"completed": False,
31353135
"failed": True,
3136-
"error": str(api_error),
3136+
# Use the summarized error, not str(api_error): a 403
3137+
# Cloudflare challenge body is ~60 KB of raw HTML and
3138+
# must not leak into result['error'] (it gets delivered
3139+
# to chat). Matches the other non-retryable paths.
3140+
# See test_nonretryable_error_html_summary.
3141+
"error": _nr_summary,
31373142
"failure_reason": classified.reason.value,
31383143
}
31393144

tests/hermes_cli/test_setup_blank_slate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ def test_tool_schema_builder_yields_only_file_and_terminal_tools(self):
5656
names = sorted(
5757
{(d.get("function") or {}).get("name") or d.get("name") for d in defs}
5858
)
59-
assert names == ["patch", "process", "read_file", "search_files",
60-
"terminal", "write_file"]
59+
# repo_map is an evolution-fork addition (#320) that lives in the file
60+
# toolset, so blank-slate (file + terminal) includes it. Upstream's
61+
# baseline lacks it — keep it in this expected set on the fork.
62+
assert names == ["patch", "process", "read_file", "repo_map",
63+
"search_files", "terminal", "write_file"]
6164

6265

6366
class TestBlankSlateMinimizeConfig:

0 commit comments

Comments
 (0)