mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
* fix: sort tool_definitions() for deterministic LLM tool ordering HashMap iteration order is non-deterministic, causing the LLM to receive tools in different orders across calls. Sort alphabetically by name to eliminate position bias in tool selection. Closes #566 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * refactor: use sort_unstable_by for tool definitions ordering Stable sort is unnecessary since tool names are unique. Unstable sort avoids the overhead of preserving equal-element order. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix: repair bad merge in registry.rs (missing closing brace and test attribute) The merge of main into fix/sort-tool-definitions dropped the closing `}` of test_tool_definitions_sorted_alphabetically and the `#[tokio::test]` attribute on test_retain_only_filters_tools, causing an unclosed delimiter parse error that failed all CI jobs. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>