Repository navigation
Description
Plan (optional)
Spec: codellm-devkit/.github docs/design/specs/2026-09-11-java-view-templates-and-dispatch.md § 7 (PR codellm-devkit/.github#80). Analyzer side: codellm-devkit/codeanalyzer-java#259, released as codeanalyzer-java 3.3.0.
Problem
codeanalyzer-java 3.3.0 emits application.view_dispatches[] {src, dst, via, prov} and view_dispatches_unresolved[] {site, callee, target, via, reason, prov}, and projects J_DISPATCHES_TO {via, prov} from :JBodyNode to :Artifact. The SDK's JApplication (cldk/models/java/models.py) declares neither list — they parse away silently under extra="ignore" (#386) — the Java facade has no accessor for "which pages can this code reach", and the Neo4j reconstructor does not read the relationship back. The SDK also still pins codeanalyzer-java==3.1.2 (pyproject.toml:46,89), two releases behind; 3.2.0 added module.source, span byte offsets, body_span, type parameters and call-site facts that the pin has not picked up either.
Scope boundary
The Java view-dispatch surface and the pin bump only. No template-internal nodes (roadmap Group F), no routes (Group E), no change to python/typescript facades — their analyzers emit no dispatches yet. No new backend ABC beyond the two accessors; unresolved dispatches stay JSON-only, as config_reads_unresolved is.
Goals
- Models:
JViewDispatch {src, dst, via, prov}andJViewDispatchUnresolved {site, callee, target: Optional[str], via, reason, prov};JApplication.view_dispatches: Optional[List[JViewDispatch]] = Noneand.view_dispatches_unresolved, mirroringconfig_uses/config_reads_unresolved. - Facade:
JavaAnalysis.get_view_dispatches(view: str | None = None) -> List[JViewDispatch](filter by artifact path suffix whenviewis given) andget_view_dispatchers(path: str) -> List[JCallableOverview](the callables owning the dispatching body nodes), besideget_config_uses/get_config_readers; backend ABC + local + Neo4j implementations. - Neo4j reconstruct: read
J_DISPATCHES_TO(via,prov) back intoview_dispatches; document thatview_dispatches_unresolvedis JSON-only. - Pin:
codeanalyzer-java==3.3.0independenciesand[tool.backend-versions]. - Docs: the Java facade reference gains the two accessors.
Caveats and known risks
calleeon an unresolved record is an@externalid for a call site but the enclosing callable's id for areturnsite (spec § 5) — model it as a plain string, notexternalCanId.viais a closed set today (forward | include | redirect | view-name | navigation) butnavigationis reserved and never emitted by 3.3.0; aLiteralwould be correct now and would break on the JSF work later — preferstrwith the vocabulary in the docstring, asJConfigRead.reasondoes.- The 3.1.2 → 3.3.0 pin jump also lands 3.2.0's additive fields; the e2e test fixture output changes accordingly.
Definition of done
- The mocked test parses an
analysis.jsoncarrying both lists and round-trips them unchanged;get_view_dispatches("home.jsp")returns exactly the hand-listed edges andget_view_dispatchers("src/main/webapp/home.jsp")exactly the owning callables. - Backend-contract test: local and Neo4j backends agree on
get_view_dispatches()over the same run. - E2E against the 3.3.0 binary: the DayTrader-style servlet fixture yields
J_DISPATCHES_TOrows equal in number toview_dispatches. pytest tests/test_java_analysis.py tests/test_java_backend_contract.py tests/test_java_e2e.pygreen; pins moved in both places.
Activity
rahlk commentedon Sep 11, 2026
codeanalyzer-java 3.3.1 is on PyPI and adds
prov: ["table"]onview_dispatches/J_DISPATCHES_TO(may-dispatch, many edges per site — spec § 4.5). Pin 3.3.1 rather than 3.3.0, and keepprova plainList[str].rahlk commentedon Sep 11, 2026
codeanalyzer-java 3.3.2 is on PyPI (entrypoint-finder fix, no wire change beyond 3.3.1). Pin 3.3.2.
rahlk commentedon Sep 11, 2026
Shipped: merged as c258b1e (#406) into release/2.0, released as v2.0.0-rc.7 — GitHub pre-release (
cldk-2.0.0rc7-py3-none-any.whl) andcldk 2.0.0rc7on PyPI, pinned to codeanalyzer-java 3.3.3 (not 3.3.2: 3.3.0–3.3.2 threw on an unbuilt project, codeanalyzer-java#265, whichtest_java_degradation.pycaught). Gate:uv run make test1780 passed, 404 skipped, 86% coverage, real-binary e2e included. release/2.0 absorbed main at rc.6 on the way.feat(java): view dispatches — JViewDispatch models, get_view_dispatch…