Skip to content

docs(spec): manifest-derived module prefix on can:// ids - #91

Open
rahlk wants to merge 1 commit into
mainfrom
docs/manifest-derived-module-prefix
Open

rahlk wants to merge 1 commit into
mainfrom
docs/manifest-derived-module-prefix

Conversation

@rahlk

@rahlk rahlk commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Spec for adding a module-identity segment to can:// module ids, so pointing --input at one service repo names that service in the id:

can://daytrader/java/daytrader-web-service/src/main/java/org/apache/.../RunStatsDataBean.java

Three decisions worth reviewer attention:

The symbol_table key does not change (§4). Uniqueness is the key's job, and a path is unique by construction where an artifactId is not — five services vendoring one internal library plausibly build it under the same module name, which would collapse five modules onto one key. The module object also carries no path field, so the key is the only thing locating a file on disk.

The same non-uniqueness reaches the id (§6), which is the join key for call_graph endpoints. So the prefix applies only when exactly one manifest directory claims it; a contested prefix is applied to neither, with a warning. Without that rule the change would regress "ids are distinct by construction" — the property it was chosen for.

It supersedes the won't-fix on #39 (§10), which declared the can:// grammar settled in August. Re-opened deliberately, and recorded as such. #36 regains a prerequisite as a consequence and should be sequenced after this.

Also documents what the change does not fix: codellm-devkit/codeanalyzer-java#269, where a single analysis spanning source roots that declare the same FQN binds every caller to the last root, silently. This makes a bundled tree addressable, not correctly resolved.

A module's can:// id gains a segment naming the module as it declares
itself, so pointing --input at one service repo names that service in the
id without staging directories and without pointing --input at a parent
that sweeps in siblings.

The symbol_table key keeps the real --input-relative path. Uniqueness is
the key's job and a path is unique by construction where an artifactId is
not; the module object carries no path field, so the key is also the only
thing that locates a file on disk.

The same non-uniqueness reaches the id, which is the join key for
call_graph endpoints, so the prefix applies only when exactly one manifest
directory claims it. A prefix claimed by two directories is applied to
neither, with a warning naming the competitors — otherwise the change would
regress "ids are distinct by construction", the property it was chosen for.

Supersedes the won't-fix on #39, which declared the grammar settled in
August. #36 regains a prerequisite as a result.
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.

Duplicate FQNs across source roots bind to the last root, silently

1 participant