GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix/init collision and symlink root by lamwassi · Pull Request #53 · codellm-devkit/codeanalyzer-go

Conversation

@lamwassi

@lamwassi lamwassi commented Nov 23, 2026

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lamwassi and others added 18 commits November 19, 2026 21:35
@lamwassi @claude
docs(design): repository-artifact and dependency datamodel for schema v2
75e0411
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 <[email protected]>
@lamwassi @claude
feat(artifacts): emit repository artifacts and go.mod dependencies at L1
cf2cab1
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 <[email protected]>
@lamwassi
docs(design): schema v2 id format for Go callables and types
144cbcb
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.
@lamwassi
feat(ids): Go callable and type ids use the bare member name (TS/Pyth…
0f68195
…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
@lamwassi
test(v2emit): drop unused constants after the id-format change
7ed66ce
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
@lamwassi
scripts: add end-to-end eval (analysis.json -> Neo4j projection -> load)
210a511
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.
@lamwassi
scripts(eval_e2e): fix bash 3.2 unbound array and build outside the p…
e605867
…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.
@lamwassi
scripts(eval_e2e): add --json-only to write and check analysis.json only
85e2ed1
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.
@lamwassi
docs(design): cross-file method ids use the declaring file
000ebad
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
@lamwassi
feat(ids): cross-file methods get ids under their declaring file
dd9349b
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
@lamwassi
fix(neo4j): purge every changed module before upserting any
19c862a
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
docs(design): add application.name alongside application_name
7acabb6
Additive v2 field with the same value as application_name, which is kept (renaming a
shared field is forbidden). Neo4j :GoApplication gets the same name property.
Spec: docs/design/specs/v2-application-name-field.md
@lamwassi
feat(schema): add application.name alongside application_name
60ce063
Additive v2 field with the same value as application_name, which is kept. The Neo4j
:GoApplication node carries the same name property. Spec:
docs/design/specs/v2-application-name-field.md

Refs #50
@lamwassi
docs(design): start_line and end_line on Go span-bearing models
6290919
Additive top-level keys next to span on Import, Parameter, Callable, Type, Field and
BodyNode, for parity with codeanalyzer-python. No code_start_line. Neo4j nodes carry the
same properties beside span_json. Spec: docs/design/specs/v2-span-lines.md
@lamwassi
feat(schema): start_line and end_line on Go span-bearing models
eb276e1
Top-level start_line and end_line next to span on Import, Parameter, Callable, Type, Field
and BodyNode (equal to span.start[0] and span.end[0]). Neo4j nodes carry the same
properties beside span_json; the synthetic body nodes omit them. Spec:
docs/design/specs/v2-span-lines.md

Refs #51
@lamwassi
feat(schema): start_line and end_line on the JSON module
4f95fed
The module gains the two keys, equal to its whole-file span, so the JSON and Neo4j
modules match. Spec amended: docs/design/specs/v2-span-lines.md.

Refs #51
@lamwassi @claude
fix(symbol-table): keep every func init() in a file
205b7cd
A file may declare any number of func init(), and all share the signature
"<pkgpath>.init". The symbol table keyed functions by signature, so the
second init overwrote the first. The first init's body, its call sites and
its call-graph edges were then missing from the analysis, with no warning.

The second and later same-signature functions in a file now get a ":N"
suffix (N = 2, 3, ...). That gives each init its own map key, its own
can:// id (init, init:2, ...), and its own call-graph source. The first
init keeps the bare name, so the ids of every file with one init are
unchanged. A colon cannot appear in a Go identifier and no call site can
name an init, so the suffix collides with nothing.

Signature is therefore no longer exactly signatureOf() for the duplicate
inits. That is a visible schema change and is recorded in CLAUDE.md.

Adds TestInit_EveryInitSurvivesWithDistinctID, which fails on the old
code (2 init callables instead of 3) and passes on the fix.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
@lamwassi @claude
fix(repository): resolve a symlinked project root before artifact dis…
5edcfe9
…covery

filepath.WalkDir does not follow a symlink at its root. It lstats the root and
sees one non-directory entry, so a project reached through a symlink (a
checkout under ~/work linked into a workspace, for example) produced an empty
application.artifacts. The dependencies were still parsed through the link,
so every dependency's declared_in named an artifact that was never emitted,
and the Neo4j DECLARES_DEPENDENCY and LOCKS edges that MATCH on those ids were
dropped without a warning.

The same bug disabled the self-exclusion. A symlinked --output or --cache
path was compared against walked paths that used the real location, so a
previous run's analysis.json inside the project was captured as an artifact.

Discover now resolves the root, OutputDir and CacheDir through symlinks before
the walk. resolveDir handles a path that does not exist yet (an output
directory created later) by resolving its longest existing ancestor. Any
resolution error other than "does not exist" is now returned, where
absOrEmpty used to return "" and silently disable the exclusion. That is the
fail-closed choice.

Symlinks inside the tree are still not followed, so discovery cannot leave the
project root. A probe with an in-tree link to a file outside the project
confirms the outside file is not captured.

Tests: TestDiscover_SymlinkedRootMatchesRealRoot fails on the old code (no
artifacts), TestDiscover_SymlinkedOutputDirIsExcluded fails on the old code
(analysis.json captured), and TestResolveDir_MissingTailIsKept covers the
not-yet-created output path.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
@lamwassi
lamwassi requested a review from rahlk November 23, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rahlk rahlk Awaiting requested review from rahlk

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@lamwassi
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.