Skip to content

v0.22.0

Choose a tag to compare

@clouatre clouatre released this 26 Jun 20:47
v0.22.0
d68545c

Caution

This version is yanked. A critical bug introduced in this release causes the server to return -32603 Transport closed on all tool calls after the first tracing::debug! event (triggered on any analyze_file cache miss). Every session is affected. Upgrade to v0.22.3.

What's Changed

Refactoring

  • Milestone 18: formatter.rs and exec_command_impl decomposition (#1231, #1233, closes #1221, #1198): Continues the post-M17 structural cleanup by splitting two remaining oversized files.

    • formatter.rs (previously ~2,886 LOC) split into four focused submodules under crates/aptu-coder-core/src/formatter/: emit.rs, render.rs, summary.rs, and pagination.rs. Each module carries a single concern; cross-module surface is pub(crate) only.
    • exec_command_impl (previously 500+ LOC) decomposed into five focused phase functions within exec_command.rs: validate_working_dir_phase, validate_pre_spawn_phase, spawn_and_collect_phase, format_shell_output_phase, and an ~80-line orchestrator body. Shell write validation extracted to its own module shell_write.rs.
  • refactor(edit): remove working_dir containment check, align with MCP 2025-11-25 (#1244, closes #1239): Removes the directory-containment guard from edit_overwrite and edit_replace. The MCP 2025-11-25 specification places path confinement as an operator responsibility; the server-side check was both redundant and too restrictive for legitimate multi-root workspace scenarios. working_dir remains a path-resolution convenience parameter.

Bug Fixes

  • fix(exec): reject heredoc stdin-pipe patterns before spawn (#1238, #1241, closes #1240): Adds pre-spawn validation in shell_write::validate_heredocs that rejects four heredoc misuse classes before the child process is spawned, eliminating potential 300-second hangs:
    1. File-write pattern (cat/tee/redirect paired with <<)
    2. Stdin-consuming flag (--body-file -, --data -, etc.) paired with <<
    3. params.stdin set while the command contains <<
    4. Missing closing heredoc delimiter

Performance

  • perf(core): eliminate allocations in OTEL telemetry, BFS traversal, and cache (#1230, closes #1224): Three targeted allocation reductions with no public API change:
    • OTEL path: replaced 3x event.tool and 1x tier String allocations in record_otel_metrics() with &'static str values passed directly via Into<Value>.
    • Graph BFS: replaced VecDeque<(String, u32)> and HashSet<String> with Arc<str> equivalents; refcount bumps are cheaper than full String clones during traversal.
    • Cache: replaced 4 unsafe { NonZeroUsize::new_unchecked() } blocks with safe .new().expect() equivalents; all inputs are guaranteed non-zero by .max(1) guards or constants.

Chores

  • chore(types): remove dead API types and peer field; bump version to 0.22.0 (#1227, closes #1222): Deletes three public types with zero usages (AnalysisResult, FocusedAnalysisData, CallChain) and the dead peer field from AnalyzeSymbolContext. Workspace version bumped 0.21.0 -> 0.22.0; aptu-coder-core dependency pin updated accordingly. cargo semver-checks enforces the bump for the breaking removal.

  • chore(api): fix unreachable_pub and add #[must_use] annotations (#1228, closes #1223): Nine pub mod demoted to pub(crate) in tools/mod.rs; 19 MetricEventBuilder methods and 6 utility functions demoted to pub(crate) in metrics.rs; #[must_use] added to 2 constructors in lib.rs and 7 functions in aptu-coder-core; pub mod logging/metrics/otel changed to pub(crate) with 6 targeted pub use re-exports for external consumers.

  • chore(lint): add workspace lints, remove language feature gates, extract main() helpers (#1235, closes #1225): Adds four workspace-level Clippy lints (must_use_candidate, redundant_clone, needless_pass_by_value, large_enum_variant) and one rustc lint (unreachable_pub) to Cargo.toml. Unifies per-language feature flags that were asymmetrically gated. Refactors main() by extracting initialization helpers.

  • chore(deps): update Cargo.lock and drop deprecated enable_logging (#1236): Bumps 14 packages to latest compatible versions, including rmcp/rmcp-macros 1.7.0 -> 1.8.0. Removes the deprecated enable_logging call removed in rmcp 1.8.0.

  • chore(ci): remove native issue-triage workflow (#1234): Deletes .github/workflows/issue-triage.yml; the aptu GitHub App handles issue triage via repository_dispatch for all repos.

  • docs(tools): tighten tool descriptions for analyze_* and edit_* (#1242): Sharpens parameter descriptions, leads with failure conditions, and reorders clause priority across all six analyze/edit tool descriptions to reduce token consumption and improve LLM parse accuracy.

  • docs(audit): 2026-06 structural refactor audit report (#1226): Adds docs/audit/2026-06-structural-refactor.md, a 15-finding audit conducted against v0.21.0 covering structure, dead code, and idioms. Findings consolidated into 5 implementation issues (#1221--#1225), all resolved in this release.

Full Changelog

v0.21.0...v0.22.0