Skip to content

Feat/v2 go ids - #49

Open
lamwassi wants to merge 11 commits into
mainfrom
feat/v2-go-ids
Open

lamwassi wants to merge 11 commits into
mainfrom
feat/v2-go-ids

Conversation

@lamwassi

Copy link
Copy Markdown
Contributor

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the Codellm-Devkit Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

lamwassi and others added 11 commits November 19, 2026 21:35
Spec and CLAUDE.md schema decisions from the design loop: application.artifacts
(all non-.go files, metadata-first, --artifact-text opt-in), can://<app>/artifact ids,
version-less pkg:golang package ids, go.mod requires as dependencies with go.sum locks,
L1 at every level. Config keys deferred.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Adds application.artifacts (every non-.go project file: format, roles, size, sha256;
source only with --artifact-text) and application.dependencies (go.mod requires with
direct, locked_version from go.sum, provides_imports by longest prefix). The Neo4j
projector writes :Artifact (app-scoped), :Package (pkg:golang/<module>), HAS_ARTIFACT,
DECLARES_DEPENDENCY and LOCKS. Config keys are deferred.

Refs #45

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Spec from the design loop: types <module>/<Type>, methods <module>/<Type>/<Method>,
functions <module>/<Name>, closures keep closure_N, external ids
<app>/@external/<import-path>/<Type>/<Member>, Neo4j signature from the JSON field.
Follows codeanalyzer-typescript idFromSig and codeanalyzer-python child_id.
…on convention)

Type <module>/<Type>, method <module>/<Type>/<Method>, function <module>/<Name>,
closure <enclosing>/closure_N; the package import path is dropped (the member is the
signature part after its last dot). External ids <app>/@external/<import-path>/<Type>/<Member>.
Type nodes gain a signature field (full import-qualified name) so the Neo4j :GoType
signature no longer depends on the id. Projector copies signature from the JSON field.

Refs #46
Remove the fID and pkg constants left unused by the bare-member id expectations;
golangci-lint's unused check failed CI on them.

Refs #46
eval_e2e.sh runs cango -a 2 on an app, pushes the Neo4j projection live, and checks
analysis.json and the loaded graph (app-scoped GoCanNode rows plus :Package nodes).
EAGER=1 reloads: the push runs with --eager, purging the application's subgraph first.
…roject

EAGER_FLAG is a plain string, since an empty array trips set -u on macOS bash 3.2.
The default cango build goes to the temp dir, not the project, so the binary is not
captured as an artifact.
Skips the Neo4j push and the graph check, so no password or running database is
needed. The build and the analysis.json check still run.
A method declared in another file than its receiver type now gets an id under the
declaring module: <declaring-module>/<Type>/<Method>. The node stays in the receiver's
callables{}; source_file is kept; Neo4j adds GO_DECLARES from the declaring module.

Refs #46
A method declared in a file other than its receiver type now nests under that file's
module: <declaring-module>/<Type>/<Method>. The JSON node stays in the receiver type's
callables{}, and source_file is kept. The Neo4j projector adds GO_DECLARES from the
declaring module to the method, beside GO_HAS_METHOD. 22 frontend methods change, e.g.
handlers.go/frontendServer/logoutHandler (was main.go/frontendServer/logoutHandler).

Refs #46
An eager push purged and upserted module by module. A node is owned by one module but
can carry another module's id prefix (a method declared in rpc.go, owned by main.go),
so purging rpc.go after main.go had upserted it deleted the method. All purges now
run before any upsert.

Refs #46
@lamwassi
lamwassi requested a review from rahlk November 20, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant