Repository navigation
feat: bring every port to parity with the 1.3.0 codegen and migration work - #567
Merged
Merged
Conversation
Codegen and migrations, across the five ports: - @sequenceStart is honoured forward-only: a changed start sets START WITH and moves the counter to GREATEST(n, max(id)+1) only when it is below, never back (TypeScript migrate, the Drizzle identity column, C# design-time services, Kotlin Exposed). Java and Python write no DDL. - Output paths keyed by metadata package: Python's package layout, C#'s opt-in csharp.outputLayout / csharp.packageNamespaces, and a Java/Kotlin refusal when two metadata packages map to one directory. meta init, metaobjects init and dotnet meta init scaffold the package layout; engine defaults stay flat. - A value object is never renamed. One claim registry per run in TypeScript, C# and Python refuses a real clash with ERR_NAME_COLLISION; a collection-name clash is ERR_COLLECTION_NAME_COLLISION in every port. - @collectionName and the naming.collections pluralizer drive REST segments in Java, Kotlin and Python too. - TypeScript view lowering: every join LEFT OUTER, @schema-only qualification, declared-type casts, multi-operator origin filters, projection-extends- projection, filter paths, multi-hop origin.first, TPH scope, and the view vocabulary (entity-derived fields, origin @segment, base-row operands, relative dates, case). - C#: the EF context declares meta migrate's CHECKs (new check-constraint corpus), JSON-column comments, entity-derived fields are no column, and framework references are global::-qualified under package namespaces. - Gates run in both output layouts; ADR-0015, ADR-0044 and ADR-0056 amended.
C# design-time HasDifferences counts a JSON-column comment change; the framework qualifier leaves global using and preprocessor lines alone. TypeScript and Python refuse two shared enums with one name instead of dropping one; Python refuses a package tree it cannot import. An inlined origin.first with no outer alias is refused, short-name counts are cached per root, and the init scaffold says a barrel still claims every name.
dmealing
added a commit
that referenced
this pull request
Nov 14, 2026
* fix(cli): stop installing dprint-node with every CLI install ts-poet requires dprint-node (about 25 MB of platform binaries) at module load. Vendor ts-poet's printer as codegen-ts/src/poet.ts (Apache-2.0, licence kept) and format with the same dprint TypeScript plugin, 0.87.1, through its WebAssembly build (@dprint/typescript + @dprint/formatter). Output is byte-identical: every codegen golden and conformance fixture is unchanged. poet.ts is an engine module, so owned and ejected templates take Code from @metaobjectsdev/codegen-ts/engine and class identity holds. The config loader still maps a legacy bare ts-poet import to that entry. check-peer-ranges now refuses dprint-node, ts-poet and @types/* in a published package's dependencies or required peers unless allowlisted. No published package declared @types/*; @types/node arrives only through the libSQL driver, which is out of scope. Fresh CLI install: 151 MB (134,525,165 bytes) -> 133 MB (115,177,311 bytes). * docs(changelog): note the standalone binary no longer crashes on dprint-node * fix(codegen-ts): address review of the vendored printer - A formatter that fails to load now throws instead of silently emitting unformatted code; only a format error falls back. - The CLI pins @metaobjectsdev/codegen-ts/engine to the same build (dist vs src) as the package root, so both reach one poet.ts. - The engine entry re-exports only code/imp/joinCode/Import/Code from the printer, as it did from ts-poet. - Restore ts-poet's toString() call for non-plain placeholders. - Refresh the index.ts comment and narrow the CHANGELOG claims about legacy ts-poet imports and the standalone binary. * refactor: drop unused printer helpers; reuse the workspace walk in the peer guard Remove asOneline/oneline, Import.fromMaybeString and arrayOf from the vendored printer (no callers). check-peer-ranges enumerates packages through publish-set.mjs's enumerateWorkspacePackages instead of its own readdir walk. * fix(codegen-ts): import-path.ts takes the vendored printer; refresh install numbers after #567 * no-mistakes(review): guard: refuse install-only deps via optionalDependencies; add real-check tests * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): wire peer-ranges guard test into gate_peer_ranges lane * no-mistakes(test): apply changes made during test validation * no-mistakes(document): Doc sync: ts-poet printer, guard, binary
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.
Closes #544
Closes #546
Validated in one no-mistakes run (review took seven fix rounds, document one; every fix commit is on this branch).
What Changed
@sequenceStartis forward-only in every DDL path (Honour identity.primary @sequenceStart in the TypeScript, Java, Kotlin and Python ports #544):meta migraterecordsSTART WITH nand advances a counter that sits below toGREATEST(n, max(id) + 1)(thesequence-start-change-keeps-counterpersistence scenario is replaced bysequence-start-change-moves-counter-forwardandsequence-start-change-below-max-id, pinned on live Postgres); the Drizzle identity column and the Kotlin Exposed table carry the start (autoIncrement(Sequence(...)), also pinned on live Postgres); and the C# context ships generated<Context>DesignTimeServicessodotnet ef migrations addscaffolds a start-only change asSET START WITH nplus the forward-only move, replacing theUseIdentityStartMigrations()registration (kept as an[Obsolete]no-op). Java and Python, which write no DDL, load the vocabulary only; ADR-0015 Amendment 1 keepsmeta migratethe reference engine with EF Core migrations as a supported second C# path.Output is keyed by metadata package, and names are claimed, never rewritten (Generated output paths keyed by metadata package in Java, Kotlin and Python #546):
meta initandmetaobjects initscaffoldoutputLayout: "package"(the engine default stays flat, so existing projects change nothing); C# gains opt-incsharp.outputLayout/csharp.packageNamespaceswithglobal::-qualified cross-namespace references; Python writes per-package directories with relative imports and__init__.pyfiles; and Java/Kotlin refuse two metadata packages that would land in one directory (ERR_NAME_COLLISION). The codegen-compile gate and the generated-server api-contract lanes run in both layouts, and the reference examples, recipes and agent-context generator guidance follow. A value object is never renamed: the TypeScript derivedAcmeAlphaNote-style names and theirERR_PAYLOAD_NAME_COLLISIONbackstop are removed, one claim registry per run in TypeScript, C# and Python refuses a real clash withERR_NAME_COLLISION(C#ValueObjectNames.Namesbecomes an[Obsolete]identity shim; ADR-0044 and ADR-0056 amended), two shared enums with one name are refused in TypeScript and Python,@collectionNameandnaming.collectionsnow drive REST segments in Java, Kotlin and Python too (with reverse finders following the name in C#, TypeScript and Python), and a collection-name clash isERR_COLLECTION_NAME_COLLISIONin every port via the sharedcollection-segments.jsoncorpus.View-lowering and C# EF-context parity fixes: the TypeScript view lowering, which builds every port's views, makes every join
LEFT OUTER(a report dimension'srequiredflag no longer changes the join), qualifies a relation only when its entity declares@schema, and lowers multi-operator origin filters, projection-extends-projection, filter paths and multi-hoporigin.first, TPH discriminator scoping, declared-type casts, relative dates andcase— a shape it cannot lower is refused, not silently skipped; and the C# EF context now declaresmeta migrate's CHECK constraints with the same names and expression text (newfixtures/check-conformance/check-constraint-conformanceshared corpus withmeta migrateas reference), carries a JSON value object's@descriptioninto the database as a column comment, configures a flattened value-object member reference's foreign key on the owned type, and — in every port — keeps an entity's derivedorigin.*field out of table reads and writes.Validation
Risk Assessment
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
server/typescript/packages/codegen-ts/src/generators/entity-file.ts:43- Garbled code comment introduced by the change ("// the module's type name are claimed in its directory;" — missing subject words). Fixed in place during this pass to "The module's file name and its type name are claimed in its directory;". Comment-only, no behavior change.server/csharp/MetaObjects.Cli/VerifyCommand.cs:457- NeutralConfig.Read(ProjectRoot..., validateNaming: false) is called three times back-to-back (Dialect, SkipRedundantChecks, WithCSharpLayout) at VerifyCommand.cs:457-459; the identical triple call was introduced at CodegenCli.cs:260-262 and CodegenCli.cs:962-964. Each gen/verify invocation reads and parses the same JSON config file three times; a singlevar project = NeutralConfig.Read(...)local would remove the redundancy (and guarantee one consistent snapshot per run). Purely mechanical, no behavior change.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
docs/CONFORMANCE.md:136- The intent requires issue Honour identity.primary @sequenceStart in the TypeScript, Java, Kotlin and Python ports #544 (identity.primary @sequenceStart, forward-only to GREATEST(n, max(id)+1)) to be honoured "in TypeScript, Java, Kotlin and Python". The change honours it in TypeScript (renderAdvanceSequenceinmigrate-ts/src/emit/postgres.ts), in Kotlin (autoIncrement(Sequence(..., startWith = n))inKotlinExposedTableGenerator.kt) and in C#. It records Java and Python as "Not applicable" (docs/CONFORMANCE.md:136-137, reasoning that OMDB has no DDL and Python has no DDL path), and no Java or Python source reads@sequenceStart. That is a deliberate narrowing of a stated requirement. It is defensible under the "unless we actually want it to be different" clause and under ADR-0015, but it is the author's ruling and needs the user's confirmation. The remedy, not the defect, needs authorization: honouring the start in either port would need new DDL emission (for example a Spring/JPA sequence generator, or a Python SQL emitter) that ADR-0015 removed.ℹ️
server/python/src/metaobjects/codegen/config.py:43- The comment onGenConfig.output_layoutsays the CLI fills it from theoutput_layoutkey of thepythonblock in.metaobjects/config.json. The actual source is the top-leveloutputLayoutkey ofmetaobjects.config.yaml(project_config.pyTOP_LEVEL_KEYS,load_project_config,cli.py_run_gen_targetspassingconfig.output_layout). The comment points maintainers at a config location that does not exist.ℹ️
server/python/src/metaobjects/codegen/config.py:43- The comment onGenConfig.output_layoutsays the CLI fills it from theoutput_layoutkey of thepythonblock in.metaobjects/config.json. The CLI actually reads the top-leveloutputLayoutkey ofmetaobjects.config.yaml(project_config.pyTOP_LEVEL_KEYS and load_project_config;cli.pypassesconfig.output_layout). The comment points maintainers at a config location that does not exist. This was reported in the previous fix round as review-2 and is still unfixed in the committed code.ℹ️
server/python/src/metaobjects/codegen/config.py:43- The comment on GenConfig.output_layout said the CLI fills it from theoutput_layoutkey of thepythonblock in.metaobjects/config.json. The real source is the top-leveloutputLayoutkey ofmetaobjects.config.yaml(project_config.py TOP_LEVEL_KEYS / load_project_config, passed through cli.py _run_gen_targets). The comment pointed maintainers at a config location that does not exist. A previous round reported this as fixed, but the committed tree still carried the wrong text. I corrected the comment in place. Comment only, no behaviour change.server/csharp/MetaObjects.Codegen/Generators/DbContextGenerator.cs:105- The branch deletesAssertOnePhysicalAddress, the codegen-timeERR_DUPLICATE_SQL_NAMEcheck that refused two objects in one generated context mapping to the same (schema, table/view/routine). It existed on the base commit. None of the stated intent items (Generated output paths keyed by metadata package in Java, Kotlin and Python #546 package-keyed paths, Honour identity.primary @sequenceStart in the TypeScript, Java, Kotlin and Python ports #544@sequenceStartforward-only, Python no-rename collision rule) asks for it to go. The only replacement is the comment 'Two objects on one table are EF's to refuse (it does, at model build)', so a clash now surfaces at runtime or atmigrations add, not atdotnet meta gen. EF does not cover routines: two objects on one stored proc or table function are no longer caught anywhere in C# codegen. The test was weakened to match:CSharpNamingTests.csTwo_objects_mapping_one_relation_in_one_context_are_refused_naming_bothbecame..._are_left_to_the_model_build, which asserts onlyAssert.Single(Run(...)), so it would pass whatever the generator does with the clash. The branch folds that guard into the claim registry only for DbSet and REST names. I cannot tell whether the removal is deliberate. Remedy, not the defect, needs the author's call: either restore the guard (move it toctx.Claimwith a physical-address scope and theERR_DUPLICATE_SQL_NAMEcode) or record the removal as an intended behaviour change in the CHANGELOG and ADR-0015 Amendment 1.🔧 Fix applied.
1 warning still open:
server/csharp/MetaObjects.Codegen/ValueObjectNames.cs:36- The branch deletes the publicValueObjectNames.Names(MetaData root)with no replacement. It was made public on purpose so an owned (ejected) generator copy could read the value-object name map. CHANGELOG.md (~line 5412) lists it in the eject public surface, and docs/superpowers/specs/2026-09-22-eject-in-every-port-design.md:60 names it.TypeName(obj, root)keeps its unusedrootparameter 'so an owned generator copy keeps compiling', so the author evidently wanted owned copies not to break. The siblings did keep deprecated shims for one release: TypeScript keepsRenderContext.valueObjectNamesandpackageOf, and Python keepsvalue_object_names,model_class_nameandmodel_import. C# alone drops the member. An adopter's ejected C# generator that callsValueObjectNames.Names(root)now fails to compile after upgrading. The CHANGELOG 'C#: the same claim registry' entry says only that the rename andERR_PAYLOAD_NAME_COLLISIONare gone; it does not mention the API removal. The remedy needs the author's call, not the defect: either restoreNames(root)as a[Obsolete]identity map (ResolutionKey to PascalCase name) like the other two ports, or record the removal as an intended breaking change in the CHANGELOG.🔧 Fix applied.
1 warning still open:
server/typescript/packages/migrate-ts/src/emit/postgres.ts:553- Intent Honour identity.primary @sequenceStart in the TypeScript, Java, Kotlin and Python ports #544 requires@sequenceStartto be honoured forward-only, to GREATEST(n, max(id)+1), in every DDL path. Thealter-sequencepath now does that (renderAdvanceSequence, line 538). The siblingchange-column-identitypath does not. When an existing, populated column gainsincrementidentity together with a@sequenceStart, renderIdentity emits onlyALTER COLUMN .. ADD GENERATED BY DEFAULT AS IDENTITY (START WITH n)and never advances the new sequence past max(id)+1 (diff/index.ts:1089-1091 passessequencethrough; the unit test at migrate-ts/test/unit/identity-sequence.test.ts:139 pins that exact output). Concrete sequence: tableTickethas ids 1..5000 with a plain integer key; the author addsincrementplus@sequenceStart: 100;meta migratecreates a sequence starting at 100 and the first insert hands out 100, which collides with an existing row. This is the same failure the alter-sequence rule exists to prevent, and the renderAdvanceSequence doc comment claims the rule holds "in every port that changes a live sequence". Fix: whento === "increment"andsequence.startis set, append the advance statement after ADD GENERATED. Resolve the sequence withpg_get_serial_sequencewhen no explicit name is given. Update the unit expectation. Siblings: the SQLite emitter (emit/sqlite.ts:418 and :496) has no sequence concept and is not affected.🔧 Fix applied.
2 infos still open:
CHANGELOG.md:58- The [Unreleased] section now has two### Changedheadings (line 16, the new 'Breaking, TypeScript' entry, and the pre-existing one at line 58, with### Addedbetween them). Merge the new entry into the existing Changed section so each heading appears once.server/csharp/MetaObjects.Codegen/FrameworkQualifier.cs:57- The lexer copies every line that starts withusingthrough verbatim, to skip using directives. That also skipsusing var x = new System.IO.StringReader(..)andusing (System.IO.Stream s = ..)statements, so aSystem.reference on such a line is left unqualified. UnderpackageNamespacesa package namedsystem(namespaceAcme.System) then fails with CS0234, which is the failure this class exists to prevent. The generators in this repo are not affected: theirusing varlines (ReportExportGenerator.cs:327, RoutesGenerator.cs:475 and :1049) name noSystem.. An adopter's owned generator that emitsusing varwith aSystem.type would hit it.FrameworkQualifierTestshas nousing varcase. Fix: skip only a directive, meaningusingfollowed by something other thanvaror(. Add a test case for each.🔧 Fix applied.
6 issues (1 warning, 5 infos) still open:
CHANGELOG.md:58- The [Unreleased] section now has two### Changedheadings (line 16, the new 'Breaking, TypeScript' entry, and the pre-existing one at line 58, with### Addedbetween them). Merge the new entry into the existing Changed section so each heading appears once.server/csharp/MetaObjects.Codegen/FrameworkQualifier.cs:57- The lexer copies every line that starts withusingthrough verbatim, to skip using directives. That also skipsusing var x = new System.IO.StringReader(..)andusing (System.IO.Stream s = ..)statements, so aSystem.reference on such a line is left unqualified. UnderpackageNamespacesa package namedsystem(namespaceAcme.System) then fails with CS0234, which is the failure this class exists to prevent. The generators in this repo are not affected: theirusing varlines (ReportExportGenerator.cs:327, RoutesGenerator.cs:475 and :1049) name noSystem.. An adopter's owned generator that emitsusing varwith aSystem.type would hit it.FrameworkQualifierTestshas nousing varcase. Fix: skip only a directive, meaningusingfollowed by something other thanvaror(. Add a test case for each.server/csharp/MetaObjects.Codegen/FrameworkQualifier.cs:110- The round-6 fix (commit 32f0615) closed theusing var x = ..andusing (..)statement forms, but left a third statement form behind: the explicit-type using declarationusing System.IO.StringReader r = new System.IO.StringReader(s);.UsingDirectiveseesusingfollowed by something other thanvar/(and classifies the line as a directive, so it is copied through verbatim and theSystem.reference on it is left unqualified — the exact CS0234 failure underpackageNamespaceswith a package namedsystemthat this class exists to prevent. Reachable only from an adopter's owned generator emitting that form (this repo's generators do not), which is why this is info. Sibling of cov-fq-1, left behind by the round-6 fix. A workable discriminator: a using statement has two or more whitespace-separated tokens betweenusingand the first=(or;when no=), while a directive (using Foo = ..,using System.IO;,using static ..) has at most one before=.server/typescript/packages/migrate-ts/src/emit/postgres.ts:554- The round-5/6 fix (commit 8cf2ba3) advances a newly created identity sequence past max(id) only whensequence.startis declared:return sequence?.start === undefined ? add : add + advance. The no-start sibling remains: an author addsidentity.primary(increment, no@sequenceStart) to a populated plain-int column; diff/index.ts:1089-1091 passessequence: undefined-carrying metadata through, renderIdentity emits onlyADD GENERATED BY DEFAULT AS IDENTITY(Postgres leaves the new sequence at 1), and the first INSERT after the migration fails with a duplicate-key error against an existing row with id 1. This violates the invariant the code's own doc comment states (postgres.ts:508-509, "no id a live row holds is handed out again") and is the same class as seq-1, but it is pre-existing base behavior (the base branch never advanced either), and the intent scopes the required fix to@sequenceStartpaths — so the remedy (advance to GREATEST(start ?? 1, max(id)+1) whenever ADD GENERATED is emitted on the up path, with the guardtarget > (start ?? 1)) extends behavior slightly beyond the stated requirement and needs the author's authorization, not a silent fixer round. The alter-sequence sibling is unaffected (its sequence is live and already past max in normal operation).server/typescript/packages/codegen-ts/src/render-context.ts:19- The package-qualified LOCAL alias the no-rename design derives (localTypeName, and Python'svalue_objects.local_nameat server/python/src/metaobjects/codegen/value_objects.py:150) is never checked against real object names. The Python port's old backstop —_assign's owner seeding, deleted in this change — explicitly refused "a derivedAcmeAlphaNotemust not land on an entity already called that"; the new claim registries claim module/type names per scope but never claim a local alias, so that invariant is now unguarded. Concrete sequence underoutputLayout: "package": packagesacme::alphaandacme::betaeach declareobject.value Note, and the root declaresobject.value AcmeAlphaNote. A generated file referencing bothacme::alpha::Noteand the rootAcmeAlphaNoteemitsimport type { Note as AcmeAlphaNote }besideimport type { AcmeAlphaNote }(TS: confusing duplicate-identifier compile error; Python: silent module-level rebinding — withfrom __future__ import annotations, Pydantic resolves the field annotation from the final binding, so the field validates against the WRONG model with no error). The amended ADR-0044/0056 contract says a clash isERR_NAME_COLLISION; this one is neither refused nor detected. Same unclaimed-derived-name property in the extract-tier mirror/mapper names that take the alias: server/python/src/metaobjects/codegen/runtime/extract_delegate_emitter.py:65 (mirror_name), server/typescript/packages/codegen-ts/src/templates/extract-delegate-emitter.ts (mirrorName), server/typescript/packages/codegen-ts/src/import-path.ts:98 (valueObjectFieldImport's alias branch). Earliest boundary: at alias derivation — refuse (ERR_NAME_COLLISION naming the alias's source object and the clashing object), or extend the qualification — the exact place the removed backstop sat.server/typescript/packages/codegen-ts/src/projection/extract-view-spec.ts:386- This change deletedassertNoRelativeDatefromencodeIntEnumFilterValue(its doc said the throw existed because "a programmatic caller skips the loader, so refuse it here, loudly") and lowered relative-date VALUES — but only scalars. InresolveViewFiltera relative date inside aninARRAY ({ f: { in: [{ now: "-P7D" }, ...] } }) is not lowered (isRelativeOperand(rawValue)is false for the array) and falls through to the literal renderer, which emits garbage SQL text silently instead of the old loud refusal. The sibling pathlowerFilterValue(the origin@filterlowering, same file) DOES map array elements, so the two value paths are inconsistent. Loader rule F1 refuses relative dates off reporting hosts, so reaching it needs a programmatic caller — the exact case the deleted guard covered. Fix: lower array elements the waylowerFilterValuedoes, or keep a loud refusal for the array form.🔧 Fix applied.
2 infos still open:
CHANGELOG.md:58- The [Unreleased] section now has two### Changedheadings (line 16, the new 'Breaking, TypeScript' entry, and the pre-existing one at line 58, with### Addedbetween them). Merge the new entry into the existing Changed section so each heading appears once.CHANGELOG.md:40- The new Unreleased entry "Breaking, TypeScript: a value object is never renamed" claimed that "the run-wide ERR_COLLECTION_NAME_COLLISION pre-pass (naming/collection-name-collision.ts) are removed". That pre-pass still exists and still runs (runner.ts:635 calls assertNoCollectionNameCollisions, correctly refusing collection-name clashes); what was removed is naming/collision-names.ts (assignEmittedNames and the ERR_PAYLOAD_NAME_COLLISION backstop, whose ERROR-CODES.json entry says no port raises it since 1.3.0). A reader upgrading would wrongly expect collection-collision refusals to disappear. Fixed in place during this pass: the sentence now names naming/collision-names.ts / ERR_PAYLOAD_NAME_COLLISION as removed and states the ERR_COLLECTION_NAME_COLLISION pre-pass stays. Wording only, no behavior change.examples/showcase/site-payload.json:11- Committed site payload was stale:counts.corporaread 38 but the builder now counts 39, so the gates lanesite payload is truefailed (bun scripts/build-site-payload.ts --check). This branch adds a conformance corpus and did not refresh the payload. Fixed in place by runningbun scripts/build-site-payload.ts(one-line diff);--checknow passes and the gates lane re-ran green. The change is uncommitted in the worktree and needs committing with this PR.metaobjects genin {tmp-dir}/mo-validate/py-pkg; live-scenarios/py-package-layout-generated; isinstance checks passed under real pydanticmetaobjects genin {tmp-dir}/mo-validate/py-flat: 'ERR_NAME_COLLISION ... both generate Note ... set output_layout package'; exit 1metaobjects genin {tmp-dir}/mo-validate/py-seq: increment case exit 0; no-increment case exit 1 with ERR_SEQUENCE_WITHOUT_INCREMENTHasAnnotation("Npgsql:IdentitySequenceOptions", "'100', '1', ...")); first run logged the no-dialect warningmvn installplus a scaffolded Maven project was not completed within the 1h30m budget. Driving…scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsFull flagless regression:scripts/ci-local.sh(log: evidence full-regression/ci-local-full.log). All lanes passed except gates (site payload stale, fixed) — java, java-integ, python, ts, ts-integ, csharp, kotlin-integ, showcase, cube, mutation all ✓.Gates lane re-run after fix:scripts/ci-local.sh --only gatesexit 0 (evidence full-regression/ci-local-gates-rerun.log).Baseline already run by configured command:scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains.Disposable Postgres 16 (docker container mo-validate-pg, 127.0.0.1:56611), removed afterwards. Used the built meta CLIserver/typescript/packages/cli/dist/bin/meta.jsagainst throwaway projects under {tmp-dir}/mo-validate.TS live: fresh create with identity.primary increment + @sequenceStart 100 viameta migrate --slug init --apply; inserted two rows → ids 100, 101.TS live populated-table cases (scripts ts-seq-BCD.sh): live max(id)=5, start 3 → next id 6; live max=5, start 100 → 100; live max=5000, start 1000 (change-column-identity path, the seq-1 fix) → 5001; each checked no duplicate id.TS live alter path (ts-seq-E.sh): identity already live, @sequenceStart 1000 added with live max 5000 →ALTER SEQUENCE ... START WITH 1000plus forward GREATEST advance → next id 5001, no duplicate.TS observation: identity increment with no start added to populated plain key → advance to GREATEST(1, max+1) emitted; next insert 5001 (no collision).Python live:metaobjects gen(server/python/.venv/bin/metaobjects 1.3.0) on two packages each declaring value Note plus acme::app Digest. outputLayout package → generated/acme/alpha/Note.py, acme/beta/Note.py, acme/app/Digest.py with relative imports; imported with real pydantic; Digest.a is alpha Note, Digest.b is beta Note (isinstance). Flat layout → ERR_NAME_COLLISION exit 1.Python live alias clash: root AcmeAlphaNote plus acme::alpha::Note referenced together → ERR_NAME_COLLISION refused (exit 1).Python live @sequenceStart loader: increment + start 100 generates; start without increment → ERR_SEQUENCE_WITHOUT_INCREMENT.TypeScript livemeta gen(cli dist, entityFile, disposable project with node_modules symlink): flat → ERR_NAME_COLLISION exit 1; package → generates acme/alpha/Note.ts, acme/beta/Note.ts, acme/app/Digest.ts;tsc --strict --module nodenexttypecheck of the generated package-layout output exit 0 (zod linked from codegen-ts); alias clash with root AcmeAlphaNote → ERR_NAME_COLLISION.meta initin an empty directory writes metaobjects.config.ts with outputLayout: "package".C# live: built MetaObjects.Cli from this branch;dotnet meta gen(scaffolded codegen project repointed at local MetaObjects.Codegen via ProjectReference, since 1.3.0 is not on NuGet) with identity.primary increment + @sequenceStart 100 and Postgres dialect → AppDbContext emits Npgsql:IdentitySequenceOptions start '100'; without Postgres dialect → warning (intended).C# live duplicate physical table: two entities on @table tickets → ERR_DUPLICATE_SQL_NAME naming both, exit 1 (restored guard).Adversarial checks: flat-layout and alias collisions (TS and Python), a start below max(id) not restarting the counter, and a start without increment rejected by the loader.🔧 **Document** - 1 issue found → auto-fixed ✅
docs/recipes/write-your-own-generator.md:40- The change made a claim registry the way every emitted name is refused on collision (ctx.claim(scope, name, claimant, remedy) in TypeScript, ctx.Claim(...) in C#; ERR_NAME_COLLISION names both claimants), but the generator-authoring recipe — the primary-path doc for owned-generator authors, the audience that now shares name scopes with the stock generators — never mentions it. Nothing in the recipe is factually wrong, so this is an addition rather than a stale fact, and adding it here would exceed this phase's stale-only scope. Follow-up: one short paragraph in the recipe's shape section saying an owned generator that emits a type, module, barrel entry, route segment or file path into a shared scope should claim each name so a real clash is refused with ERR_NAME_COLLISION instead of colliding silently.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.