Skip to content

v0.21.0

Choose a tag to compare

@clouatre clouatre released this 24 Jun 14:20
v0.21.0
3fbd64a

What's Changed

Refactoring

  • Milestone 17: lib.rs decomposition into tools/ submodule (#1201, #1202, #1203, #1204, #1205, #1206, #1207, #1208, #1209, #1213, closes #1182, #1187, #1188, #1189, #1190, #1191, #1192, #1193, #1184): Decomposes the monolithic crates/aptu-coder/src/lib.rs (previously ~3,600 LOC) into a thin shim layer backed by a new tools/ submodule. Each tool handler now lives in its own dedicated module:
    • tools/exec_command.rs -- exec_command_impl, ExecContext, ExecutionResult, and five private helpers; DEFAULT_DRAIN_TIMEOUT_MS moved here from lib.rs
    • tools/edit_overwrite.rs -- edit_overwrite free function
    • tools/edit_replace.rs -- edit_replace free function; StaleContextGuard struct (with increment / reset methods), build_not_found_message, stale_context_error_msg, handle_edit_error, resolve_edit_path, send_replace_error_metric helpers; EDIT_STALE_THRESHOLD and EDIT_FAILURE_MAP_CAP constants
    • tools/analyze_directory.rs -- analyze_directory free function
    • tools/analyze_file.rs -- analyze_file free function
    • tools/analyze_symbol.rs -- analyze_symbol_handler dispatcher (~49 lines), handle_import_lookup, handle_call_graph, AnalyzeSymbolContext; runtime INVALID_PARAMS guard for the previously-silently-ignored import_lookup=true + def_use=true combination
    • tools/analyze_module.rs -- analyze_module free function, AnalyzeModuleContext
    • tools/common.rs -- shared helpers used by 2+ modules: error_meta, err_to_tool_result, summary_cursor_conflict, no_cache_meta, ErrorMeta
    • tools/server.rs -- server constructor and non-shim server helpers
    • Inline test module extracted to src/tests.rs
    • lib.rs reduced from ~3,600 to ~911 LOC; all #[tool(...)] decorator methods remain in lib.rs as thin shims with no behavior change
    • No public API change; no new #[allow(...)] directives

Bug Fixes

  • fix(lib): tighten crate public API -- demote internal tool helpers to pub(crate) (#1212, closes #1210): Demotes six internal helpers from pub to pub(crate) in tools/common.rs; removes the pub use tools::common::* re-export block from lib.rs. Moves ClientMetadata and extract_and_set_trace_context into the existing pub mod otel module where they semantically belong. Removes three stale #[allow(dead_code)] suppressors. Fixes the underlying clippy warning by replacing mod otel in main.rs with use aptu_coder::otel so the binary shares the library module.

  • fix(ci): raise pr-review max-prompt-chars to 200k (#1219): Raises max-prompt-chars from 120,000 to 200,000 in pr-review.yml. The previous limit caused PR 1217 to drop 50,537 chars of patches across all 10 changed files because the base context consumed the entire budget before patch assembly began. The 200k limit is within the context windows of all configured models (Gemini Flash and Mercury-2).

Chores

  • post-M17 cleanup (#1218, closes #1217): Removes progress notification stubs left from the extraction milestone; deduplicates validators and helpers surfaced during the decomposition audit.

Full Changelog

v0.20.5...v0.21.0