Repository navigation
Conversation
…nd Python manifests
After a write run, the hash manifest entry of a per-object file now names its
generator and the node's resolution key ({hash, generatedBy, sourceNode}, after
the JVM's generator/outputDir), as TypeScript already did, so a docs view built
from any of these ports lists each node's generated files. A whole-model file
keeps the plain hash. A shared 'provenance' vector in
fixtures/codegen-skip-conformance/manifests.json holds TypeScript, C#, Java and
Python to the same entries.
…ated on branch; one wording fix.
Member
Author
|
Superseded: main's Rust packaging check went red after #670, so this cannot go green alone. These commits ship inside the follow-up PR for the Java and Kotlin docs view, which also carries the Rust packaging fix. |
dmealing
added a commit
that referenced
this pull request
Nov 28, 2026
…Node (#671) * feat(codegen): record each generated file's source node in C#, Java and Python manifests After a write run, the hash manifest entry of a per-object file now names its generator and the node's resolution key ({hash, generatedBy, sourceNode}, after the JVM's generator/outputDir), as TypeScript already did, so a docs view built from any of these ports lists each node's generated files. A whole-model file keeps the plain hash. A shared 'provenance' vector in fixtures/codegen-skip-conformance/manifests.json holds TypeScript, C#, Java and Python to the same entries. * no-mistakes(review): Stamp provenance in remaining per-object generators * no-mistakes(document): Docs for C#/Java/Python provenance already updated on branch; one wording fix. * no-mistakes(test): Stop identifier renaming in explorer bundle build * feat(java): build the docs view and write the model explorer on the JVM, with no Node The JVM builds the port-neutral docs view from its loaded model (DocsView), byte for byte what TypeScript builds for every fixtures/explorer-conformance case, gated in the metadata suite. A docs-site generator (DocsSiteGenerator, registered in the Java and Kotlin registries, eject-exempt like TypeScript's) writes explorer.json, the shared explorer app, explorer-model.js and explorer-stamp.js, and lists each node's generated files from the hash manifest's provenance. Kotlin runs the same class, and its suite gates every corpus case through its own registry. MetaEndpoint gains the /_meta/docs helpers (body, ETag, If-None-Match), mounted by the host as /_meta is. Needs the HashManifest.loadProvenance API from #669. * fix(ci): clear stale unpacked workspace crates before the Rust publish dry-run cargo publish --workspace unpacks its overlay-registry dependencies into a per-checkout directory and never re-unpacks while the version is unchanged, so the self-hosted runner verified metaobjects-codegen against a metaobjects-1.3.0 unpacked before metamodel_docs existed. Main has been red on the rust lane since #670 for this reason; the crate itself packages correctly. * fix(java): keep the explorer data scripts out of codegen-base's layout, and hold docs-site to the inert line The model and stamp scripts move beside the docs view serializer (com.metaobjects.docsview.ExplorerModelScript), so codegen-base types no line breaks (LayoutRatchetTest). The codegen-noop inert tests hold docs-site to the line TypeScript's rules-inert test draws: the explorer documents every node, so only its data payload may differ, and only by the new nodes and members. * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): Build JVM docs-site file lists from the run's output * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): List other executions' files in the JVM docs site * no-mistakes(review): Re-run skip when manifest loses a file * no-mistakes(document): Stale docs-view claim fixed; Java/Kotlin now build explorer.json
dmealing
added a commit
that referenced
this pull request
Nov 28, 2026
* feat(codegen): record each generated file's source node in C#, Java and Python manifests
After a write run, the hash manifest entry of a per-object file now names its
generator and the node's resolution key ({hash, generatedBy, sourceNode}, after
the JVM's generator/outputDir), as TypeScript already did, so a docs view built
from any of these ports lists each node's generated files. A whole-model file
keeps the plain hash. A shared 'provenance' vector in
fixtures/codegen-skip-conformance/manifests.json holds TypeScript, C#, Java and
Python to the same entries.
* no-mistakes(review): Stamp provenance in remaining per-object generators
* no-mistakes(document): Docs for C#/Java/Python provenance already updated on branch; one wording fix.
* no-mistakes(test): Stop identifier renaming in explorer bundle build
* feat(java): build the docs view and write the model explorer on the JVM, with no Node
The JVM builds the port-neutral docs view from its loaded model (DocsView), byte for byte
what TypeScript builds for every fixtures/explorer-conformance case, gated in the metadata
suite. A docs-site generator (DocsSiteGenerator, registered in the Java and Kotlin
registries, eject-exempt like TypeScript's) writes explorer.json, the shared explorer app,
explorer-model.js and explorer-stamp.js, and lists each node's generated files from the
hash manifest's provenance. Kotlin runs the same class, and its suite gates every corpus
case through its own registry. MetaEndpoint gains the /_meta/docs helpers (body, ETag,
If-None-Match), mounted by the host as /_meta is.
Needs the HashManifest.loadProvenance API from #669.
* fix(ci): clear stale unpacked workspace crates before the Rust publish dry-run
cargo publish --workspace unpacks its overlay-registry dependencies into a
per-checkout directory and never re-unpacks while the version is unchanged,
so the self-hosted runner verified metaobjects-codegen against a
metaobjects-1.3.0 unpacked before metamodel_docs existed. Main has been red on
the rust lane since #670 for this reason; the crate itself packages correctly.
* fix(java): keep the explorer data scripts out of codegen-base's layout, and hold docs-site to the inert line
The model and stamp scripts move beside the docs view serializer
(com.metaobjects.docsview.ExplorerModelScript), so codegen-base types no line
breaks (LayoutRatchetTest). The codegen-noop inert tests hold docs-site to the
line TypeScript's rules-inert test draws: the explorer documents every node, so
only its data payload may differ, and only by the new nodes and members.
* no-mistakes(review): apply reviewer inline fixes
* no-mistakes(review): Build JVM docs-site file lists from the run's output
* no-mistakes(review): apply reviewer inline fixes
* no-mistakes(review): List other executions' files in the JVM docs site
* no-mistakes(review): Re-run skip when manifest loses a file
* no-mistakes(document): Stale docs-view claim fixed; Java/Kotlin now build explorer.json
* feat(docs-site): build the model explorer in C# and Python without Node
Each port builds the port-neutral docs view from its loaded model
(MetaObjects.DocsView, metaobjects.docs_view), byte-identical to TypeScript
for every fixtures/explorer-conformance case and gated in each suite. A
docs-site generator in both registries writes explorer.json, the shared
explorer app, explorer-model.js and explorer-stamp.js; it runs after every
other generator and lists this run's files over the committed manifest's,
so verify --codegen renders what gen wrote. MetaEndpoint.MetaDocs (C#) and
meta_docs (Python) serve the same view at /_meta/docs with a strong ETag.
C# and Python provenance now records the generator's registry name.
* no-mistakes(review): Match verify docs-site render to gen; pin ETags
* no-mistakes(review): Run docs-site targets last; carry plan provenance
* no-mistakes(review): Carry only files the orphan sweep keeps
* no-mistakes(review): apply reviewer inline fixes
* no-mistakes(review): Treat an empty run file list as unknown
* no-mistakes(review): Keep empty run file lists known, as TypeScript
* no-mistakes(document): Docs: C# and Python explorer now documented
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
generatedByandsourceNodeinto each per-object hash manifest entry, matching the TypeScript format. Files rendered from the whole model or a package keep the plain hash. The sharedprovenancevector infixtures/codegen-skip-conformance/manifests.jsonchecks all four ports against the same entries, and new per-port tests cover it.genrewrites the committed.metaobjects/.gen-state/.hashes/files once; generated source files do not change.explorer-app/assets/explorer-app.js) is minified without renaming identifiers, so unchanged sources build identical bytes. Every port's copy and the docs-site copy are refreshed. Also updates the explorer and own-your-codegen docs and ADR-0064 wording.Validation
Risk Assessment
✅ Low: The change adds manifest fields only. Each port keeps hash-reading compatibility. Placement follows the existing ADR-0064 sourceNode rule. The round-1 gaps are fixed: C# overriding generators, the Java trace-helper, template and mustache writers, and the removed unused Java/Python entry points. Every port is held to a shared vector and to end-to-end run tests.
Testing
Broad regression came from the configured test command
scripts/ci-local.sh --affected --strict-toolchains, which passed at this commit. I did not re-run it, because I changed no source or test files. I then ran real codegen live in three ports on a throwaway two-entity model: the Python CLI, the C#dotnet metaCLI built against the worktree codegen, and the Java MetaDataGeneratorMojo running on the jars the gate built. In every port, per-object files, including the C# Names/FilterAllowlist/Routes generators covered by the F1 fix, recordgeneratedByandsourceNode. Whole-model files stay without a source node, and a forced second run leaves each manifest byte-identical. I fed each manifest into the explorer's documented docs-view build, and the 'generated files' data was filled for both nodes in all three ports. The explorer UI panel itself was not rendered or screenshotted: the evidence is its JSON data (text transcripts). All three scenarios passed. I removed the scratch projects, and the worktree is clean.metaobjects gen(entity, names, filter-allowlist, routes, metamodel-docs) on a scratch acme::shop model; per-object manifest entries name the generator and node, the explorer view lists…dotnet meta genwith a codegen project referencing the worktree MetaObjects.Codegen (Entity, DbContext, Names, FilterAllowlist, Routes); every per-object file, including the F1 Names/FilterA…Evidence: Python manifests and explorer view
Evidence: C# manifests and explorer view
Evidence: C# generator list used
Evidence: Java manifests and explorer view
Evidence: Java mojo launcher
Evidence: Java mojo run log
~/.no-mistakes/evidence/01M8GD59R3KZVN2RMDGZAVNWJ5/explorer-view-check.ts)Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 2 issues found → auto-fixed ✅
server/typescript/packages/docs-site/test/explorer-app.test.ts:88- The configured test command failed on docs-siteexplorer-app/ is what the sources build. This change did not cause it: the branch touches no input of the bundle. Fresh copies of base 85e399c and of HEAD, with Bun 1.3.14 (the pinned version), build byte-identical bundles (sha256 975d3c74…), and both differ from the committed explorer-app/assets/explorer-app.js (f6d560e9…). The difference is only the minifier's choice of variable names (z/Z swapped). The gate's own base re-run passed, so the minified build looks environment-dependent or nondeterministic. Options: regenerate the committed bundle withbun server/typescript/packages/docs-site/scripts/build-app.tsand runscripts/sync-explorer-app.sh, or make the bundle check tolerant of identifier renaming. Both are outside this provenance change.metaobjects genon a two-entityacme::shopmodel writes a manifest entry with generatedBy and sourceNode for every per-object file (entity, names, filter-allowlist, router)dotnet meta genrecords provenance for EntityGenerator, NamesGenerator, FilterAllowlistGenerator and RoutesGenerator output, and still refuses a hand-edited file under the object-form manifestmvn metaobjects:generatewith the Spring generators records generatedBy and sourceNode next to the ownership fieldgeneratorfor every per-object filescripts/ci-local.sh --affected --strict-toolchainsRead the gate's test log: every lane green exceptts unit suites, which failed one test, docs-siteexplorer-app/ is what the sources buildbun test test/explorer-app.test.tsin server/typescript/packages/docs-site, run 3 times on HEAD: fails every timegit archiveof base 85e399c96b and of HEAD into scratch, thenbun install --frozen-lockfileand the same test: fails on both;buildExplorerApp()gives the same sha256 for base and head, and it differs from the committed bundlemetaobjects gen(Python, worktree .venv) on a scratch project,acme::shop{Order, Customer}, generators entity, names, filter-allowlist and routesdotnet MetaObjects.Cli.dll gen --out Generated --namespace Acme(worktree CLI, codegen project pointed at the worktree MetaObjects.Codegen) with EntityGenerator, NamesGenerator, FilterAllowlistGenerator and RoutesGeneratorC# adversarial check: hand-edited OrderNames.g.cs, changed the model, rangen --force; the edited file was refused, its manifest record was kept, and the other files were rewritten with fresh provenancemvn install -pl maven-plugin -am -DskipTestsinto a scratch Maven repo, thenmvn com.metaobjects:metaobjects-maven-plugin:8.3.0:generateon a scratch project with the SpringValueObject, Dto, Names, FilterAllowlist, Repository, Controller and LlmTraceHelper generatorsbun testin server/typescript/packages/codegen-ts: 3967 pass, 0 failbun testin server/typescript/packages/docs-site: 99 pass, 1 fail (the explorer-app bundle test, which also fails on base)🔧 Fix applied.
✅ Re-checked - no issues remain.
metaobjects gen(entity, names, filter-allowlist, routes, metamodel-docs) on a scratch acme::shop model; per-object manifest entries name the generator and node, the explorer view lists…dotnet meta genwith a codegen project referencing the worktree MetaObjects.Codegen (Entity, DbContext, Names, FilterAllowlist, Routes); every per-object file, including the F1 Names/FilterA…scripts/ci-local.sh --affected --strict-toolchainsBaseline broad regression: configured test commandscripts/ci-local.sh --affected --strict-toolchains, passed at this commit and not re-run (no source or test files changed in this turn)server/python/.venv/bin/metaobjects genandgen --forceon a scratch acme::shop project (entity, names, filter-allowlist, routes, metamodel-docs)dotnet MetaObjects.Cli.dll initandgen --out gen/gen --out gen --force, with Codegen.csproj ProjectReference to the worktree MetaObjects.Codegen (Entity, DbContext, Names, FilterAllowlist, Routes generators)java com.metaobjects.mojo.RunGencalling MetaDataGeneratorMojo.execute() twice with the gate-built jars (JavaObjectCodeGenerator, SpringValueObjectGenerator, SpringDtoGenerator, SpringNamesGenerator, SpringFilterAllowlistGenerator)bun explorer-view-check.ts: the documented explorer hand build (merged .hashes manifest -> buildDocsView/serializeDocsView from the worktree metadata package), run on each port's output✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.