v0.22.0
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.rsandexec_command_impldecomposition (#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 undercrates/aptu-coder-core/src/formatter/:emit.rs,render.rs,summary.rs, andpagination.rs. Each module carries a single concern; cross-module surface ispub(crate)only.exec_command_impl(previously 500+ LOC) decomposed into five focused phase functions withinexec_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 moduleshell_write.rs.
-
refactor(edit): removeworking_dircontainment check, align with MCP 2025-11-25 (#1244, closes #1239): Removes the directory-containment guard fromedit_overwriteandedit_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_dirremains a path-resolution convenience parameter.
Bug Fixes
fix(exec): reject heredoc stdin-pipe patterns before spawn (#1238, #1241, closes #1240): Adds pre-spawn validation inshell_write::validate_heredocsthat rejects four heredoc misuse classes before the child process is spawned, eliminating potential 300-second hangs:- File-write pattern (
cat/tee/redirect paired with<<) - Stdin-consuming flag (
--body-file -,--data -, etc.) paired with<< params.stdinset while the command contains<<- Missing closing heredoc delimiter
- File-write pattern (
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.tooland 1xtierStringallocations inrecord_otel_metrics()with&'static strvalues passed directly viaInto<Value>. - Graph BFS: replaced
VecDeque<(String, u32)>andHashSet<String>withArc<str>equivalents; refcount bumps are cheaper than fullStringclones 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.
- OTEL path: replaced 3x
Chores
-
chore(types): remove dead API types andpeerfield; bump version to 0.22.0 (#1227, closes #1222): Deletes three public types with zero usages (AnalysisResult,FocusedAnalysisData,CallChain) and the deadpeerfield fromAnalyzeSymbolContext. Workspace version bumped0.21.0->0.22.0;aptu-coder-coredependency pin updated accordingly.cargo semver-checksenforces the bump for the breaking removal. -
chore(api): fixunreachable_puband add#[must_use]annotations (#1228, closes #1223): Ninepub moddemoted topub(crate)intools/mod.rs; 19MetricEventBuildermethods and 6 utility functions demoted topub(crate)inmetrics.rs;#[must_use]added to 2 constructors inlib.rsand 7 functions inaptu-coder-core;pub mod logging/metrics/otelchanged topub(crate)with 6 targetedpub usere-exports for external consumers. -
chore(lint): add workspace lints, remove language feature gates, extractmain()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) toCargo.toml. Unifies per-language feature flags that were asymmetrically gated. Refactorsmain()by extracting initialization helpers. -
chore(deps): update Cargo.lock and drop deprecatedenable_logging(#1236): Bumps 14 packages to latest compatible versions, includingrmcp/rmcp-macros1.7.0 -> 1.8.0. Removes the deprecatedenable_loggingcall 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 viarepository_dispatchfor all repos. -
docs(tools): tighten tool descriptions foranalyze_*andedit_*(#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): Addsdocs/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.