refactor: collapse dual stat buckets, prune unused params, kill dead helpers
Tracer:
- Collapse the ``live`` / ``completed`` LLM stat buckets into one
flat dict. The ``completed`` bucket was only ever written by tests
— production never moved stats across, and ``get_total_llm_stats``
always summed both for display.
- Drop ``record_llm_usage(agent_id=...)``: argument was unused, and
the per-call ``bucket=`` knob is gone with the buckets.
run_config_factory:
- Drop unused ``parallel_tool_calls``, ``tool_choice`` parameters
from ``make_run_config`` — no caller ever overrode them.
- Drop ``agent_name`` from ``make_agent_context`` — set into the
context dict but no consumer ever read it; the bus's ``names`` map
is the source of truth.
Wire reasoning_effort through:
- ``Config.get("strix_reasoning_effort")`` is now actually plumbed
to ``make_run_config`` from ``entry.py``. Previously the env var
was advertised but never consumed.
Multi-agent graph tools:
- Replace six copies of
``inner = ctx.context if isinstance(ctx.context, dict) else {}``
with a single ``_ctx(ctx)`` helper.
Todo tools:
- Lift the duplicated ``priority_order`` / ``status_order`` dicts
to module-level ``_PRIORITY_RANK`` / ``_STATUS_RANK`` and replace
both inline sort lambdas with ``_todo_sort_key``.
Notes tools:
- Delete ``append_note_content`` (and its test): docstring claimed
it was for an "agents-graph wiki-update hook on agent_finish" that
was never wired up. Pure dead public API.
Style:
- Drop the ``del ctx`` no-ops from notes / reporting / web_search
tools. ``ARG001`` is already silenced project-wide for tool
modules; the ``del`` was cargo-culted.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,6 @@ def test_max_turns_default_is_300() -> None:
|
||||
tool_server_host_port=None,
|
||||
caido_host_port=None,
|
||||
agent_id="root",
|
||||
agent_name="root",
|
||||
parent_id=None,
|
||||
tracer=None,
|
||||
)
|
||||
@@ -124,7 +123,6 @@ def test_make_agent_context_full_shape() -> None:
|
||||
tool_server_host_port=48081,
|
||||
caido_host_port=48080,
|
||||
agent_id="agent-1",
|
||||
agent_name="root",
|
||||
parent_id=None,
|
||||
tracer="not-a-real-tracer",
|
||||
is_whitebox=True,
|
||||
@@ -154,7 +152,6 @@ def test_make_agent_context_is_whitebox_defaults_false() -> None:
|
||||
tool_server_host_port=None,
|
||||
caido_host_port=None,
|
||||
agent_id="r",
|
||||
agent_name="root",
|
||||
parent_id=None,
|
||||
tracer=None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user