MutaFix run: toolz-012
ranker nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B · patcher nvidia/nemotron-3-super-120b-a12b · via Nebius Token Factory
fixedoutcome
4swall time
2model calls
$0.0003API cost
Benchmark ground truth (hidden from the agent)
- elif not (any(checks)): (injected bug)+ elif any(checks): (original)retriever rank 1 of 20 · ranker position 1 · patched the right function yes · exact restore no
Trace
reproduce
1 failing test(s) · 1 failed, 185 passed, 1 skipped, 1 deselected · 0.43s
failing tests and errors
toolz/tests/test_inspect_args.py::test_has_varargstoolz/tests/test_inspect_args.py::test_has_varargs
E assert False is None E + where False = has_varargs(max)
trace
re-ran 1 test file(s) with the trace plugin: 1 failing and 16 passing tests, 4 library functions ran in a failing test · 0.33s
retrieve
161 functions indexed, 8 reachable from
toolz/tests/test_inspect_args.py::test_has_varargs in the static call graph. Kept 20 candidates, ranked by spectrum score (Ochiai), call graph and BM25 break ties.candidates in retriever order
toolz/_signatures.py::_has_varargstoolz/_signatures.py::check_varargstoolz/functoolz.py::has_varargstoolz/functoolz.py::_check_sigspectoolz/functoolz.py::_check_sigspectoolz/functoolz.py::curry.functoolz/functoolz.py::Compose.__signature__toolz/functoolz.py::curry.__signature__toolz/functoolz.py::curry._should_currytoolz/functoolz.py::is_aritytoolz/curried/exceptions.py::mergetoolz/curried/exceptions.py::merge_withtoolz/_signatures.py::get_exclude_keywordstoolz/__init__.py::__getattr__toolz/functoolz.py::applytoolz/functoolz.py::curry.__init__toolz/itertoolz.py::partition_alltoolz/functoolz.py::memoizetoolz/functoolz.py::curry.__call__toolz/functoolz.py::memoize.<locals>.key
rank
toolz/_signatures.py::_has_varargstoolz/_signatures.py::check_varargstoolz/functoolz.py::has_varargstoolz/functoolz.py::_check_sigspectoolz/functoolz.py::_check_sigspec
read
read toolz/_signatures.py::_has_varargs
The failing test expects has_varargs(max) to return None, but the current implementation returns False. The bug is in _has_varargs where it returns False instead of None when not all checks pass. This needs to be fixed to match the test expectation.
patch
The current code returns False when some checks pass but not all, but the test expects None for cases like max. The fix ensures that when not all checks pass (whether some pass or none), it returns None, which matches the test expectation.
--- a/toolz/_signatures.py+++ b/toolz/_signatures.py@@ -750,4 +750,6 @@ elif not (any(checks)): return None+ else:+ return None return False
tests: all tests pass
Final patch
--- a/toolz/_signatures.py+++ b/toolz/_signatures.py@@ -750,4 +750,6 @@ elif not (any(checks)): return None+ else:+ return None return False