@@ -484,11 +484,11 @@ just populate more of the same tree:
484484 "k_limit": 3, // access-path depth bound (--graph-field-depth); L3+ only
485485 "analyzer": { "name": "codeanalyzer-python", "version": "1.0.0" },
486486 "application": {
487- "id": "can://python/ <app>",
487+ "id": "can://<app>",
488488 "kind": "application",
489489 "symbol_table": { // relative POSIX path → module
490490 "pkg/mod.py": {
491- "id": "can://python/ <app>/pkg/mod.py",
491+ "id": "can://<app>/python /pkg/mod.py",
492492 "kind": "module",
493493 "source": "…full file text, stored once per module…",
494494 "types": { "<Class>": { "id": "…", "kind": "class", "callables": { /* methods */ } } },
@@ -498,8 +498,8 @@ just populate more of the same tree:
498498 "call_graph": [ { "src": "can://…/main(a)", "dst": "can://…/helper(x)",
499499 "weight": 1, "prov": ["defuse", "jedi"] } ],
500500 "external_symbols": { // imported/builtin call targets, keyed by id
501- "can://python/ <app>/@external/os/getcwd":
502- { "id": "can://python/ <app>/@external/os/getcwd", "kind": "external",
501+ "can://<app>/@external/os/getcwd":
502+ { "id": "can://<app>/@external/os/getcwd", "kind": "external",
503503 "name": "getcwd", "module": "os" }
504504 },
505505 "param_in": [ { "src": "can://…/main(a)@6:4/actual_in:0", "dst": "can://…/helper(x)@formal_in:0" } ],
@@ -535,7 +535,7 @@ The application envelope also contains three substrate sections:
535535- **`artifacts`** — discovered non-code files (manifests, configs, Docker files, CI workflows,
536536 packaging files, scripts, docs, and legal files) with extraction status (`none`, `partial`, or
537537 `full`; default `none`), keyed by relative path; each artifact carries the
538- `can://artifact/ <app>/<path>` id namespace. Config files carry extracted `config_keys`
538+ `can://<app>/artifact /<path>` id namespace. Config files carry extracted `config_keys`
539539 (keys, values, namespaces, and references) and `DEFINES_CONFIG` Neo4j edges.
540540- **`dependencies`** — declared packages with kind (`runtime`/`dev`/`optional`/`build`), spec,
541541 locked version, and provenance (`prov`): where each binding came from (manifest file, lock file,
@@ -546,7 +546,7 @@ The application envelope also contains three substrate sections:
546546Notable properties:
547547
548548- **Durable `can://` ids** identify every node at callable granularity and above
549- (`can://python/ <app>/<file>/<callable-sig>`); nodes below a callable use ordinal ids
549+ (`can://<app>/python /<file>/<callable-sig>`); nodes below a callable use ordinal ids
550550 (`@entry`, `@exit`, `line:col`, `@formal_in:N`, `line:col/actual_in:N`).
551551- **`source` lives once per module**; every node's text is the `module.source[span.bytes]` slice.
552552- **Cross-function edges** — `call_graph`, `param_in`, `param_out`, `config_uses` — live at **application** scope;
@@ -668,7 +668,7 @@ RETURN src.id, d.var, d.prov
668668
669669// interprocedural flow through a parameter (level 4)
670670MATCH (a:PyBodyNode)-[:PY_PARAM_IN]->(f:PyBodyNode)
671- WHERE f.id STARTS WITH "can://python/ myapp/src/api.py"
671+ WHERE f.id STARTS WITH "can://myapp/python /src/api.py"
672672RETURN a.id, f.id
673673```
674674
@@ -697,3 +697,25 @@ RETURN f.id, l.version
697697## License
698698
699699Apache 2.0 — see [LICENSE](./LICENSE).
700+
701+ ## Polyglot applications: all languages, or none
702+
703+ A `--emit neo4j` push is **destructive**. It sweeps everything under `can://<app>/` that this
704+ analyzer marked, then rewrites what it found. Since the id grammar puts the application outermost,
705+ every analyzer over the same `<app>` shares that prefix — so a push reclaims stale rows belonging to
706+ *this* analyzer and, in the shared namespaces, sweeps rows a sibling wrote.
707+
708+ For most of what is shared that is harmless: the artifact walk is a whole-repo inventory, so an
709+ `:Artifact` a sibling wrote is re-created by this push (with a thinner view of it — `roles` falls
710+ back to `unknown` and its config keys and dependency edges are gone until that sibling pushes
711+ again). `@external` ghosts are not inventoried that way: they are per-language, so a sibling's
712+ ghosts are swept and not restored.
713+
714+ **So for an application analysed in more than one language, run every analyzer or none.** Running
715+ one in isolation leaves the others' derived rows missing until they run again. Running them
716+ together is always correct, in any order, because the last push restores everything the batch
717+ swept.
718+
719+ Nothing here corrupts a graph: what is lost is derived and regenerates. But a partial run leaves a
720+ partial answer, and nothing in the data says so.
721+
0 commit comments