Skip to content

Code Analysis Language Capabilities

Tu Shaokun edited this page Nov 9, 2026 · 33 revisions

Code Analysis language capabilities

当前能力与使用边界 · 2026-11-09

共享 Labs 固定在 bf0a29e76,有 JS/TS、Python、Java 源码适配器。下表描述六语言实验候选的调查能力。Go、Rust 以及表中引用的其他语言增强仍属 Draft。最近核对到 #1298 的 4390816b8;各语言实测沿用各自报告中的固定版本。Labs 适配器目录 · 候选 PR

语言 已验证的调查路径 还需读者核查的边界
JavaScript Prettier 的变更可沿稳定函数引用和默认导入找到已知调用方。 工厂返回值、回调身份和动态加载仍可能未知。实测
TypeScript Redux 的公共导入可穿过显式 ESM 转发,定位到实现体,并区分重载签名。 工厂返回的 reducer 后续由谁调用仍有遗漏。别名解析依赖采集到的配置。实测
Python Jinja 的公开函数可从调用点经包入口的一次显式再导出跳到实现。 运行时生成的 callable、装饰器和 Flask LocalProxy 等动态成员关系需额外证据。实测
Java Commons Lang 的受限静态方法和 SLF4J 声明的直接 Maven 项目依赖可导航到源文件。 同参数个数的重载、完整 classpath、虚调用和运行时 provider 选择仍需核实。实测
Go 从具体方法变更可反查直接调用与接口候选。gin 可定位经过外部嵌入接口的调用现场。 外部声明可能没有已采集的源码锚点;接口使用不能确定运行时接收者。实测
Rust bytes 可追踪 trait 默认方法和有明确展开来源的宏模板。futures 可沿本地 helper 的闭包参数约束找到 trait 声明。 闭包参数可沿已采集的 helper 函数签名绑定;经迭代器适配器传入的参数仍可能未知,cfg 和宏也会限制覆盖。实测

如何阅读查询结果。 调用位置说明表达式写在哪里;目标声明说明静态证据能绑定到谁;接口或 trait 候选仍可能有多个运行时实现。先核对版本、构建配置、选取的文件、解析错误和输出截断。即使文件已采集,目标也可能解析失败。partial 下仍可能有有效导航;空列表只能说明该范围内没有返回已知引用。

固定样本。 在同一批 20 道 Go/Rust 题中,#1298 的 Go 命中 62/62 个预列位置,Rust 命中 19/24。Go 的数字包含 5 个只能确认外部接口调用现场的结果。这批题被反复用于回归,其分母只涵盖预列位置。六种语言尚无统一的陌生仓库准确率、完整影响范围或审查耗时收益数据。逐题对照

Rust 闭包类型的修复与剩余缺口。 v13(3ab78d5be)曾把 helper 声明模块中的 provider::Item::mark 错绑到调用方同名方法。修复提交为 2c1937b93,在 v14 最终提交 4390816b8 上独立用正常 CLI 查询原始最小反例:只改 provider,返回第 9 行的闭包调用;只改 caller,返回零条。团队的双调用夹具另验证了 provider 两条、caller 零条。tracing 的 Dispatch::event 在固定样本上从 0/3 到 3/3,含一个跨 crate 调用。futures 维持 2/2,采集状态仍为 partial。ripgrep 的 parents().take_while(...) 仍为 0/1。原 20 题逐位置与 v13 一致。同题对照与剩余遗漏

后续维护。 遇到影响实际审查的错指或遗漏时,补上版本、真实问题、源码位置和查询结果。修复后记录首次通过复验的版本。预期未知可长期保留;固定样本、独立新案例和运行时证据分别注明。

Historical evidence through 8 November 2026

Snapshot: 8 November 2026. In Labs, validated in Draft, and unsupported are distinct states. A Draft result is not approval, merge, release or installation.

Shared Labs: bf0a29e7664f52973d06a8e6a608df2db1ecbd39. Preserved shared baseline: Draft #1252, 93378351dc97768fd7e0882a50f32ecc7a34e2a6. It retains #1250, the original A1/A2 contributor commits and previous language contributions. The collaboration overview records original contributors and separately owned work. Those PRs remain unchanged.

Latest cumulative candidate: Draft #1279, head 996e073de, composes the original Java #1273 and independent Rust #1277 histories as layer 13 of native stack #1262. All six languages were replayed through source and ZIP: 96 commands per distribution, 32 raw captures, 63 questions and 170 module files. Local module tests: 410/410; extracted shared tests: 74/74; package gates: 63 passes and 2 environment skips. Final-head CI42442200073 succeeded at996e073de; actual analysis job128613639512 executed410/410 with zero skips. Labs and all 12 lower PR heads remain unchanged.

