-
feat(metrics): add error metrics to analyze_symbol (#1301, closes #1289): analyze_symbol was the only tool emitting no JSONL error metrics; all error exit points in analyze_symbol_handler and its callees were recorded on the tracing span only, making per-tool error rates unmeasurable. Instruments all error paths mirroring the pattern in analyze_file.rs. Extracts err_invalid_params helper that fuses emit_error_metric and ErrorData::new, collapsing verbose double-return blocks to single-call form. Uses saturating cast (min(u64::MAX as u128) as u64) for overflow safety. New integration test file tests/analyze_symbol_error_metrics_tests.rs.
-
feat(metrics): record 14 unmetricated tool parameters in JSONL (#1304, closes #1290): Resolves O2, O3, O4 from the July 2026 usage-observability audit. Adds 14 new optional fields to MetricEvent covering git_ref_used, summary_mode, is_paginated, fields_projected, match_mode, follow_depth, import_lookup, def_use, impl_only (analyze_symbol); stdin_provided, timeout_configured_ms, drain_timeout_ms, working_dir_used (exec_command/edit_*). All new fields use skip_serializing_if and are omitted from JSONL when null or false; existing jq one-liners and scripts/mcp-metrics.py are unaffected. docs/METRICS.md updated with 14 new rows in the field schema and backward-compatibility tables.
-
refactor(core): split analyze.rs into analyze.rs + analyze_focused.rs (#1310, closes #1293): Extracts focused-analysis orchestration (call-graph traversal, import lookup, wildcard resolution) into a new sibling module analyze_focused.rs (1,037 LOC), keeping directory walk, file analysis, and top-level dispatch in analyze.rs (1,059 LOC, down from 2,075). All call sites remain unchanged via pub use re-exports in analyze.rs; analyze_focused is pub(crate) and not part of the public API.
-
refactor(core): split parser.rs into parser.rs + parser_elements.rs (#1309, closes #1294): Extracts element extraction helpers (extract_elements, extract_calls, extract_imports, extract_impl_methods, extract_references, extract_impl_traits_from_tree, extract_def_use, and import helpers) into a new sibling module parser_elements.rs (918 LOC). parser.rs reduced from 1,949 to 1,038 LOC. All extracted functions are pub(crate); public API unchanged.
-
refactor(aptu-coder): split exec_command, analyze_symbol, and cache into sibling modules (#1308, closes #1297): Three oversized files split below 600 LOC each. Extracts tools/exec_runtime.rs (480 LOC) from exec_command.rs, tools/symbol_focused.rs (494 LOC) from analyze_symbol.rs, and crates/aptu-coder-core/src/cache_disk.rs (415 LOC) from cache.rs. Fixes two regressions introduced during cache_disk extraction: a spurious third shard level in entry_path that caused put() and get() to disagree on the on-disk location, and a dead double-read block in get().
-
refactor: split tests.rs into domain test files under tests/ (#1307, closes #1295): Splits crates/aptu-coder/src/tests.rs (1,886 LOC, 66 test functions) into six files under tests/: mod.rs, helpers.rs, metrics_tests.rs, filter_tests.rs, exec_tests.rs, edit_tests.rs, and common_tests.rs. No test logic changes; unsafe environment-variable blocks annotated with // SAFETY: comments and serialized with #[serial_test::serial].
-
refactor(aptu-coder): split metrics.rs into metrics.rs + metrics_export.rs (#1306, closes #1296): Splits crates/aptu-coder/src/metrics.rs (1,499 LOC) into metrics.rs (631 LOC, in-memory buffer logic) and metrics_export.rs (954 LOC, file I/O, export logic, date/path utilities, cleanup, migration). Public API unchanged via re-exports in metrics.rs and lib.rs.
-
refactor(aptu-coder): split shell_write.rs into heredoc_validation.rs + shell_scan.rs (#1305, closes #1298): Splits crates/aptu-coder/src/shell_write.rs (615 LOC) into heredoc_validation.rs (validate_heredocs and its four private error constructors), shell_scan.rs (scan_backward_for_file_write, scan_backward_for_stdin_flag, token helpers, four existing unit tests), and a 14-LOC re-export shim retaining the original module path. Adds 6 new unit tests covering all heredoc guard cases.