Skip to content

feat: move Java and Python codegen onto the code writer and remove legacy generators - #676

Merged
dmealing merged 15 commits into
mainfrom
fm/mo-130-py-java-writer-only
Nov 28, 2026
Merged

dmealing merged 15 commits into
mainfrom
fm/mo-130-py-java-writer-only

Conversation

@dmealing

@dmealing dmealing commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Changed

  • Python: the router generator and the last nine emitters (extractor, output parser, trace helper, render helper, names, requirement tests, API docs, extract delegate and schema) lay out files with PyWriter. Codegen no longer runs ruff format, so output no longer depends on whether ruff is installed. Subclass hooks take the writer first. The deprecated metaobjects.apidocs.* and codegen.* module aliases are removed; imports must use the runtime/ paths.
  • Java: the entity writers (BaseObjectCodeWriter, JavaCodeWriter, PojoAwareCodeWriter, ValueObjectCodeWriter) write through JavaWriter. The codegen-mustache module and the mustache generator are removed; use com.metaobjects.generator.template.TemplateScopeGenerator. The deprecated shims in the documentation generators and the codegen-spring forwarding helpers are removed.
  • Generated output: layout-only changes (whitespace, line breaking, import grouping). A pom or owned copy that references removed classes, or a removed Python import path, now fails; see the changelog fragments for the upgrade steps.
  • Gate: validated in one no-mistakes run (five review fix rounds, one test round that drove the Java Maven scenarios live).
Validation

Risk Assessment

⚠️ Medium: I found no new defects: the last fix commit's documentation claims match the source, and all 54 changed golden files keep the same comments and syntax tree (ignoring import order and trailing docstring whitespace). The risk stays medium because this 162-file change rewrites the generated-router emitter and removes public modules, aliases, shims and hook signatures.

Testing