Previous cumulative follow-up: Draft #1273, head196dd3569, adds bounded declared direct Maven project source evidence above #1272. Local407/407, extracted46/46; source/ZIP and independent attribution are separate from final-head CI42436890903 attempt2 success. Its first nested self-extraction failure and same-head diagnostic retry remain disclosed. Prior Go/Rust/Python real-project evidence keeps its original revision attribution.

Newest independently owned follow-up: Rust lifetime-only owners, Draft #1277, head915d528e5, extends Rust #1270. Local394/394, extracted42/42;95LSP agreements across84physical sites and source/ZIP evidence are separate from successful final-head CI42440422852 (actual module394/394, zero skips). It is now composed into cumulative Draft #1279, preserving both original histories.

Earlier cumulative source/ZIP validation: Draft #1269, 1fa3cd0a097e973d653376721e6b8447f2be12b0, composes #1267 with independent Python #1268, preserving original histories. 26 captures,32 questions,58 CLI commands per distribution and separate CI state. Final-head CI42420773645 completed success (actual module388/388, zero skips). The earlier #1263 composition remains historical evidence. Rust follow-up #1270 extends the candidate with separately recorded source/ZIP evidence and successful final-head CI42424137953 (actual module391/391, zero skips); other-language real replays remain at #1269. No capability moves into Labs and no new independent accuracy denominator is inferred.

