docs: spec for the python-sdk canonical schema v2 migration (#309) - #318
Open
rahlk wants to merge 1 commit into
Open
docs: spec for the python-sdk canonical schema v2 migration (#309)#318rahlk wants to merge 1 commit into
rahlk wants to merge 1 commit into
Conversation
Design record for the SDK leg of codellm-devkit/.github#35. The SDK is the last consumer still parsing v1: codeanalyzer-python 1.4.0, -typescript 1.2.0 and -java 3.0.1 all emit canonical v2, while pyproject pins 0.3.1 / 0.4.3 and the 2.4.1 JAR. Records five locked decisions: - The SDK models the intersection the three shipped analyzers actually emit, not an idealised contract. .github#36 never froze one, and the analyzers have since diverged, so writing one model layer over all three is the extraction exercise #36 describes, done against real payloads. - Shared base classes in cldk/models/cpg/ with per-language subclasses that narrow the container maps and add typed extras. - 2.0.0, API-stable via a view layer; v2 models replace v1 outright, with no parallel model layer and no deprecation window. - Python then TypeScript then Java then the query layer, as 2.0.0-rc.N per leg. Each leg's pin bump and model migration land in one PR. - Epic #35 keeps coordinating; #309 is rewritten, #308 is closed as decided, per-leg children are filed at pickup. Also records a nine-entry divergence register across the shipped analyzers, and withdraws #309's Java blocker: codeanalyzer-java 3.0.1 emits identity-only edges and a canonical body map, so the rich JGraphEdges shape survives only in the SDK's own v1 models.
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design record for the SDK leg of codellm-devkit/.github#35, committed as provenance under
docs/design/specs/.The SDK is the last consumer still parsing schema v1.
codeanalyzer-python1.4.0,codeanalyzer-typescript1.2.0 andcodeanalyzer-java3.0.1 all emit canonical v2, whilepyproject.tomlpins 0.3.1 / 0.4.3 and bundles the 2.4.1 JAR.Locked decisions
.github#36never froze one and the analyzers have since diverged, so writing one model layer over all three is the extraction exercise COBOL support #36 describes, performed against real payloads.cldk/models/cpg/, per-language subclasses that narrow the container maps and add typed extras. No generics, no untypedextra="allow".2.0.0-rc.Nper leg. Each leg's pin bump and model migration land in one PR.Two findings
Epic #35's premise expired. It was written on the basis that v2 was unreleased on every analyzer and that reconciling before shipping would be cheaper. All three have since shipped their v2 majors while #36 — which was to freeze the contract first — is still open and
codeanalyzer-schemaholds only a README.#309's Java blocker is withdrawn.
codeanalyzer-java3.0.1 emitsJCallEdge{src, dst, prov, weight},JIdEdge{src, dst}and a canonicalbodymap. The rich-edge shape (JGraphEdgeswrappingJMethodDetail) and the module-global_CALLABLES_LOOKUP_TABLEsurvive only in the SDK's own v1 models, so the Java leg's weight is legacy retirement, not an upstream dependency.The spec also carries a nine-entry divergence register across the shipped analyzers, which is filed onto #36 as the extraction input.
Not in this PR
Docs only — no code, no pins moved. Implementation starts at leg 1 (shared layer + Python).