Skip to content

run_diagnostic_code is registered without is_available/extract_params, crashes on every dispatch #956

@canetizen

Description

@canetizen

Same shape as #730 / #702 / #706 — a @tool(...) registration without the availability guard or the param extractor, so the dispatcher calls the function with empty kwargs and the required code argument is missing. run_diagnostic_code was introduced in #485 and wasn't picked up by the fix wave (#732, #703, #704, #707).

Reproduces on tag v2026.4.25 (commit d3d11915) under both llama3.1:8b and qwen2.5:7b through Ollama, so it isn't a model-specific quirk.

Reproducer plus run.log artefacts for six chaos scenarios, each with the warning visible, are at https://github.com/canetizen/opensre-distributed-rca. One excerpt:

● Planning  21.9s  Grafana Loki, run diagnostic code
[WARNING] Action failed: run_diagnostic_code:FAILED(TypeError: run_diagnostic_code() missing 1 require)
● Gathering evidence  21ms  grafana:4 logs (0 errors) | Errors: run_diagnostic_code:FAILED(...)

The dispatcher (app/nodes/investigate/execution/execute_actions.py:49-50) does:

kwargs = action.extract_params(available_sources)
data = action.run(**kwargs)

With no is_available, the planner sees run_diagnostic_code on every investigation. With no extract_params, kwargs ends up empty, and run_diagnostic_code(code: str, ...) raises immediately.

The DB-tools fix was easy — gate them on "<source>" in available_sources. This one is genuinely meant to be always-on, but its code argument is supposed to come from the LLM's tool-call payload, which the dispatcher path doesn't surface anywhere. The cheap fix is is_available=lambda _: False to stop the warning flood; the real fix is threading tool-call args into the dispatcher. Let me know which direction you'd want and I'll send a PR.

Environment: OpenSRE v2026.4.25 / Python 3.11 (python:3.11-slim) / Ollama 0.21.2 on a single host with an NVIDIA GTX 1660 Ti, models llama3.1:8b and qwen2.5:7b.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions