Skip to content

v0.24.0

Choose a tag to compare

@clouatre clouatre released this 07 Jul 16:43
v0.24.0
0b05f51

What's Changed

Features

  • 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.

Bug Fixes

  • fix(exec_command): bound drain task memory by enforcing byte budget before Vec materialization (#1303): Adds MAX_DRAIN_STDOUT_BYTES (30 KB) and MAX_DRAIN_STDERR_BYTES (10 KB) as module-level constants matching handle_output_persist caps. The drain task now tracks per-stream byte counters, skips tx.send after budget exhaustion, and continues reading the child pipe to prevent blocking. Threads byte_budget_hit out of the drain task JoinHandle into ExecutionResult, OR'd into output_truncated in run_exec_impl.

Refactors

  • 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.

Chores

  • docs(audit): usage, observability, and code size audit July 2026 (#1288): Adds docs/audit/2026-07-05-usage-observability-code-size.md, a point-in-time audit over 118,113 JSONL calls (2026-06-05 to 2026-07-05). Documents observability gaps O1-O6 (unmetricated parameters, missing error metrics) and code size findings S1-S7 (4 files over 1,500 LOC, 9 functions over 130 LOC). All 7 tools were called in the window; no tool is a removal candidate.

  • chore(deps): update GitHub Actions (#1300): Renovate-managed update of pinned GitHub Actions SHAs.

  • chore(deps): update non-major dependencies (#1299): Renovate-managed update of non-major Rust dependencies including rust 1.96.01.96.1 and tree-sitter 0.26.90.26.10.

Full Changelog

v0.23.0...v0.24.0