Problem
tool_avoidance remains declared in the harness metrics registry, but current main has no production call sites for tool_avoided(). Its only callers are unit tests. It therefore provides no observation of tool avoidance during ordinary runtime execution.
Verified against main at d4d46f78ae0eeaed7d18a466196601e8d16bc101:
harness_metrics.py contains the field, record method, and harness.tool_avoidance.count / .details schema entries.
- A repository-wide search for
tool_avoided|tool_avoidance finds only that module and tests/test_harness_metrics.py.
to_span_attributes() omits falsey values, and the empty-metrics test explicitly expects the count attribute to be absent. This is an unwired metric, not an explicit zero exported on every trace.
Historical clarification
The initial public-release commit f6f28f58 did contain two record call sites in src/nooa/tools/shell_tools_legacy.py. That legacy implementation was subsequently removed in 777bac15 (chore: remove unused ShellToolsLegacy). Consequently, “zero call sites since the initial release” would be inaccurate; the current absence of production callers is verified.
Proposed change
- Remove the
tool_avoidance field and tool_avoided() record method.
- Remove both tool-avoidance span-schema entries.
- Update the affected tests, preserving coverage for shell/repository failure metrics and empty attribute omission.
- Document removal of the metric/method so downstream consumers can adjust.
Do not add raw-command heuristics at the shell boundary as part of this cleanup. Classifying whether a command bypasses an available higher-level tool can instead be explored in offline trace analysis, where the surrounding execution context is available. Existing external trace-analysis coverage has not been independently verified here.
Verification for the implementation
Run uv run pytest tests/test_harness_metrics.py, check the exported schema no longer includes these two entries, and search production code for remaining references. No changes to shell execution behavior are needed.
Reported by Wendell during a harness-metrics verification walkthrough for trace-analysis tooling.
Problem
tool_avoidanceremains declared in the harness metrics registry, but currentmainhas no production call sites fortool_avoided(). Its only callers are unit tests. It therefore provides no observation of tool avoidance during ordinary runtime execution.Verified against main at
d4d46f78ae0eeaed7d18a466196601e8d16bc101:harness_metrics.pycontains the field, record method, andharness.tool_avoidance.count/.detailsschema entries.tool_avoided|tool_avoidancefinds only that module andtests/test_harness_metrics.py.to_span_attributes()omits falsey values, and the empty-metrics test explicitly expects the count attribute to be absent. This is an unwired metric, not an explicit zero exported on every trace.Historical clarification
The initial public-release commit
f6f28f58did contain two record call sites insrc/nooa/tools/shell_tools_legacy.py. That legacy implementation was subsequently removed in777bac15(chore: remove unused ShellToolsLegacy). Consequently, “zero call sites since the initial release” would be inaccurate; the current absence of production callers is verified.Proposed change
tool_avoidancefield andtool_avoided()record method.Do not add raw-command heuristics at the shell boundary as part of this cleanup. Classifying whether a command bypasses an available higher-level tool can instead be explored in offline trace analysis, where the surrounding execution context is available. Existing external trace-analysis coverage has not been independently verified here.
Verification for the implementation
Run
uv run pytest tests/test_harness_metrics.py, check the exported schema no longer includes these two entries, and search production code for remaining references. No changes to shell execution behavior are needed.Reported by Wendell during a harness-metrics verification walkthrough for trace-analysis tooling.