Commit History
-
Add CI for tests and Ruff (#217)
Unverified signature* Add CI for tests and Ruff Co-authored-by: OpenAI Codex <codex@openai.com> * Enforce Ruff formatting in CI Co-authored-by: OpenAI Codex <codex@openai.com> * Document Ruff pre-commit checks Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>754345f
-
fix(doom_loop): normalize tool-call args before hashing (#119)
d 🔹 +2: d 🔹, Aksel Joonas ReediUnverified signatureThe doom-loop detector hashed raw `function.arguments` strings, so semantically-identical tool calls hashed differently when the LLM emitted them with different key orderings (`{"a":1,"b":2}` vs `{"b":2,"a":1}`) or whitespace (`{"a":1}` vs `{"a": 1}`). This silently broke `detect_identical_consecutive` and `detect_repeating_sequence`: the agent could be calling the same tool with the same args repeatedly and the detector would see three distinct signatures and stay quiet. Issue #61 P1 explicitly calls this out: > Add semantic-similarity or normalized-task matching for `research`. Fix: parse-and-redump JSON via `json.dumps(..., sort_keys=True, separators=(",", ":"))` before hashing. Falls back to the raw string when the input isn't valid JSON so non-JSON `arguments` strings (rare edge for some providers) keep the legacy behaviour and never raise. Tests: 23 new cases in `tests/unit/test_doom_loop.py` covering `_normalize_args`, `_hash_args`, `extract_recent_tool_signatures`, `detect_i…07c5699