Language / capability In Labs Validated in Draft Unsupported / remaining boundary
JavaScript / TypeScript source dependencies, definitions and complexity Yes, source analysis; one language adapter per run Runtime/package-condition corrections, lexical direct-call navigation and paired investigation in #1235/#1244/#1252 ancestry Dynamic/member dispatch, macro-like/generated/runtime identity and complete impact are not established by lexical facts. See call evidence and combined evidence.
JS/TS stable default ordinary-function references No Draft #1260: relative defaults through same-module function references/local default specifiers, source writes/eval guards, real changed-function callers and source/ZIP parity. Fixed evidence and limits. Factories, variable-held defaults, re-export chains, dynamic dispatch and complete impact remain unsupported; configured alias calls are a separate dependent Draft in the next row. Historical v1/v2 captures retain their scope.
JS/TS configured captured-alias direct calls No Draft #1261, dependent on #1260 in native stack #1262: Redux six correct source jumps; eleven new targets independently signature-agreed; source/ZIP parity. Fixed source, configuration, counts and limits. At #1261, re-export/barrel hops were known-target misses; #1271 and current #1279 cover bounded explicit ESM forwarding. Runtime alias loading, successful project compilation and complete impact are not established. Historical v1/v2/v3 coverage stays distinct.
JS/TS explicit ESM forwarding to implementation bodies No Draft #1271, tenth native stack #1262 layer above #1270: four frozen Redux API calls,205compiler-agreed new targets, real changed-definition callers, source/ZIP and saved v4 parity. Pins, recipes and limits. Star/type-only/dynamic/CommonJS/cyclic routes, arbitrary value aliases/factory flow and runtime initialization remain unproved. Observed callable writes/eval block imported attribution; current forwarding-source freshness is required.
Python source dependencies and function analysis Yes Conservative call evidence and paired definitions; #1252 additionally validates unique preceding function-local from-imports Decorated/duplicate targets, closure/global/conditional bindings and member/dynamic calls retain unknowns. #1252 does not bind reexports; see the separate bounded Draft row below. Fixed Click/Jinja versions, commands, source/ZIP comparison.
Python one explicit API function reexport No Draft #1268, independent above #1252: four fixed Jinja/Flask API calls reach their implementation; 35 post-design explicit source chains checked; source/ZIP and historical v1 parity. Pinned evidence and limits. Longer/conditional/rebound/repeated/wildcard chains, decorated/class/member targets and runtime module initialization remain unsupported. Local full suite retains the separately reproduced baseline TypeScript snapshot failure.
Java dependencies and method/constructor analysis Yes, original Java adapter by CheeseMiao0520 Unicode/type namespaces, conservative explicit static calls and paired definitions Overload applicability/compiler attribution, inheritance, virtual/interface dispatch, generated sources and runtime loading remain outside the bounded resolver. Java fixed-source evidence.
Java explicit class-qualified static implementation paths No Draft #1259: explicit import/same-package/full class paths, exact cross-file navigation and captured foreign callers; source/ZIP verified. Fixed cases, compiler counts and limits. Overloads, inherited/value-qualified/ambiguous paths, nonpublic targets, varargs, lambda/nested scopes, virtual/interface dispatch, generated code, argument applicability and complete impact remain unsupported.
Java explicit static calls from classes with captured parents No Draft #1272, eleventh stack #1262 layer above #1271: four frozen Commons calls, ancestor freshness, observed SLF4J wrong-module correction, source/ZIP and independent attribution. Pins, recipes and limits. New inherited-context calls/ancestor evidence stay within one captured build root. At #1272, two valid Simple->Api calls remain known misses; external reload4j target stays unknown. Full Maven/Gradle classpaths, bare inherited calls, argument applicability and runtime dispatch remain unproved. Older non-inherited global candidates keep their previous contract.
Java unique fixed-arity static source candidates No Draft #1267, above #1266 in native stack #1262: two real production source questions recovered; 289 new compiler-agreed targets and three separate source-only reviews; source/ZIP parity. Fixed sources, audit and limits. Same-arity/varargs applicability, inherited callers, static wildcard value identity, virtual dispatch and full overload resolution remain unsupported. At #1267 all five original guarded test-call misses remained misses. #1272/#1273 expand bounded parent/project scope; the current #1279 arity recipe retains three known misses.
Java declared direct Maven project source routes No Draft #1273, twelfth stack#1262 layer: two Simple→Api known misses now have jar/test-jar and captured-parent proof; two reserved existing targets preserved; actual upstream added-definition callers, source/ZIP, metadata freshness and independent attribution. Pins/recipes/limits. Relevant profiles, unresolved properties/parents, imported BOMs, duplicate coordinates, Gradle/custom layouts, transitive/external artifacts and full per-module/compiler/runtime classpaths remain unproved. Existing global candidates retain their historical contract.
Go normal CLI, packages/functions, direct source calls and changed-definition callers No Draft #1256: root module, build/test scope, exact declaration ranges, ordinary/alias/same-package direct functions and paired known callers; source/ZIP verified. Fixed cases and limits. External types/full compilation, interfaces/function variables (concrete methods are in the next Draft row), struct/field definitions, workspaces/replace/vendor/nested modules/cgo/generated build output and complete impact remain unsupported.
Go concrete receiver methods and changed-method callers No Draft #1264, above #1263 in native stack #1262: compiler-selected concrete methods, promotion, expressions, aliases and generic instances; real Chi callers and source/ZIP parity. Fixed sources, attribution and limits. The original #1264 misses37 compiler-known captured-body calls; the SDK follow-up below resolves that fixed cohort without changing #1264 retrospectively. Interface and function-variable dispatch, complete external typing/builds and unrestricted question output remain unsupported.
Go concrete calls with SDK type availability No Draft #1266, above #1265 in native stack #1262: official needed SDK export types recover37 source/compiler-known calls; source/ZIP parity and historical readers. Pinned evidence, costs and limits. Third-party types, full workspace/build semantics and runtime/interface dispatch remain unproved. Fixed full compiler cohort9318/9318 is not whole-project precision/recall.
Rust normal CLI, modules/crates, direct calls and changed-definition callers No Draft #1258: native crate/use/use-as paths, local workspace boundaries, exact ranges and paired callers; source/ZIP verified. Fixed cases and limits. The original #1258 does not resolve associated functions; see the bounded #1265 row below. Receiver/trait dispatch, expanded/generated macros, type/field navigation, external crates, complete Cargo target/feature/build semantics and complete impact remain unsupported.
Rust explicit nominal inherent-function paths and changed-definition callers No Draft #1265, above #1264 in native stack #1262: unique monomorphic inherent source candidates, aliases, same-name module identity and verified references. Fixed source, source/ZIP evidence and limits. Generic/type-alias/Self/receiver/trait applicability, visibility, argument typing and full compiler/build semantics remain unproved. #1265 retains its two reserved generic Map misses; #1270 below verifies a bounded follow-up without rewriting that historical outcome. The independent RA audit agrees on 1,250 target observations/1,230 physical sites; this remains definition agreement, not whole-project accuracy or recall.
Rust bare paths to concrete generic instantiation source candidates No Draft #1270, above #1269 in native stack #1262: five physical constructor calls under two profiles now navigate to concrete impl source; independent RA20/20observations over10physical sites; source/ZIP and historical v1/v2 parity. Pins, model, costs and limits. Explicit generic call arguments, unsupported/generic competing impls, aliases/Self/traits/receivers, const/bounded/defaulted owners and non-plain lifetime cases, plus full applicability/builds remain unproved. Plain lifetime-only owners are a separate #1277 follow-up below. Opaque macro and external backend targets remain unknown.
Rust lifetime-only struct/enum inherent source candidates No Draft #1277, independently above #1270: three frozen regex paths;95LSP observations/84physical sites including post-design serde checks; source/ZIP and historical v1/v2/v3 parity. Pins/recipes/bounds. Concrete static/subset/bounded lifetimes, mixed type/const/default parameters, explicit call arguments, aliases/Self, receivers/traits, macro expansion and full lifetime/borrow/applicability/build/runtime proof remain unproved. Composed into #1279, with original #1277 ownership retained.

