Cha
1.9.0 - 2026-04-25
v1.9.0
Apr 25 2026 at 14:25 UTC
Added
module_envy— flags a function that makes ≥ 3 calls into another file in the project while making ≤ half as many calls within its own file. The function is a "resident" of the wrong module — its body does work that belongs in the envied module. Suppresses test →common.rspairs and calls to conventional helper filenames (utils,helpers,shared,prelude, …) where cross-file dependency is idiomatic, not misplaced. Hint severity.typed_intimacy— flags file pairs whose function signatures exchange each other's declared types in both directions. Stronger signal than import-levelinappropriate_intimacy: the pair literally accepts/returns types defined in each other, indicating they're functionally fused at the type boundary. Emits one finding per side of the pair, listing the shared type names. Hint severity.async_callback_leak— flags a function signature that exposes a raw concurrency primitive (JoinHandle,Future,Task,Sender,Receiver,Promise,Awaitable,Coroutine,CancelFunc, …) in its return type or parameters. Skips launcher-shaped names (spawn_*,launch_*,start_*) where exposing the handle is the function's whole purpose. Hint severity.anemic_domain_model— flags a class that is pure data (≥ 2 fields, no behavior) paired with one or more external service-shaped functions (filename ends inservice/manager/handler/helper/util, or function name starts with a service verb prefix likeprocess_/validate_/calculate_) that take the class as a first parameter. Promotes adata_classhint into an architectural finding when there's evidence the paired service owns behavior that should live on the class itself. Hint severity.test_only_type_in_production— warns when production code references a class/struct declared only in test files (mocks, stubs, fixtures). Surfaces test scaffolding bleeding into shipping code. Warning severity.return_type_leakpost-analysis finding — dual ofabstraction_boundary_leak. Detects when a dispatcher fans out to ≥ 3 sibling handlers whose return types are all the same non-local type, surfacing missing Anti-Corruption Layer on the way out. lvgl scan identifies thorvg'sTVG_APIleaking through dispatcher boundaries.FunctionInfo.return_type: Option<TypeRef>— parsers extract the declared return type and resolve its origin through the same imports/type-registry pipeline as parameters. WIT schema grows an optionalreturn-typefield.- Container-expression primitive fallback: PEP 585
dict[K, V]/list[T]/tuple[...]resolve to Primitive instead of Unknown, eliminating false positives on Python handlers that return built-in container types.
Changed
- WIT
function-inforecord gainsreturn-type: option<type-ref>— breaking for WASM plugins, rebuild against the new SDK. cha-cli/src/analyze.rs— extracted C OOP false-positive filter toc_oop_filter.rsand splitrun_post_analysisinto git-based and signature-based helpers to keep the orchestrator lean as more post-analysis passes land.