buggy_investigate
Prove a Python function defect by executing generated inputs and return a reproducible failing-call certificate; use before editing risky code and after fixes to verify the fix holds.
Instructions
Prove whether a Python function has a defect, by executing it on generated inputs. Returns a certificate naming the exact failing call, verified three ways: the input satisfied the preconditions, the failure was re-observed in a fresh process, and it recurred on repeat attempts. A proven finding is reproducible by hand. 'unconfirmed' means no failing input was found within the budget and is NOT a proof of safety. Use this before editing a risky function, and after editing one to check the fix held.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"function": "<function>",
"file": "<file>"
},
"name": "buggy_investigate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the Python file, absolute or relative to cwd. | |
| budget | No | Inputs to execute before giving up. Default 300. | |
| record | No | Store a proven defect in .buggy/ so it can be re-run later with buggy_recheck. Default false; a tool inspecting code should not write files uninvited. | |
| timeout | No | Seconds allowed per call. Default 2. | |
| function | Yes | Function name. Use a dotted name for a class member, e.g. 'Cart.total'. | |
| receiver | No | Expression building the object an instance method is called on, e.g. 'Cart([1, 2])'. Inferred from __init__ when omitted. | |
| preconditions | No | Preconditions as PYTHON expressions over the parameter names, e.g. 'budget > 0'. For an instance method the constructor's parameters are in scope too. Inputs that fail these are skipped, so they also decide which inputs a fix is allowed to change. | |
| postconditions | No | Postconditions as PYTHON expressions. 'result' is the return value, e.g. 'result >= 0'. A condition that cannot be evaluated is reported as a warning, never silently skipped. |