Go and Rust source-first investigation

Fixed manifest and source excerpts · Baseline commands, outputs and exits · Scope and acceptance queue.

Answers froze at 580b50393 before the eight unchanged CLI runs at b37f67c49. Each source file is hashed. These are selected source cases, not whole-project accuracy or a blind evaluation.

Language Fixed real projects First developer question Remaining unknown
Go Cobra 41fd44e1df83ad6acd8e14b304d5f2a2ae1d62f5 → e392f3204db0445f1f4ad47448b04d8c8ad04c2a; Chi 67be7d9cafdaeb4e04e887ff78d09e030ee43b00 → 71307f9b7e4e9527638bc951c42b782cd1560331 In Cobra, follow doc_test.ExampleGenMan → doc.GenMan → fillHeader across the real upstream DisableAutoGenTag change. Chi reserves ordinary root-package calls and presenter import aliases. Interface calls such as io.Writer.Write and next.ServeHTTP must not pick arbitrary implementations. Build tags, platform, nested modules, test/external-test packages and ignored examples need explicit coverage.
Rust regex f871a8eb1d725a8aaa56e2ceea57c24fce74b5fd → 9870c06e6c772daaad7ab612faab29130753e41c; serde_json d2fce19685bf0e3d493a9d785665137654c79e6d → 4d4f53c3b7de3259b6a8a15ef4d5f4edb47af32f In regex, follow lib.rs → unicode::is_word_character across its implementation change; then test the workspace regex → regex-syntax call and function-local use ... as write in regex-automata. serde_json reserves the changed algorithm::fast_path via a wildcard import. The older regex layout lacks the newer root wrapper/alias cases; these are head-only checks. float_roundtrip gates serde_json's lexical module. Trait dispatch, macros, feature/cfg alternatives and build output require separate evidence.

Chi and serde_json were partly source-inspected to establish answers. Their reserved questions are held out from initial implementation tuning, with this exposure disclosed. Go 1.27.2 and rustc/cargo 1.89.0 are present locally; rust-analyzer is not installed in the selected official toolchain. No extra toolchain was installed for this baseline.

Reproduce the historical #1255 unsupported baseline with node archify/bin/archify.mjs code-analysis check <fixed-checkout> --language go --fail-on never --json --out <output>, substituting rust for Rust. Expect exit 2, not a successful empty analysis. Development proceeds Go first, then Rust, with wrong targets prioritized before deterministic coverage expansion.

At the historical #1255 baseline snapshot, implementation tests, full source/ZIP acceptance and its new-head CI were still pending; #1252's run had failed overall despite passing checks. This is not the current acceptance state: the Go/Rust Draft follow-ups and cumulative candidates above have separately recorded source/ZIP and final-head CI evidence. No PR was approved or merged, and no release/live installation occurred.

Baseline package follow-up: at #1255 head b7338e0b1, all eight extracted-ZIP invocations reproduce the same JSON diagnostics and exit 2 as source. The manifest was regenerated byte-identically. This is verified rejection parity; This historical baseline predates the later Go/Rust Draft implementation acceptance. Existing parser dependencies were installed only in the isolated extracted package; no new toolchain or live installation. New head CI is tracked separately on the Draft.

Go follow-up: Draft validation and source-oracle correction. The initial Chi presenter alias expectation was inconsistent with its nested module declaration and is retained as an explicit oracle correction. A valid real grpc alias is separately supplemental. Baseline #1255 rejection results remain historical; they do not describe #1256. Rust follow-up: Draft #1258 source/ZIP validation and explicit Cargo/cfg/trait limits. Historical baseline rejection does not describe this Draft.

JS/TS follow-up #1271 at0e41f1e7f extends #1270 without moving any capability into Labs. Local397/397, package62/62; final-head CI42427971892 completed success (actual module397/397, zero skips), recorded separately.

Java dependency follow-up #1273 supplies the bounded direct jar/test-jar routes for the two earlier Simple→Api misses; it does not move any capability into Labs.

Clone this wiki locally