Context
The reliability detectors catch repeated identical calls (loops) and error-heavy retry bursts (retry-storm), but not unbounded tool fan-out — a single agent/chain span spawning an excessive number of tool children (parallel-call explosion), which signals a runaway plan and burns budget. Trace.children() already gives the parent→child structure needed.
Needs design (threshold, whether it counts direct children vs. subtree, per-tool vs. total), so help wanted.
What to do
Add a tool-fan-out detector that emits a warn (or error) finding when a single parent span has more than a configurable N direct tool children (default e.g. 20). Use Trace.children(); keep it pure/deterministic; emit the parent span id plus a deterministic count in the message. Register in ALL, seed a fixture, add a test.
Acceptance criteria
- New detector registered in
ALL, follows the Detector Protocol, threshold is configurable via its constructor (mirroring BudgetOverrunDetector).
- Fires on a seeded wide-fan-out trace; does not fire on existing clean fixtures.
- Deterministic; documented in the README detector table.
Pointers
src/taintline/model.py:52-55 — Trace.children()
src/taintline/detectors/reliability.py:231-263 — BudgetOverrunDetector, the pattern for a configurable-threshold detector
src/taintline/detectors/__init__.py:21-29 — register in ALL
- README detector table — add a row
Context
The reliability detectors catch repeated identical calls (
loops) and error-heavy retry bursts (retry-storm), but not unbounded tool fan-out — a single agent/chain span spawning an excessive number of tool children (parallel-call explosion), which signals a runaway plan and burns budget.Trace.children()already gives the parent→child structure needed.Needs design (threshold, whether it counts direct children vs. subtree, per-tool vs. total), so
help wanted.What to do
Add a
tool-fan-outdetector that emits awarn(orerror) finding when a single parent span has more than a configurable N direct tool children (default e.g. 20). UseTrace.children(); keep it pure/deterministic; emit the parent span id plus a deterministic count in the message. Register inALL, seed a fixture, add a test.Acceptance criteria
ALL, follows theDetectorProtocol, threshold is configurable via its constructor (mirroringBudgetOverrunDetector).Pointers
src/taintline/model.py:52-55—Trace.children()src/taintline/detectors/reliability.py:231-263—BudgetOverrunDetector, the pattern for a configurable-threshold detectorsrc/taintline/detectors/__init__.py:21-29— register inALL