Drove the Java scenario that was previously untested. Installed the maven-plugin reactor into a scratch repo and ran two disposable Maven projects offline. The valid project generated a ProductDto record with BUILD SUCCESS. The project naming the retired MustacheTemplateGenerator failed with ClassNotFoundException, which matches the removal decision. Both scenarios are live with evidence. The scratch directory was removed. Python and the other scenarios from earlier rounds were not re-driven in this turn, and the configured command's passing run covers broad regression.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Java: valid metadata project generates Java via metaobjects:generate with SpringDtoGenerator and SpringValueObjectGenerator (local Maven, synthetic Product entity) ✅ pass live java-generate-ok.log (BUILD SUCCESS); ProductDto.java
Java: pom naming retired MustacheTemplateGenerator fails clearly with ClassNotFoundException (local Maven) ✅ pass live java-generate-retired-generator.log
Evidence: Java valid-project generate log (BUILD SUCCESS)
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------------< demo:proj-ok >----------------------------
[INFO] Building proj-ok 1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- metaobjects:8.3.0:generate (default) @ proj-ok ---
[INFO] OM managed types registered via provider
[INFO] MetaData Mojo > LifeCycle Phase: generate-sources
[INFO] MetaData Mojo > Create Loader: MetaDataLoader[manual:null]
[INFO] MetaData Mojo > Executing Generator: com.metaobjects.generator.spring.SpringDtoGenerator
[INFO] MetaData Mojo > Executing Generator: com.metaobjects.generator.spring.SpringValueObjectGenerator
[INFO] MetaData Mojo > Registered compile source root: <scratch>/proj-ok/target/gen
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.492 s
[INFO] Finished at: 2026-11-28T13:49:00-05:00
[INFO] ------------------------------------------------------------------------
Evidence: Retired-generator generate log (ClassNotFoundException)
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< demo:proj-retired >--------------------------
[INFO] Building proj-retired 1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- metaobjects:8.3.0:generate (default) @ proj-retired ---
[INFO] OM managed types registered via provider
[INFO] MetaData Mojo > LifeCycle Phase: generate-sources
[INFO] MetaData Mojo > Create Loader: MetaDataLoader[manual:null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.414 s
[INFO] Finished at: 2026-11-28T13:48:52-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.metaobjects:metaobjects-maven-plugin:8.3.0:generate (default) on project proj-retired: Execution default of goal com.metaobjects:metaobjects-maven-plugin:8.3.0:generate failed: Error running generator [com.metaobjects.generator.mustache.MustacheTemplateGenerator]: java.lang.ClassNotFoundException: com.metaobjects.generator.mustache.MustacheTemplateGenerator -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Evidence: Generated ProductDto.java from metadata
package shop;

/** GENERATED — wire DTO for Product. Do not hand-edit; regenerated from metadata. */
public record ProductDto(
    String sku,
    Integer qty
) {
    /** A fluent builder, so a caller can set a subset of the components. */
    public static Builder builder() { return new Builder(); }

    /** Builds a {@link ProductDto}; an unset component stays null. */
    public static final class Builder {
        private String sku;
        private Integer qty;

        private Builder() {}

        public Builder sku(String v) { this.sku = v; return this; }
        public Builder qty(Integer v) { this.qty = v; return this; }

        public ProductDto build() { return new ProductDto(sku, qty); }
    }
}
  • Outcome: 🔧 2 issues found → no changes applied ✅ across 2 runs (14m46s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 12 infos
  • ⚠️ server/java/codegen-spring/src/main/java/com/metaobjects/generator/spring/SpringDtoGenerator.java:1114 - The intent requires removing "the deprecated shims" from the Java codegen ("Java: the legacy println generator family ..., the codegen-mustache module (1,912 lines, T10c) and the deprecated shims"). Commit d5da320 removes only the shims in the documentation generators (MetaDataAIDocumentationGenerator, MetaDataFileJsonSchemaGenerator, MetaDataFileSchemaWriter.addConstraintFile, SingleHtmlDirectGeneratorBase.writeHtml(MetaDataHtmlDocumentationWriter)). Twenty-three @Deprecated ... kept so 1.0.x callers still compile forwarding shims remain in the codegen-spring generators: SpringDtoGenerator.java:1114-1180 (15 static forwarders such as settableFields and scalarFields), SpringRepositoryGenerator.java:475-493 (appliesTo, m2mFinderName, m2mFinderNameForSubtype, targetSubtypeParam) and AutoSetSupport.java:106-148 (stampFields, onUpdateFields and two others). Decide whether "the deprecated shims" covers these. If it does, remove them and add an upgrade note to the changelog. If the readiness report meant only the doc-generator shims, no change is needed.
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:17 - The intent lists for Python "the router generator (W-PY-3) and about eight other emitters not yet on the writer, plus the ruff formatter callers and aliases". The ruff callers and metaobjects.codegen.format are removed. The deprecated alias modules built on metaobjects/codegen/_moved.py are kept on purpose: codegen/extract_schema_emitter.py, extract_delegate_emitter.py, fr010_field_mapping.py, output_format_spec_emitter.py, generators/m2m_codegen.py, generators/fr019_shared_enum.py and others. The changelog says: "The 1.1.0 alias modules (metaobjects.codegen.apidocs.* and the other moved modules) stay until 2.0, as announced." The intent's word "aliases" may mean these modules, or it may mean aliases of the ruff formatter, which no longer exist. Removing the modules in 1.3.0 would break the announced 2.0 deprecation window for ejected copies that still import the old paths, so you need to decide which reading is meant.
  • ⚠️ server/java/codegen-spring/src/main/java/com/metaobjects/generator/GeneratorRegistry.java:855 - Simplification pass: the change adds a new component the intent does not ask for. It is a RETIRED_GENERATORS map plus retiredMessage() (GeneratorRegistry.java:848-866), a pre-instantiation check in AbstractMetaDataMojo.java:918-923, and a new test (maven-plugin/src/test/.../RetiredGeneratorTest.java). Together they turn a pom that still names MustacheTemplateGenerator into a guided failure. The intent asks only for removal ("I want ALL of the old codegen replaced and removed"), and a removed class already fails the build with ClassNotFoundException. This is a reasonable migration aid but goes beyond the intent. Keep it only if you want it; otherwise remove the map, the mojo check and the test, and keep the changelog upgrade note.
  • ℹ️ server/java/codegen-base/src/main/java/com/metaobjects/generator/direct/object/javacode/README-flavored-objects.md:75 - This file is outside the changed-file list, so it was not edited inline, but this change makes it wrong. The README still says an ejected entity/extractor copy relies on "MultiFileDirectGeneratorBase and FileDirectWriter, which the copies extend". BaseObjectCodeWriter now extends GeneratorIOWriter and writes through CodeWriter/JavaWriter/WriterOptions/WriterException, which are the engine classes added to the registry.json eject engine list. Replace FileDirectWriter with GeneratorIOWriter and the code writer classes in that list.
  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ⚠️ docs/ports/java.md:894 - The rewritten sentence says every generator in the table above can be ejected except template. This is false because docs-site is also exempt. Its row in the same table says "Not ejectable: the builder is engine, the theme is what you own". GeneratorRegistry.java registers it with no eject path, under the comment "Exempt from eject (registry.json)". The old sentence already left out docs-site, so the inline edit did not introduce the error. The edit removed the mustache clause correctly, but the line it rewrote is still wrong. Change it to say every generator can be ejected except template and docs-site, and that for docs-site you own only the theme under codegen/docs-site/. Keep the existing link about the template primitive next to template.

🔧 Fix applied.
12 issues (6 warnings, 6 infos) still open:

  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:17 - The intent lists for Python "the router generator (W-PY-3) and about eight other emitters not yet on the writer, plus the ruff formatter callers and aliases". The ruff callers and metaobjects.codegen.format are removed. The deprecated alias modules built on metaobjects/codegen/_moved.py are kept on purpose: codegen/extract_schema_emitter.py, extract_delegate_emitter.py, fr010_field_mapping.py, output_format_spec_emitter.py, generators/m2m_codegen.py, generators/fr019_shared_enum.py and others. The changelog says: "The 1.1.0 alias modules (metaobjects.codegen.apidocs.* and the other moved modules) stay until 2.0, as announced." The intent's word "aliases" may mean these modules, or it may mean aliases of the ruff formatter, which no longer exist. Removing the modules in 1.3.0 would break the announced 2.0 deprecation window for ejected copies that still import the old paths, so you need to decide which reading is meant.
  • ⚠️ server/java/codegen-spring/src/main/java/com/metaobjects/generator/GeneratorRegistry.java:855 - Simplification pass: the change adds a new component the intent does not ask for. It is a RETIRED_GENERATORS map plus retiredMessage() (GeneratorRegistry.java:848-866), a pre-instantiation check in AbstractMetaDataMojo.java:918-923, and a new test (maven-plugin/src/test/.../RetiredGeneratorTest.java). Together they turn a pom that still names MustacheTemplateGenerator into a guided failure. The intent asks only for removal ("I want ALL of the old codegen replaced and removed"), and a removed class already fails the build with ClassNotFoundException. This is a reasonable migration aid but goes beyond the intent. Keep it only if you want it; otherwise remove the map, the mojo check and the test, and keep the changelog upgrade note.
  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:13 - Deleting metaobjects.codegen.format breaks unedited ejected copies in a 1.3.0 minor release. At the base commit the reference router, extractor, output-parser, trace-helper, names and render-helper generators each did from metaobjects.codegen.format import ruff_format at module top, and eject copies them verbatim. The module was also on the declared Python eject engine surface (the entry removed from fixtures/generator-registry-conformance/registry.json). So an adopter who ejected any of the six and upgrades gets ModuleNotFoundError when gen or verify --codegen imports the copy. spec/decisions/ADR-0063-generators-own-layout.md:47-50 also says Python ruff_format stays exported for adopter-owned generators, because an owned copy calls it itself, and that retiring it is a separate decision. The ADR is not updated. The changelog only mentions an owned generator that 'called it'. The intent's 'ruff formatter callers and aliases' may authorize the removal, so the maintainer should decide. Either keep ruff_format as an exported helper that no reference generator calls, which matches the ADR. Or confirm the removal, amend ADR-0063, and say in the changelog that every earlier ejected copy of those six generators stops importing.
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:14 - The upgrade note says two subclass hooks changed, but many more did. RouterGenerator also changed _emit_reverse_finders (now takes w and returns None), _emit_route_handler, _emit_m2m_route, _emit_tph_m2m_route, _emit_tph_list_body, _emit_readonly_reject_handlers and _report_list_with_export (router_generator.py:1237-2072). Four of the first five are listed as override points in the class docstring. In _emit_route_handler, the create_autoset, update_autoset, frozen_strip and denied_strip arguments are now BodyStep callables instead of line lists. RenderHelperGenerator._emit_document and _emit_email now take header as list[str]; the migration doc names both as subclasser hooks. In the runtime emitters that eject hands over, nested_mirror_dataclasses, nested_mappers and delegate_helpers became write_*(w, ...), and mirror_dataclass and mirror_initializer were removed. That also affects re-ejecting: eject never overwrites an existing codegen/runtime/ copy, even with --force. A fresh output-parser or extractor copy placed beside an old extract_delegate_emitter.py therefore calls rde.write_nested_mirror_dataclasses, which that copy lacks. List all of these, and tell adopters to refresh codegen/runtime/extract_delegate_emitter.py and extract_schema_emitter.py.
  • ⚠️ server/python/src/metaobjects/codegen/generators/requirement_tests_generator.py:305 - Source returned by a project's requirement_tests renderer hook (RenderedTest.source) used to be written verbatim. It now goes through w.text(), which removes the common margin and a leading blank line, strips trailing whitespace from every line, and collapses consecutive blank lines into one. This also applies inside string literals. For example, a hook that returns a test comparing output to a triple-quoted string with two blank lines, or with a line ending in spaces, now gets a different expected string, and gen reports no error. It also collapses the two-blank-line gap between a helper and a test in one hook source. The 'same syntax tree' check in the changelog covers only the built-in renderer. Write hook-supplied source verbatim, for example through a verbatim method in the writer package so the layout ratchet still holds, and keep text() for generator-authored snippets only.
  • ⚠️ server/java/codegen-base/src/main/java/com/metaobjects/generator/direct/object/javacode/JavaCodeWriter.java:159 - Every importList entry, including those from the public GenerationContext.addImport (merged in BaseObjectCodeWriter.writeObject), now goes through JavaWriter.use. use claims the text after the last dot as a unique simple name. For wildcard imports that name is *. A custom createWriter that adds both java.util.* and java.io.* now fails with IMPORT_CONFLICT ('* is imported from both ...'). The old writer printed both lines, and the result was valid Java. Do not claim a local name for entries ending in .*, either in JavaWriter.use or at this call site. Still emit those imports.
  • ℹ️ server/python/src/metaobjects/codegen/generators/router_generator.py:600 - Fixed two docstring references to functions this change renamed: _validated_input_lines is now _write_validated_check, and, at line 787, _target_subtype_param is now _target_subtype_params.
  • ℹ️ server/python/src/metaobjects/codegen/generators/trace_helper_generator.py:195 - Updated a comment that still named schema_literal. The code now calls schema_piece.
  • ℹ️ server/python/src/metaobjects/codegen/generators/render_helper_generator.py:149 - Removed the private _field_tree_literal wrapper, which this change left with no references anywhere in the repository, along with the flat import that only it used.

🔧 Fix applied.
13 issues (6 warnings, 7 infos) still open:

  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:17 - The intent lists for Python "the router generator (W-PY-3) and about eight other emitters not yet on the writer, plus the ruff formatter callers and aliases". The ruff callers and metaobjects.codegen.format are removed. The deprecated alias modules built on metaobjects/codegen/_moved.py are kept on purpose: codegen/extract_schema_emitter.py, extract_delegate_emitter.py, fr010_field_mapping.py, output_format_spec_emitter.py, generators/m2m_codegen.py, generators/fr019_shared_enum.py and others. The changelog says: "The 1.1.0 alias modules (metaobjects.codegen.apidocs.* and the other moved modules) stay until 2.0, as announced." The intent's word "aliases" may mean these modules, or it may mean aliases of the ruff formatter, which no longer exist. Removing the modules in 1.3.0 would break the announced 2.0 deprecation window for ejected copies that still import the old paths, so you need to decide which reading is meant.
  • ⚠️ server/java/codegen-spring/src/main/java/com/metaobjects/generator/GeneratorRegistry.java:855 - Simplification pass: the change adds a new component the intent does not ask for. It is a RETIRED_GENERATORS map plus retiredMessage() (GeneratorRegistry.java:848-866), a pre-instantiation check in AbstractMetaDataMojo.java:918-923, and a new test (maven-plugin/src/test/.../RetiredGeneratorTest.java). Together they turn a pom that still names MustacheTemplateGenerator into a guided failure. The intent asks only for removal ("I want ALL of the old codegen replaced and removed"), and a removed class already fails the build with ClassNotFoundException. This is a reasonable migration aid but goes beyond the intent. Keep it only if you want it; otherwise remove the map, the mojo check and the test, and keep the changelog upgrade note.
  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:13 - Deleting metaobjects.codegen.format breaks unedited ejected copies in a 1.3.0 minor release. At the base commit the reference router, extractor, output-parser, trace-helper, names and render-helper generators each did from metaobjects.codegen.format import ruff_format at module top, and eject copies them verbatim. The module was also on the declared Python eject engine surface (the entry removed from fixtures/generator-registry-conformance/registry.json). So an adopter who ejected any of the six and upgrades gets ModuleNotFoundError when gen or verify --codegen imports the copy. spec/decisions/ADR-0063-generators-own-layout.md:47-50 also says Python ruff_format stays exported for adopter-owned generators, because an owned copy calls it itself, and that retiring it is a separate decision. The ADR is not updated. The changelog only mentions an owned generator that 'called it'. The intent's 'ruff formatter callers and aliases' may authorize the removal, so the maintainer should decide. Either keep ruff_format as an exported helper that no reference generator calls, which matches the ADR. Or confirm the removal, amend ADR-0063, and say in the changelog that every earlier ejected copy of those six generators stops importing.
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:14 - The upgrade note says two subclass hooks changed, but many more did. RouterGenerator also changed _emit_reverse_finders (now takes w and returns None), _emit_route_handler, _emit_m2m_route, _emit_tph_m2m_route, _emit_tph_list_body, _emit_readonly_reject_handlers and _report_list_with_export (router_generator.py:1237-2072). Four of the first five are listed as override points in the class docstring. In _emit_route_handler, the create_autoset, update_autoset, frozen_strip and denied_strip arguments are now BodyStep callables instead of line lists. RenderHelperGenerator._emit_document and _emit_email now take header as list[str]; the migration doc names both as subclasser hooks. In the runtime emitters that eject hands over, nested_mirror_dataclasses, nested_mappers and delegate_helpers became write_*(w, ...), and mirror_dataclass and mirror_initializer were removed. That also affects re-ejecting: eject never overwrites an existing codegen/runtime/ copy, even with --force. A fresh output-parser or extractor copy placed beside an old extract_delegate_emitter.py therefore calls rde.write_nested_mirror_dataclasses, which that copy lacks. List all of these, and tell adopters to refresh codegen/runtime/extract_delegate_emitter.py and extract_schema_emitter.py.
  • ⚠️ server/python/src/metaobjects/codegen/generators/requirement_tests_generator.py:305 - Source returned by a project's requirement_tests renderer hook (RenderedTest.source) used to be written verbatim. It now goes through w.text(), which removes the common margin and a leading blank line, strips trailing whitespace from every line, and collapses consecutive blank lines into one. This also applies inside string literals. For example, a hook that returns a test comparing output to a triple-quoted string with two blank lines, or with a line ending in spaces, now gets a different expected string, and gen reports no error. It also collapses the two-blank-line gap between a helper and a test in one hook source. The 'same syntax tree' check in the changelog covers only the built-in renderer. Write hook-supplied source verbatim, for example through a verbatim method in the writer package so the layout ratchet still holds, and keep text() for generator-authored snippets only.
  • ℹ️ server/python/src/metaobjects/codegen/generators/router_generator.py:600 - Fixed two docstring references to functions this change renamed: _validated_input_lines is now _write_validated_check, and, at line 787, _target_subtype_param is now _target_subtype_params.
  • ℹ️ server/python/src/metaobjects/codegen/generators/trace_helper_generator.py:195 - Updated a comment that still named schema_literal. The code now calls schema_piece.
  • ℹ️ server/python/src/metaobjects/codegen/generators/render_helper_generator.py:149 - Removed the private _field_tree_literal wrapper, which this change left with no references anywhere in the repository, along with the flat import that only it used.
  • ⚠️ server/python/src/metaobjects/codegen/generators/requirement_tests_generator.py:298 - A renderer hook's imports strings still go through w.line(statement). line raises ERR_WRITER_NEWLINE_IN_LINE on any line break. Take a hook that returns RenderedTest(imports=(&#34;from acme.testing import (\n helper_a,\n helper_b,\n)&#34;,), source=...), or just &#34;import json\n&#34;. The old &#34;\n&#34;.join(extra) accepted both and produced valid Python; now gen fails. This is project-authored text, like RenderedTest.source. The round 2 fix for review-3 switched only source to w.verbatim (line 305) and left this sibling behind. Write each hook import with w.verbatim(statement.rstrip()); the pending blank line before the first one is still honored. imports and source are the only two hook-supplied fields written into the file.
  • ℹ️ changelog.d/python-codegen-writer-no-ruff.md:29 - Fixed the Python upgrade note, partly written by the round 2 fix for review-2. It told output-parser and extractor owners to delete both extract_delegate_emitter.py and extract_schema_emitter.py. Neither generator's registry runtime includes the schema emitter, so re-ejecting them would not write it back, and an owned trace-helper would lose its import. Only trace-helper copies that file, and its new reference calls schema_piece, which an old kept copy lacks; the note did not mention trace-helper. The note now pairs each runtime file with the generators that copy it. It also no longer offers schema_piece, a schema descriptor, as the replacement for the removed mirror_dataclass and mirror_initializer.

🔧 Fix applied.
9 issues (2 warnings, 7 infos) still open:

  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:17 - The intent lists for Python "the router generator (W-PY-3) and about eight other emitters not yet on the writer, plus the ruff formatter callers and aliases". The ruff callers and metaobjects.codegen.format are removed. The deprecated alias modules built on metaobjects/codegen/_moved.py are kept on purpose: codegen/extract_schema_emitter.py, extract_delegate_emitter.py, fr010_field_mapping.py, output_format_spec_emitter.py, generators/m2m_codegen.py, generators/fr019_shared_enum.py and others. The changelog says: "The 1.1.0 alias modules (metaobjects.codegen.apidocs.* and the other moved modules) stay until 2.0, as announced." The intent's word "aliases" may mean these modules, or it may mean aliases of the ruff formatter, which no longer exist. Removing the modules in 1.3.0 would break the announced 2.0 deprecation window for ejected copies that still import the old paths, so you need to decide which reading is meant.
  • ⚠️ server/java/codegen-spring/src/main/java/com/metaobjects/generator/GeneratorRegistry.java:855 - Simplification pass: the change adds a new component the intent does not ask for. It is a RETIRED_GENERATORS map plus retiredMessage() (GeneratorRegistry.java:848-866), a pre-instantiation check in AbstractMetaDataMojo.java:918-923, and a new test (maven-plugin/src/test/.../RetiredGeneratorTest.java). Together they turn a pom that still names MustacheTemplateGenerator into a guided failure. The intent asks only for removal ("I want ALL of the old codegen replaced and removed"), and a removed class already fails the build with ClassNotFoundException. This is a reasonable migration aid but goes beyond the intent. Keep it only if you want it; otherwise remove the map, the mojo check and the test, and keep the changelog upgrade note.
  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ℹ️ server/python/src/metaobjects/codegen/generators/router_generator.py:600 - Fixed two docstring references to functions this change renamed: _validated_input_lines is now _write_validated_check, and, at line 787, _target_subtype_param is now _target_subtype_params.
  • ℹ️ server/python/src/metaobjects/codegen/generators/trace_helper_generator.py:195 - Updated a comment that still named schema_literal. The code now calls schema_piece.
  • ℹ️ server/python/src/metaobjects/codegen/generators/render_helper_generator.py:149 - Removed the private _field_tree_literal wrapper, which this change left with no references anywhere in the repository, along with the flat import that only it used.
  • ℹ️ changelog.d/python-codegen-writer-no-ruff.md:29 - Fixed the Python upgrade note, partly written by the round 2 fix for review-2. It told output-parser and extractor owners to delete both extract_delegate_emitter.py and extract_schema_emitter.py. Neither generator's registry runtime includes the schema emitter, so re-ejecting them would not write it back, and an owned trace-helper would lose its import. Only trace-helper copies that file, and its new reference calls schema_piece, which an old kept copy lacks; the note did not mention trace-helper. The note now pairs each runtime file with the generators that copy it. It also no longer offers schema_piece, a schema descriptor, as the replacement for the removed mirror_dataclass and mirror_initializer.

🔧 Fix applied.
17 issues (4 warnings, 13 infos) still open:

  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:17 - The intent lists for Python "the router generator (W-PY-3) and about eight other emitters not yet on the writer, plus the ruff formatter callers and aliases". The ruff callers and metaobjects.codegen.format are removed. The deprecated alias modules built on metaobjects/codegen/_moved.py are kept on purpose: codegen/extract_schema_emitter.py, extract_delegate_emitter.py, fr010_field_mapping.py, output_format_spec_emitter.py, generators/m2m_codegen.py, generators/fr019_shared_enum.py and others. The changelog says: "The 1.1.0 alias modules (metaobjects.codegen.apidocs.* and the other moved modules) stay until 2.0, as announced." The intent's word "aliases" may mean these modules, or it may mean aliases of the ruff formatter, which no longer exist. Removing the modules in 1.3.0 would break the announced 2.0 deprecation window for ejected copies that still import the old paths, so you need to decide which reading is meant.
  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ℹ️ server/python/src/metaobjects/codegen/generators/router_generator.py:600 - Fixed two docstring references to functions this change renamed: _validated_input_lines is now _write_validated_check, and, at line 787, _target_subtype_param is now _target_subtype_params.
  • ℹ️ server/python/src/metaobjects/codegen/generators/trace_helper_generator.py:195 - Updated a comment that still named schema_literal. The code now calls schema_piece.
  • ℹ️ server/python/src/metaobjects/codegen/generators/render_helper_generator.py:149 - Removed the private _field_tree_literal wrapper, which this change left with no references anywhere in the repository, along with the flat import that only it used.
  • ℹ️ changelog.d/python-codegen-writer-no-ruff.md:29 - Fixed the Python upgrade note, partly written by the round 2 fix for review-2. It told output-parser and extractor owners to delete both extract_delegate_emitter.py and extract_schema_emitter.py. Neither generator's registry runtime includes the schema emitter, so re-ejecting them would not write it back, and an owned trace-helper would lose its import. Only trace-helper copies that file, and its new reference calls schema_piece, which an old kept copy lacks; the note did not mention trace-helper. The note now pairs each runtime file with the generators that copy it. It also no longer offers schema_piece, a schema descriptor, as the replacement for the removed mirror_dataclass and mirror_initializer.
  • ⚠️ changelog.d/python-codegen-writer-no-ruff.md:51 - Fix round 4 added upgrade guidance that does not work for a real ejected copy. It says a copy ejected before 1.1.0 'needs its imports changed, or re-eject it'. The output-parser copy from v1.0.0 and v1.0.13 imports from metaobjects.codegen import extract_delegate_emitter as rde. It also calls rde.nested_mirror_dataclasses, rde.nested_mappers and rde.delegate_helpers, and this change removes all three. An adopter who only repoints the import to metaobjects.codegen.runtime gets an AttributeError at gen. The error named in the note is also wrong for that import form: from metaobjects.codegen import &lt;removed submodule&gt; raises plain ImportError: cannot import name ..., not ModuleNotFoundError. Say ImportError (of which ModuleNotFoundError is a subclass). Also say that a pre-1.1.0 output-parser copy must be re-ejected, or moved to write_nested_mirror_dataclasses, write_nested_mappers and write_delegate_helpers. Sibling sites: changelog.d/python-codegen-writer-no-ruff.md:38 (the ModuleNotFoundError claim); docs/features/own-your-codegen.md:1139-1148 (the 'until you change each import' claim, and the recipe that copies the new runtime files under the old generator copy and only changes imports).
  • ℹ️ docs/ports/java.md:480 - Fixed inline. Fix round 4 removed the retired-generator message and updated the changelog, but left this page saying a pom that names MustacheTemplateGenerator fails with a message naming template. The page now says it fails with ClassNotFoundException and names template as the replacement.
  • ℹ️ docs/RELEASING-java.md:19 - Fixed inline. After codegen-mustache was removed, the reactor has 13 modules, which is 14 artifacts with the parent POM. Updated the old 14 and 15 counts.
  • ℹ️ docs/RELEASING-java.md:203 - Fixed inline: changed 'all 14 reactor modules' to 13.
  • ℹ️ server/java/README.md:3 - Fixed inline: changed 'across 14 modules' to 13.
  • ℹ️ docs/llms/llms.txt:71 - Fixed inline: changed the Java counts to 13 publishable modules and 14 artifacts with the parent POM.
  • ℹ️ docs/RELEASING.md:995 - This page still says 'The 14 com.metaobjects:* modules (15 artifacts, counting the parent POM)'. With codegen-mustache removed, the counts are 13 and 14. It was not edited inline because the file is outside the changed-file list.
  • ⚠️ docs/RELEASING-java.md:177 - The recorded fix inline-releasing-java-module-count says it updated the old counts, and lines 19-20 and 203 now say 13 modules. Line 177, in the smoke-build step of the same procedure, still says "All 14 publishable modules should reach SUCCESS". The page now contradicts itself, and a releaser would expect a module that no longer exists. server/java/pom.xml lists 13 modules. Change 14 to 13 on line 177.
  • ⚠️ server/java/README.md:3 - The edited sentence now says Maven Central has 13 modules "at 8.2.0 for the 1.2.0 release". This is wrong for that release. The server/java/pom.xml at tag v1.2.0 lists 14 modules, including codegen-mustache. The count of 13 applies only after the 1.3.0 removal. Keep 13, but do not tie it to 8.2.0. For example, say the current reactor has 13 modules, and that the 8.2.0 release also included codegen-mustache, removed in 1.3.0.

🔧 Fix applied.
12 infos still open:

  • ℹ️ server/java/codegen-base/src/test/java/com/metaobjects/generator/writer/layout/LayoutAnalyzer.java:779 - For visibility against "anything code generated has to go to the new line based version ... unless you review it and tell me it's good": the Java ratchet still scans codegen-plantuml. PlantUMLWriter (extends FileDirectWriter, println(true, ...) at PlantUMLWriter.java:671-695) and MetaDataHtmlDocumentationWriter stay on the old print style. A pre-existing exempt ruling in layout-ratchet/allowlist.json covers them as documentation output. FileDirectWriter and SingleFileDirectGeneratorBase now remain only for PlantUML. The new indented-print rule would flag PlantUMLWriter if that exemption were lifted. Nothing to change in this run. The user should know this exemption is the remaining print-style emit.
  • ℹ️ docs/ports/java.md:894 - Removed the stale clause "and the deprecated mustache" from the "Own a generator" paragraph. The generator no longer exists, and the table above it now says it was removed in 1.3.0.
  • ℹ️ server/python/src/metaobjects/codegen/generators/output_parser_generator.py:289 - Removed a trailing space this change left before the closing quotes of the _render_module extension-seam docstring ("emission entirely. &test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;" now reads "emission entirely.&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;&test(conformance): combined multi-package extends + overlay + cross-package references fixture #34;").
  • ℹ️ server/python/src/metaobjects/codegen/generators/router_generator.py:600 - Fixed two docstring references to functions this change renamed: _validated_input_lines is now _write_validated_check, and, at line 787, _target_subtype_param is now _target_subtype_params.
  • ℹ️ server/python/src/metaobjects/codegen/generators/trace_helper_generator.py:195 - Updated a comment that still named schema_literal. The code now calls schema_piece.
  • ℹ️ server/python/src/metaobjects/codegen/generators/render_helper_generator.py:149 - Removed the private _field_tree_literal wrapper, which this change left with no references anywhere in the repository, along with the flat import that only it used.
  • ℹ️ changelog.d/python-codegen-writer-no-ruff.md:29 - Fixed the Python upgrade note, partly written by the round 2 fix for review-2. It told output-parser and extractor owners to delete both extract_delegate_emitter.py and extract_schema_emitter.py. Neither generator's registry runtime includes the schema emitter, so re-ejecting them would not write it back, and an owned trace-helper would lose its import. Only trace-helper copies that file, and its new reference calls schema_piece, which an old kept copy lacks; the note did not mention trace-helper. The note now pairs each runtime file with the generators that copy it. It also no longer offers schema_piece, a schema descriptor, as the replacement for the removed mirror_dataclass and mirror_initializer.
  • ℹ️ docs/ports/java.md:480 - Fixed inline. Fix round 4 removed the retired-generator message and updated the changelog, but left this page saying a pom that names MustacheTemplateGenerator fails with a message naming template. The page now says it fails with ClassNotFoundException and names template as the replacement.
  • ℹ️ docs/RELEASING-java.md:19 - Fixed inline. After codegen-mustache was removed, the reactor has 13 modules, which is 14 artifacts with the parent POM. Updated the old 14 and 15 counts.
  • ℹ️ docs/RELEASING-java.md:203 - Fixed inline: changed 'all 14 reactor modules' to 13.
  • ℹ️ server/java/README.md:3 - Fixed inline: changed 'across 14 modules' to 13.
  • ℹ️ docs/llms/llms.txt:71 - Fixed inline: changed the Java counts to 13 publishable modules and 14 artifacts with the parent POM.
🔧 **Test** - 2 issues found → no changes applied ✅
  • ⚠️ server/java - Java half of the intent not live-validated: removal of codegen-mustache and the legacy println generators, and the retired-generator message. No Maven build was driven in this step. Evidence rests on the configured scripts/ci-local.sh --affected --strict-toolchains run that already passed. Live check would need mvn offline against a pom naming MustacheTemplateGenerator, expecting ClassNotFoundException.
  • ⚠️ live validation verdict: inconclusive (3 of 4 scenarios were driven live against the product); untested: Java: codegen-mustache removed and a pom naming the retired generator fails with a clear removal (ClassNotFoundException) (live Maven build)
  • Live validation: ⚠️ inconclusive - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Python metaobjects gen on a fresh project emits the new-writer output for entity, names, filter-allowlist and routes generators (live local CLI, synthetic Ticket entity) ✅ pass live metaobjects gen in a scratch directory → 'wrote 8 file(s) across 1 target(s).' exit 0; generated/acme/shop/ticket_router.py, Ticket.py, ticket_names.py, ticket_filter_allowlist.py
Generated Python output compiles and is clean (live local CLI output, compiled with python3 -I) ✅ pass live python3 -I -m py_compile succeeded on all 8 generated files; no 'ruff' string in generated tree; metaobjects verify → 'in sync'
Regeneration is idempotent with no rewrite of unchanged bytes (live local CLI, second run) ✅ pass live second metaobjects gen → 'nothing changed since the last run, so nothing was generated'
Java: codegen-mustache removed and a pom naming the retired generator fails with a clear removal (ClassNotFoundException) (live Maven build) ⏸️ untested no Not driven in this step to stay within the time budget. A live check needs an offline mvn run of the reactor, or a pom naming MustacheTemplateGenerator and running mvn metaobjects:generate. The Ja…
  • scripts/ci-local.sh --affected --strict-toolchains
  • metaobjects init and metaobjects gen (with generators entity, names, filter-allowlist, routes) in a disposable project at a scratch directory, using server/python/.venv
  • python3 -I -m py_compile on all 8 generated .py files
  • metaobjects verify (default --codegen --templates)
  • second metaobjects gen for idempotency
  • grep for ruff in generated output
  • scratch project removed after the run; worktree clean

🔧 No changes applied.
✅ Re-checked - no issues remain.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Java: valid metadata project generates Java via metaobjects:generate with SpringDtoGenerator and SpringValueObjectGenerator (local Maven, synthetic Product entity) ✅ pass live java-generate-ok.log (BUILD SUCCESS); ProductDto.java
Java: pom naming retired MustacheTemplateGenerator fails clearly with ClassNotFoundException (local Maven) ✅ pass live java-generate-retired-generator.log
  • scripts/ci-local.sh --affected --strict-toolchains
  • mvn -B -o -DskipTests -Dmaven.repo.local=<scratch>/m2 install -pl maven-plugin -am (server/java) — exit 0
  • Scenario 2: mvn -B -o -Dmaven.repo.local=<scratch>/m2 generate-sources in disposable proj-ok (metaobjects-maven-plugin 8.3.0, SpringDtoGenerator + SpringValueObjectGenerator, outputDir/package args, one object.entity Product) — BUILD SUCCESS, target/gen/shop/ProductDto.java emitted
  • Scenario 3: mvn -B -o -Dmaven.repo.local=<scratch>/m2 generate-sources in disposable proj-retired naming com.metaobjects.generator.mustache.MustacheTemplateGenerator — BUILD FAILURE with java.lang.ClassNotFoundException
  • Evidence kept with the local run: java-generate-ok.log, java-generate-retired-generator.log, ProductDto.java
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…R-0063)

The extractor, output-parser, trace-helper, render-helper, names, requirement-tests
and API-docs emitters, plus the extract delegate/schema emitters, now write through
PyWriter instead of typing line breaks and indentation, and no longer call the ruff
format pass. Output changes in layout only (checked against a capture of every emitted
file in tests/codegen: normalized AST, comments and docstrings unchanged), with one fix:
an unresolved @objectref mapper argument used to put its comma inside the trailing
comment, which was a syntax error; it is now `x=None,  # unresolved @objectRef`.

Seam change: ExtractorGenerator._emit_mapper now takes the writer
(`_emit_mapper(self, w, vo, root)`) and writes, instead of returning lines.

The layout ratchet allowlist shrinks to router_generator.py. The writer gains
TWO_SPACE_INDENT so a two-space block (the witness-key collision message) is
spelled in one place.
…drop the ruff format pass (ADR-0063)

The router generator (routes) now writes through PyWriter instead of typing its
own line breaks and indentation, so every Python generator is on the writer and
the layout ratchet's `unconverted` list is empty. The ruff format pass
(metaobjects.codegen.format, ruff_format) had no callers left and is removed;
ruff stays in the dev group only for the `ruff check` lint the compile gate runs.

Output changes in layout only: a capture of every file tests/codegen emits has
the same normalized AST, comments and docstrings, with imports compared as a set
(the writer groups __future__, absolute, then relative imports, each in
code-point order, where ruff's isort split stdlib from third-party). Lines break
at 88 columns on the last bracketed list.

Seam change: RouterGenerator._emit_repository_protocol now takes the writer
(`_emit_repository_protocol(self, w, repo_class, m2m, pk_type)`) and writes the
Protocol, left open for an override to add members, instead of returning lines.

Tests that assert what a signature or call says read the source through
tests/codegen/layout_helpers.one_line, which folds the writer's breaks, so they
do not also pin where it broke.
…changelog for the writer move

The router now breaks a line past 88 columns at its last bracketed list, so the
portable-wire assertion reads the folded source, like the other router tests.
Adds the changelog fragment for the Python writer move and the removed ruff
format pass, with the upgrade notes for the two seam changes.
…ve codegen-mustache (ADR-0063)

BaseObjectCodeWriter, JavaCodeWriter, PojoAwareCodeWriter and
ValueObjectCodeWriter now write lines and blocks on JavaWriter instead of
printing through FileIndentor. Output changes in layout only: no trailing
whitespace, no blank line right after a class opens or before it closes, and
the one-sentence bridge-setter Javadoc fits on one line. Checked against a
capture of the interface, pojoAware and valueObject flavors over the fitness
corpus and the template test model (109 files): identical with whitespace
ignored apart from that Javadoc. The eject file set is unchanged; WriterException
joins the Java engine surface beside CodeWriter and JavaWriter.

The layout ratchet gains an indented-print rule (println(true, ...)), the call
that typed indentation without a literal and kept this family out of sight.

The deprecated mustache generator (MustacheTemplateGenerator) and the
metaobjects-codegen-mustache module are removed; template replaces them. A pom
that still names the class fails with a message naming template
(GeneratorRegistry.RETIRED_GENERATORS, checked in buildGenerators), covered by
RetiredGeneratorTest. maven-plugin declares the Jackson test dependency it used
to get through the removed module.
…rators

The forwarding attribute constants and register*Attributes methods on the AI and
JSON-schema doc generators (CodeGenMetaDataProvider owns them), the no-op
MetaDataFileSchemaWriter.addConstraintFile, and the pre-HtmlDirectWriter
writeHtml hook with its compatibility test.
@dmealing
dmealing merged commit 5b524d2 into main Nov 28, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-130-py-java-writer-only branch November 28, 2026 19:18
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.

1 participant