Skip to content

feat!: namespace-qualify application identities - #275

Merged
rahlk merged 11 commits into
mainfrom
feat/add-workspace-root
Oct 31, 2026
Merged

rahlk merged 11 commits into
mainfrom
feat/add-workspace-root

Conversation

@georgesafta

@georgesafta georgesafta commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Namespace/application ownership now produces can://<namespace>/<application>/… roots, including the repeated default monolith root. Raw inputs are validated and UTF-8 encoded consistently; integer identity_version: 2 and raw owner metadata reject incompatible persisted outputs. Existing suffixes and application-relative keys are retained.

The namespace option replaces the unmerged workspace-root option. Embedded references, graph scopes, cache compatibility and selected-root reconciliation follow the canonical owner while retaining unrelated existing branch fixes. Legacy output must be regenerated from source.

Closes #276.

Coordinated tracking: python-sdk #435, codeanalyzer-python #236, codeanalyzer-typescript #221, codeanalyzer-go #40.

Existing producer PRs: Python #235, TS/JS #220, Java #275. Companion PRs: Go #41, SDK #440 (Draft).

Validation: Available full suite: 635 tests, 17 skipped; subsequent v1/v2 cleanup regressions: 16 passed. Unfiltered suite had one unavailable-Docker initialization failure. Cross-repository native L2 smoke: 20 cases / 60 canonical endpoint references; explicit sibling services, defaults and raw punctuation/Unicode passed. Shared six-copy golden fixture hash matches; diff checks clean.

The initial isolated checks lacked Docker/live Neo4j; actual follow-up live validation is recorded below. Downstream canonical-index/finding-join adoption remains separately required; no private integration fix is claimed.

Final review validation: Final contract clarification: 3 CanonicalIdentityRowsTest cases passed. Canonical ordinary property conflicts remain rejected; docs/test changes only, existing local artifact behavior unchanged.

The tiny Java L2 smoke used declared-edge fallback; strict compiled WALA was validated separately.

Online Boutique live validation (2026-10-31)

Cloned Online Boutique at c7cb6d5 over SSH and projected all 11 supported services into one Neo4j Community 5.26.0 database. C# cartservice was skipped. All SDK verification used Neo4j backends, with no SDK JSON/local fallback.

  • All 11 SDK module-ID sets equal their live graph module-ID sets; reconstructed declaration IDs retain service ownership. The main namespace owns 67,898 nodes and 217,873 outgoing relationships.
  • Currency server.js line 28 returns module scope/no callable; payment line 28 resolves its own constructor; currency line 92 resolves _loadProto. Both backend orders pass. Foreign service/namespace URIs are rejected.
  • Canonical currency/payment/currency rows deduplicate to two modules; a finding joins only to currency by exact ID. Zero duplicate canonical IDs or cross-service canonical relationships. Two real payment loadProto calls retain distinct position-bearing body nodes.
  • An omitted namespace produces the repeated default root. An additional currencyservice in another namespace stays isolated. Eager regeneration preserves node/edge counts in the other 12 service/control scopes. SDK reads are mutation-free.

The live run exposed three defects, now fixed and reviewed in TS/JS #220 (6d80997: relative graph module keys and class ownership during eager reconciliation) and SDK #440 (928ce57: retain Python module/class/callable IDs during graph reconstruction). All regressions were observed RED before the fixes.

Verification after fixes: TS/JS namespace/Neo4j suites 70 passed,23 skipped; typecheck/build passed. SDK focused88 passed; full available SDK1952 passed,422 skipped,85.34%coverage. Java and all four Go services passed strict full-depth live projection after build/toolchain setup (JDK21/Gradle8.14.5; Go1.26.10 with GOTOOLCHAIN=local). Existing skipped suites are not claimed as passing.

The release dependency gate is complete; current published-package verification is recorded below. Private integration ingestion/joins remain external. A fresh currency-only TS/JS graph still hits the existing required-relationship fingerprint; the completed multi-service database passes. Currency module-scope results include an existing source-hydration diagnostic, while ownership/position assertions pass. No microservice business RPC deployment, merge or release was performed.

Coordinated releases published

Python1.7.0, TypeScript1.7.0, Java3.4.0, Go0.3.0, and SDK2.1.0. All five task PRs are merged. SDK pins and uv.lock use these producer releases.

Fresh Python3.11 validation with the real published producers:1960SDKtests passed,414skipped,85.48%coverage. All11 supported OnlineBoutique services were reprojected into one Neo4j database using the published analyzer wheels; the installed SDK wheel passed service/namespace isolation, canonical-ID equality/deduplication, original source-position regression and read-only checks. SDK was then reinstalled directly from PyPI and passed the same live checks.

Downstream consumer integration adoption and the documented sparse-graph/source-hydration limitations remain separate from this completed release gate.

With --workspace-root, symbol_table keys, module ids and every id below
them, and artifact keys/paths/ids are relative to the workspace root
instead of --input. The app segment, discovery, builds and artifact
classification are unchanged. --input outside the root, or the flag with
--schema v1, is an argument error.
@pavuluri
pavuluri marked this pull request as ready for review October 28, 2026 03:20
@pavuluri

Copy link
Copy Markdown
Collaborator

@georgesafta Could this leave stale artifact and config nodes when --workspace-root is enabled on an existing Neo4j database? The IDs change, but the old nodes don’t seem to be cleaned up, so we may end up with duplicates. Maybe we should add a test case as well covering this. Other than this, I think the design/implementation look good to me. I ran the test cases as well. (I pushed the "ready to review" button, but I think we should take a look at this).

@rahlk
rahlk merged commit ad74b88 into main Oct 31, 2026
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.

Qualify application identities by namespace and application

3 participants