Repository navigation
feat(java): consume a shared model from committed dependency snapshot - #500
Merged
Merged
Conversation
…023) Read dependencies, scope.include and migrate.scope from .metaobjects/config.json, load the committed .metaobjects/deps/ snapshot ahead of the project's own files at every rung of the Maven plugin's source ladder, check it against the lock, refuse a local node declared into a dependency's package, and keep the Java and Kotlin generators off imported objects. Runs all 23 cases of the shared dependency corpus.
…ver the configured-loader path Drop the unused DependencySet.forRoot, run the REST collection-segment collision check over the objects that generate, and test the Maven loader configuration path end to end.
Member
Author
|
Gate runs: 2. Run 1 failed at the test step on agent-provider errors (not a code failure) after its review step, and its fix commit could not be recovered, so the review fixes (route-collision check scoped to own objects, a test through the configured Maven loader path, removal of an unused accessor, one docs prose fix) were reapplied by hand before run 2. Run 2 passed rebase, review, test, document, lint, push and PR; CI is local and was skipped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Changed
server/java/metadata,maven-plugin): addedDependenciesandDependencySet.NeutralConfignow parsesdependencies. The Java loader and the Maven plugin (every rung of the source ladder) load the committed.metaobjects/deps/snapshot ahead of the project's own files. The lock is checked as in TypeScript and Python:ERR_DEPENDENCY_SNAPSHOT_STALE,_METAMODEL_INCOMPATIBLEand_NODE_COLLISION. A local top-level node declared into a package a dependency owns fails withERR_DEPENDENCY_PACKAGE_NOT_OWNED. The Nodemeta deps syncstays the only writer of the snapshot and lock.codegen-base,codegen-spring,codegen-kotlin): Java and Kotlin generators now emit nothing for an imported object unlessscope.includenames its package. Kotlin loads through the same loader and Maven plugin, so it inherits the loading and lock checks.DependencyConformanceTestruns the 24 resolution cases infixtures/dependency-conformance/. New tests:MavenLoaderDependenciesTest,DependencyImportExclusionTest(Spring) andKotlinDependencyImportExclusionTest. Added a CHANGELOG entry, Java and Kotlin port-doc sections, and updates to the conformance, roadmap, dependencies feature doc and agent-context skill reference (with its expected fixtures). Spring runtime auto-load andverifydrift for dependencies are documented as later slices.Validation
Risk Assessment
✅ Low: The change meets the Java and Kotlin build-time consumption intent. The loader, the Maven plugin and the generator selection points all exclude imported objects, and the earlier review fixes (collision check, configured-loader test,
forRootremoval) are in place. The tests exercise real loaders and generators against the shared corpus. The only defect found was a stale case count in docs, fixed inline.Testing
I ran the real Maven plugin built from this branch against disposable consumer projects, covering the happy path and four adversarial cases, and all behaved as intended. The targeted Java tests and the full Java reactor unit run pass; the Testcontainers integration modules and the C#, Python and TypeScript lanes were not run here, though the TypeScript fast and unit baseline passed. The shared-corpus runner scenario is an automated test, not a live product run, so it is recorded as untested.
mvn metaobjects:generatewith the Spring DTO and value-object generators emitted only app/OrderDto.java and app/OrderPatch.java; no acme/common outputacme::common::**, the run also emitted acme/common CustomerDto, CustomerPatch and Addressmeta deps sync'; no output was generatedEvidence: live generate output
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
🔧 **Rebase** - 4 issues found → auto-fixed ✅
docs/CONFORMANCE.md- merge conflict rebasing onto origin/maindocs/features/cli.md- merge conflict rebasing onto origin/maindocs/features/metadata-dependencies.md- merge conflict rebasing onto origin/mainfixtures/dependency-conformance/README.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
CHANGELOG.md:25- Inline doc fix: the new CHANGELOG entry said the Java runner "runs all 23 cases" offixtures/dependency-conformance/. After the rebase onto main the corpus has 35 cases (24 resolution and 11 check), andDependencyConformanceTestskips the 11expectCheckcases. This matches the figure indocs/CONFORMANCE.md. I changed the text to "all 24 resolution cases" and noted that the 11 check cases pin the Nodemeta deps check.✅ **Test** - passed
✅ No issues found.
mvn metaobjects:generatewith the Spring DTO and value-object generators emitted only app/OrderDto.java and app/OrderPatch.java; no acme/common outputacme::common::**, the run also emitted acme/common CustomerDto, CustomerPatch and Addressmeta deps sync'; no output was generatedscripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsmvn -o test -Dtest=DependencyConformanceTest,NeutralConfigTest,DependencyImportExclusionTest,KotlinDependencyImportExclusionTest,MavenLoaderDependenciesTest(all green)Live: built the maven-plugin from this branch into a throwaway local repo and ranmetaobjects:generateagainst disposable consumer projects built from the dependency-conformance corpusmvn -o testover the whole Java reactor, excluding the Testcontainers integration modules (BUILD SUCCESS, all 15 modules)Baselinescripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsalready green✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.