Repository navigation
feat: fail verify on hand edits and add migrate.foreignKeyIndexes (1.3.0 PRs 6-7) - #577
Merged
Merged
Conversation
…3.0 PRs 6-7) verify.handEdits in .metaobjects/config.json: "fail" makes `meta verify --codegen` exit 1 on a hand-edited generated file, naming the file and both remedies; --allow-hand-edits relaxes it for one run, --forbid-hand-edits still forces it. A project without the key keeps the notice and exit 0; `meta init` writes "fail". The C#, Java, Kotlin and Python gates already byte-compare and fail; the docs now say so. migrate.foreignKeyIndexes: every foreign key nothing already leads with gets a plain <table>_<columns>_idx index, separate from the efcore preset (which indexes them already and so adds nothing). Honoured by meta migrate / verify --db, the Drizzle reference template, the C# DbContext generator and the Kotlin Exposed table generator; Java OMDB and Python map no indexes. `meta init` writes it on; projects without it are unchanged and keep the advisory, which now names the option. Persistence corpus gains two migration scenarios. C# gen and both verify --codegen paths pass foreignKeyIndexes and conventions.
…y the TS toolchain
…e-differences rows for verify.handEdits and foreignKeyIndexes)
dmealing
added a commit
that referenced
this pull request
Nov 14, 2026
…rt (#580) * fix(python): pass only validated input to the repository in generated routes (#566) * fix(python): generated routes hand the repository only the validated input (1.2.1) The generated FastAPI create, PATCH and PUT handlers validated the body against <Entity>Create / <Entity>Patch and then passed the RAW body to the repository. Pydantic ignores undeclared keys and the input models leave out server-owned fields, so a client-sent id, a readOnly field and a made-up field such as isAdmin all reached the write. Security fix. Each handler (plain and TPH per-subtype) now rebinds dto to the keys the input model validated, at every depth, before any repository call, as the TypeScript routes do. Undeclared and non-settable keys are dropped silently, never 400'd, so a client sending an extra harmless field keeps working; values stay the body's own, so repositories see the same value types as in 1.2.0. Python package version 1.2.1 only; CHANGELOG entry under Security. Regression gate: tests/integration/test_generated_router_validated_input.py. * no-mistakes(document): python routes pass only validated input * no-mistakes(lint): regenerate showcase site payload for PyPI 1.2.1 * fix(codegen): generated routes drop server-owned and undeclared input in every port An audit after the Python 1.2.1 fix found the same request-input hole in the other ports' generated create handlers. Each port now drops, silently and before the write, a server-generated key, readOnly and derived fields, and on a TPH per-subtype route the discriminator and sibling-subtype columns; undeclared keys are dropped everywhere. - Python: forward-port of the 1.2.1 fix; TPH create drops a body discriminator. - Java: create nulls the dropped DTO components; DTOs ignore unknown properties. - Kotlin: create writes only settable columns; entity classes ignore unknown keys. - C#: create resets the generated key, discriminator and M:N navigations; every readOnly property gets a private setter. - TypeScript: an assigned primary key leaves the update schema. Shared api-contract scenarios input-server-owned-dropped (core) and tph-input-server-owned-dropped, a readOnly column in secret-fields, and an `absent` assertion in every runner gate it. * feat(codegen): a validation 400 lists every issue in every port The same model answered a failed create or update differently by language: TypeScript listed each problem, while C#, Java, Kotlin and Python returned a bare {"error":"validation"}. Every port's generated routes and its hand-rolled reference servers now answer 400 {"error":"validation","issues":[{code,path, message}]} with every failure, codes in Zod's vocabulary and path as an array of wire names. - C#: ValidationIssues runtime file (ejected with routes); create reads the body itself so an unbindable body lists its issue; PATCH collects instead of returning on the first failure. - Java: ValidationIssues runtime helper; a Patch binds every field before it throws. Kotlin: per-package MetaValidationIssues.kt; create lists every absent required value. - Python: every Pydantic error mapped in constraint_errors; decimal failures carry their wire path. Shared scenarios validation-lists-issues and tph-validation-lists-issues, with a new `issues` assertion in every runner, gate it in both lanes. * feat(api): a page size for generated list routes, api.pagination (TypeScript) List endpoints had no hard cap: a TypeScript or C# list with no `limit` returned the whole table and `?limit=100000` was accepted everywhere. A project can now set `"api": { "pagination": { "defaultLimit": N, "maxLimit": M } }` in .metaobjects/config.json: a generated entity or projection list with no `limit` answers the default page, and a `limit` above the cap answers 400 {"error":"limit_too_large","maxLimit":M}. Reports keep their own row cap and opaque views their 1000. - sdk reads and validates the block; the loaded root carries it (apiPaginationOf), as it carries the wire format. - runtime-ts mounts take a `pagination` option (pageLimit); the packaged and reference Fastify and Hono routes emit it. Owned copies re-synced. - meta init writes 50 / 1000 for a new project; `--force` over an existing config does not add it. A project without the setting behaves as before, and meta verify advises (rule unbounded-list-pages) when routes are wired. - New api-contract `pagination/` sub-corpus, run in the TypeScript generated lane. The C#, Java, Kotlin and Python routes do not read it yet: their REST generators are under the non-TS freeze, pending that ruling. A config key, not vocabulary: metamodelVersion does not move. * feat(api): api.pagination in every port, and api.unknownFields (reject by default) api.pagination (default page size and hard cap on generated list routes) now reaches the C#, Java, Kotlin and Python generators as well as TypeScript: no limit answers the default page, a limit over the cap is 400 limit_too_large. No setting keeps today's behaviour. verify advises when routes are generated without it (TypeScript, Python, Java/Kotlin, and C# under verify --codegen). api.unknownFields (reject | drop, default reject): a generated create, PUT or PATCH body carrying a key the entity does not declare answers 400 {"error":"unknown_fields","fields":[...]} in every port, before validation, and writes nothing. drop keeps the old silent behaviour. Declared server-owned keys (id, readOnly, @autoset, writeOnce on update, the TPH discriminator, a sibling subtype's column) are still dropped, not refused, so a client echoing back a row keeps working. Java and Kotlin check the raw body, so the answer does not depend on the host's Jackson mapper; a test proves it under both FAIL_ON_UNKNOWN_PROPERTIES values. The pagination sub-corpus becomes api-settings/ and runs in every port's generated lane; the core and tph corpora gain reject scenarios. meta init writes both settings into a fresh config. * chore(showcase): regenerate for api.unknownFields * fix(api): code-point order for unknown_fields, every distinct validation issue, a negative limit refused under api.pagination - unknown_fields lists keys in code-point order in every port (TypeScript and C# sorted by UTF-16 code unit, which put a key outside the BMP first). - A validation 400 keeps two distinct failures of one rule kind on one field (Python and C# de-duplicated on path and code); a type error still lists once. - Under api.pagination a negative limit answers 400 pagination.invalid_value in every port instead of reaching the store (SQLite reads LIMIT -1 as no limit). New api-settings/limit-negative scenario. - Python validated-input tests follow api.unknownFields; advanced-modeling example regenerated; C# routes generator header names the current contract. * fix: generated create routes drop server-owned input across ports (1.2.x security) (#568) * fix: generated create routes store only client-settable fields (1.2.x security) Python 1.2.1 stopped its generated routes from handing raw request input to the repository. The same audit found related create-path holes in 1.2.0 in the other four ports; this closes each in its own idiom. Server-owned values are dropped silently, never answered with 400. - Java (codegen-spring): create strips a generated id, readOnly and derived fields; a TPH per-subtype create also strips the body discriminator and sibling-subtype fields. - Kotlin (codegen-kotlin): create skips readOnly/derived columns; a TPH per-subtype create writes only the route subtype's own columns. - C# (MetaObjects.Codegen): every readOnly property shape gets a private setter; create resets a generated id, the TPH discriminator and M:N navigations before Add. - TypeScript (codegen-ts): the update schema omits primary-key fields, so PUT/PATCH can no longer re-key a row with an assigned key. Proof: new shared api-contract scenarios (core + TPH input-server-owned, TPH foreign discriminator) and a readOnly `role` field in secret-fields, run in every port's generated lane and the reference lanes; a new `unset` assertion key in all five harnesses. In-memory test repositories now store what they are handed, so the scenarios fail on the 1.2.0 generators. Proposed versions (not published): npm 1.2.2, NuGet 1.2.2, Maven 8.2.2; PyPI unchanged at 1.2.1. metamodelVersion unchanged. * fix: keep a @required readOnly field creatable in C# and Java generated create Pre-gate review follow-ups to the 1.2.x create-input patch: - C#: the required-key check skips readOnly fields (the private setter never binds them), and create validation ignores a violation naming only a @required readOnly member, as Java's SERVER_OWNED_ON_CREATE does. - Java: the create-validation server-owned set covers every DTO component, so a nulled readOnly or derived value-object column no longer 400s. - TypeScript: drop the now-dead PK guard in the update-schema nullable arm and list the PK rule in updateSchemaFields' doc comment. * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): Kotlin readOnly create fix + C# reset skip * no-mistakes(document): docs: finish stale corpus counts from input fix * fix(cli): prune emptied skill directories after a --skills-dir move; install every module the Kotlin integration lane needs meta init --refresh-docs --skills-dir <new> removed the untouched skill files at the old path but left their directories behind, which read as the old copy still being there. Walk up from each pruned file and remove the directories it left empty, stopping at the first that still holds anything and never removing the skills directory itself. scripts/integration-test.sh kotlin installed only metadata and codegen-kotlin, so on an .m2 without the other metaobjects artifacts integration-tests-kotlin failed to resolve core-spring and om, and codegen-kotlin-exposed1x-check metadata-ktx. * test(render): hold the email helper in the runtime-drift corpus case Every generated render path in the five ports already raises ERR_VAR_NOT_ON_PAYLOAD for a template variable not on the payload (1.3.0, #520), and runtime-drift/ held the document and prompt helpers. The @kind: email helper was not in the case. Add WelcomeEmail plus email-subject/, email-html/ and email-text/ drift directories, one drifted part each, and check every part raises in the TS, Python, C#, Java and Kotlin runners. * feat(init): dotnet meta init and metaobjects init write the api block TypeScript meta init writes A new project gets api.pagination 50/1000 and api.unknownFields reject in .metaobjects/config.json from every port's init; an existing config is never edited. * feat(init): dotnet meta init and metaobjects init also write migrate.foreignKeyIndexes and verify.handEdits The same new-project keys TypeScript meta init writes since #577. * feat(api): drop undeclared value-object members everywhere and share the api config cases - New jsonb scenario jsonb-nested-undeclared-key-dropped: api.unknownFields judges the top level only, so a member a value object does not declare is dropped on create and PATCH and never stored, while the open jsonb bag keeps every key. The reference servers in every port drop such members; the Java generated value-object record now carries @JsonIgnoreProperties(ignoreUnknown = true) (it answered 400 invalid_type). - New shared config corpus api-settings/config-blocks.json (valid and refused api blocks), run by the TypeScript, C#, Java and Python config readers. A page size is a positive whole number however JSON spells it, at most 2147483647: C# now reads 50.0, TypeScript and Python refuse anything above the int32 range. - CHANGELOG: an Upgrading section (api.unknownFields reject as the one deliberate default change, the C# readOnly private setter), init parity across ports, the nested-member rule. Counts, READMEs, api-contract.md and the migration guide updated; showcase Java regenerated. * fix(api): close the code-review findings on the input and page-size work - C#: with api.pagination set, `limit=0` served the default page; it is now a page of zero rows, as in every other port. New shared scenario api-settings/limit-zero (all five ports green). - C#: the unknown-field check matches a key the way the route binds the body (the app's System.Text.Json options; the ASP.NET web default ignores case), so `Title` is the declared `title`, not a 400. The verify advisory matches the routes generator by type or exact name, not by a "routes" substring. - Python: a rejected decimal's text is no longer echoed into the 400 issue message; the unbounded-list-pages advisory fires only when the routes generator is wired; the dead _DECIMAL_COERCE constant is gone. - Java: UnreadableBody's Javadoc describes the issues envelope it returns. - Docs: M:N traversal routes take no limit and are not paged by api.pagination (stated as the boundary); the C# port doc no longer says dotnet meta init writes no config. Counts updated. * refactor: read the project config once in the Maven mojo; drop a no-op path coercion in Python issues Simplify pass: AbstractMetaDataMojo maps its four project settings from one read of .metaobjects/config.json, and pydantic_issues copies loc as-is (its entries are already int or str). * no-mistakes(review): Scope ignoreUnknown to request bodies; fix review items * no-mistakes(review): Drop discriminator on Python TPH update; fix scenario text * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): Fix doc counts, dead guard, stale comments, vacuous assertion * no-mistakes(review): apply reviewer inline fixes * no-mistakes(review): Fix stale routes comment in C# api-settings factory * no-mistakes(review): Fix stale eject docs, vacuous C# check, assertion messages * no-mistakes(review): Refuse non-numeric C# page bounds with 400 * no-mistakes(review): Refuse out-of-range or negative C# offset * no-mistakes(review): Drop source-grepping Python router tests * no-mistakes(review): apply reviewer inline fixes * test(ts): re-sync the owned zod-validators copy after the pkFields reference change The input-handling change edited the codegen-ts reference source but not the owned copy under test-generators, so cli/test/owned-copies-current.test.ts (the 'owned copies are what meta eject writes' gate) failed: the copy on disk kept the pre-change update-shape text. bun scripts/sync-owned-template-copies.ts re-synced 1 of 128 owned copies; no other copy drifted. * no-mistakes(test): Validate re-synced zod-validators owned copy * no-mistakes(test): apply changes made during test validation * no-mistakes(document): Correct init config docs for C# and Python * test(kotlin): expect table-qualified columns in the TPH create autoSet tests The TPH per-subtype create now writes every column through the table object (it[AuthTable.autoCreatedAt]), so a column named body, issues or unknownKeys cannot be shadowed by the handler's locals. Two KotlinAutoSetStampingTest cases still asserted the unqualified form and failed the java-slow lane.
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
verify.handEditscan fail a hand-edited generated file."verify": { "handEdits": "fail" }in.metaobjects/config.jsonmakesmeta verify --codegenexit 1, with a report that names each file and both remedies (drop the edit, or move the changed rule into the metadata and keep it); the new--allow-hand-editsflag relaxes one run, the existing--forbid-hand-editsstill tightens one run (passing both is refused), and a project without the key keeps today's notice and exit 0.meta initwrites"fail"for new projects. The C#, Java, Kotlin and Python gates already byte-compare generated files and fail on any edit, so they needed docs only — recorded as new per-port rows indocs/features/language-differences.md.migrate.foreignKeyIndexesindexes every foreign key, separate from theefcorepreset. With the option on,meta migrategives each enforced foreign key whose columns the primary key, a@uniquefield, anidentity.secondaryor a non-expressionindex.lookupdoesn't already lead with a<table>_<cols>_idxindex: two FKs over one column set share one index, a shorter FK led by a longer candidate is dropped, and nothing is added under theefcoreconventions (which already index every FK) or on MySQL. The Drizzle and Prisma mappings declare the same indexes via a newforeignKeyIndexesOfhelper on the codegen-ts engine surface, and the C#AppDbContextand Kotlin Exposed generators apply the same rule; Java OMDB and Python map no indexes. Projects without the key are unchanged and the unindexed-FK advisory now names the option;meta initwrites it on except MySQL; C#genand bothverify --codegenpaths pass the new settings so regen matches gen, and Java carries the migrate block on the loaded root asMigrateSettings.Conformance, docs and the run-2 merge. Two new persistence-corpus migration scenarios (
foreign-key-indexes-added,noop-converged-foreign-key-indexes), gated by a scenario format that gains optionalschema-settings/seed-schema-settings; CHANGELOG[Unreleased]carries both features, and the run-2 merge of origin/main keeps both branches' entries and adds the two language-differences rows so that page is accurate for this change.Validation
Risk Assessment
✅ Low: The merge of origin/main is a clean conflict resolution verified on all six files both branches touched, the two new language-differences rows are accurate against the code, and the re-verified PR 6/7 logic (policy precedence, FK-index coverage rule, per-port settings threading) holds on every concrete input traced, with the one known divergence already a documented user decision.
Testing
13 of 16 scenarios passed live: the verify.handEdits gate and its flags on the real
metaCLI, the new init defaults,meta migrateFK-index emission and its converged no-op, the Drizzle mapping and verify-settings threading, the two new persistence-corpus scenarios on Testcontainers Postgres, C# gen/verify through the realdotnetCLI, and Kotlin generation through the real Maven goal. Three scenarios are untested: the merged-docs accuracy check (documentation has no runtime product surface to drive; accuracy was established by reading the merged files and corroborating against the live port drives, so the prior pass is downgraded per the live-validation contract), the Java NeutralConfigTest run (a surefire test-harness execution recorded live=false by the prior payload; 17/17 is preserved as a unit-level observation undertested), and the broad TS regression suite, which was still running at the enforced deadline and was stopped, leaving its final result unknown — the only open item and the reason the verdict is inconclusive rather than go. No failures of any kind were observed; the worktree was left clean and the disposable projects removed.meta verify --codegenfails (exit 1) on a hand-edited generated file when.metaobjects/config.jsonsetsverify.handEdits: "fail", naming the file and both remedies (see the edit / drop it or mov…metaCLI 1.3.0 in a disposable trainer-fixture project, hand edit max(255)→max(64) in generated/User.tsverify.handEditskey keeps today's behavior: notice naming the file, exit 0--allow-hand-editsrelaxes a configuredfailfor one run: notice, exit 0--forbid-hand-editsstill forces failure without the key (fold-in does not break current invocations), and passing both flags is refused (exit 2)meta verify(codegen gate on by default) honoursverify.handEdits: "fail"— exit 1--allow-hand-editsrelaxes ONLY the hand-edit policy — real codegen drift (metadata change without regen) still exits 1meta initwrites the new-project defaults:verify.handEdits: "fail"always, andmigrate.foreignKeyIndexes: trueexcept on MySQL (no migrate block at all there)meta initruns compared in-session (default and--dialect mysql); configs quoted in the scenario transcript of the runmeta migratewithmigrate.foreignKeyIndexes: trueemitsCREATE INDEX "orders_customerId_idx" ON "orders"for the enforced FK, and a second migrate is a converged no-op ('no changes', nothing wri…meta migrateproposes zero indexes and the verify advisory names the option ("migrate": { "foreignKeyIndexes": true } ... and run 'meta migrate')index("orders_customerId_idx").on(table.customerId)) andmeta verify --codegenpasses clean with the settings threaded; turning the option O…foreign-key-indexes-added: only uncovered FKs indexed, junction FKs under composite PKs get none;noop-converged-foreign-key-indexes: zero SQL w…bun test test/migration.test.ts -t foreign-key-indexes: 2 pass, 0 fail, 8.07sdotnet meta genemits the migrate-named index in AppDbContext (HasIndex(x => x.CustomerId, "orders_customerId_idx")) with the option on and nothing without it; C#dotnet meta verify --codegen…mvn com.metaobjects:metaobjects-maven-plugin:8.3.0:generate: `index("orders_customerId_idx", false, cust…scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains) finishes greenNeutralConfigTest)mvn -pl metadata test -Dtest=NeutralConfigTest, 17/17), not a drive against the running prod…Evidence: PR6: verify --codegen handEdits fail/notice/flags transcripts (exit codes inline)
meta verify — 1 generated file(s) carry hand edits, and verify.handEdits is "fail" in .metaobjects/config.json: generated/User.ts To drop an edit: delete the file, run 'meta gen' and commit the regenerated file; ... make that change in the metadata instead... To keep an edit on purpose: pass --allow-hand-edits for one run, or set "handEdits": "notice" ...Evidence: PR6 full structured payload of the failing verify run
Evidence: PR7: `meta migrate` up migration with FK index (sqlite)
8: FOREIGN KEY ("customerId") REFERENCES "customers" ("id") 11:CREATE INDEX "orders_customerId_idx" ON "orders" ("customerId");Evidence: PR7: option-off migrate (0 CREATE INDEX) + advisory naming the option
Evidence: PR7: generated Drizzle table declaring migrate's index
22: (table) => [index("orders_customerId_idx").on(table.customerId)],Evidence: Persistence corpus: both new FK-index migration scenarios pass on Testcontainers PG (2 pass, 8.07s)
Evidence: C# AppDbContext generated with the FK index
modelBuilder.Entity<Order>().HasIndex(x => x.CustomerId, "orders_customerId_idx").HasDatabaseName("orders_customerId_idx");Evidence: C# verify --codegen fails a hand-edited DbContext (exit 1)
Evidence: Kotlin Exposed table from `mvn metaobjects:generate` declaring the FK index
13: index("orders_customerId_idx", false, customerId)Evidence: Kotlin option-off transcript + TS --allow-hand-edits-does-not-relax-drift adversarial result
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsre-run on the same head f50258f passed, mutation gate included, and the test step was approved with that reason recorded.) Originally: The step's broad-regression command (scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains— the same command that passed as this phase's configured baseline) was started and ran ~45 minutes but had NOT completed when the enforced structured-result deadline arrived: it was mid-way through the ts-fast lane's TS conformance tests when it was stopped. Its final result is therefore unknown, which blocks a 'go' verdict; every scenario this change alters that has a live product surface passed live (13 of 16). The suite needs one clean re-run by the outer executor (nothing observed suggests a failure — the run was interrupted, not red).scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsre-run on the same head f50258f passed, mutation gate included, and the test step was approved with that reason recorded.) The other two untested items are docs or unit-level checks with no live surface. Originally: live validation verdict: inconclusive (13 of 16 scenarios were driven live against the product); untested: The merged docs are accurate: CHANGELOG [Unreleased] keeps both branches' entries, and the two new language-differences.md rows match the behavior observed live on each port (TS config key + flags; C#/Java/Kotlin/Python byte-compare; AppDbContext and Exposed declare indexes; Java/Python declare none), Complete TS regression suite (scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains) finishes green, Java carries the migrate block on MetaRoot as MigrateSettings (NeutralConfigTest)meta verify --codegenfails (exit 1) on a hand-edited generated file when.metaobjects/config.jsonsetsverify.handEdits: "fail", naming the file and both remedies (see the edit / drop it or mov…metaCLI 1.3.0 in a disposable trainer-fixture project, hand edit max(255)→max(64) in generated/User.tsverify.handEditskey keeps today's behavior: notice naming the file, exit 0--allow-hand-editsrelaxes a configuredfailfor one run: notice, exit 0--forbid-hand-editsstill forces failure without the key (fold-in does not break current invocations), and passing both flags is refused (exit 2)meta verify(codegen gate on by default) honoursverify.handEdits: "fail"— exit 1--allow-hand-editsrelaxes ONLY the hand-edit policy — real codegen drift (metadata change without regen) still exits 1meta initwrites the new-project defaults:verify.handEdits: "fail"always, andmigrate.foreignKeyIndexes: trueexcept on MySQL (no migrate block at all there)meta initruns compared in-session (default and--dialect mysql); configs quoted in the scenario transcript of the runmeta migratewithmigrate.foreignKeyIndexes: trueemitsCREATE INDEX "orders_customerId_idx" ON "orders"for the enforced FK, and a second migrate is a converged no-op ('no changes', nothing wri…meta migrateproposes zero indexes and the verify advisory names the option ("migrate": { "foreignKeyIndexes": true } ... and run 'meta migrate')index("orders_customerId_idx").on(table.customerId)) andmeta verify --codegenpasses clean with the settings threaded; turning the option O…foreign-key-indexes-added: only uncovered FKs indexed, junction FKs under composite PKs get none;noop-converged-foreign-key-indexes: zero SQL w…bun test test/migration.test.ts -t foreign-key-indexes: 2 pass, 0 fail, 8.07sdotnet meta genemits the migrate-named index in AppDbContext (HasIndex(x => x.CustomerId, "orders_customerId_idx")) with the option on and nothing without it; C#dotnet meta verify --codegen…mvn com.metaobjects:metaobjects-maven-plugin:8.3.0:generate: `index("orders_customerId_idx", false, cust…scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains) finishes greenNeutralConfigTest)mvn -pl metadata test -Dtest=NeutralConfigTest, 17/17), not a drive against the running prod…scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsmeta verify --codegenwithverify.handEdits: "fail"on a hand-edited generated file (max(255)→max(64)) — exit 1, file named, both remedies printedmeta verify --codegenwith no handEdits key — notice, exit 0 (existing-project behavior)meta verify --codegen --allow-hand-editswith "fail" configured — notice, exit 0meta verify --codegen --forbid-hand-editswith no key — exit 1--allow-hand-edits --forbid-hand-editstogether — refused, exit 2; baremeta verifyhonours the config — exit 1--allow-hand-editswith real metadata drift present — drift still fails, exit 1 (adversarial)meta init(default and--dialect mysql) — writesverify.handEdits: "fail"and (except MySQL)migrate.foreignKeyIndexes: truemeta migrate --from-dbwithforeignKeyIndexes: true— emitsCREATE INDEX "orders_customerId_idx"; re-run — 'no changes' (converged no-op)meta migratewithout the option — zero CREATE INDEX;meta verifyadvisory names"migrate": { "foreignKeyIndexes": true }meta gen+meta verify --codegenwith the option on — Drizzle table declaresindex("orders_customerId_idx"), verify clean; option off — verify reports drift on the index-carrying file (settings proven to reach the regen)bun test test/migration.test.ts -t foreign-key-indexes(persistence corpusforeign-key-indexes-added+noop-converged-foreign-key-indexes) against Testcontainers Postgres — 2 passdotnet meta gen/verify --codegenon a scratch C# project (ProjectReference to the working tree, the repo's own preflight arrangement) —HasIndex(x => x.CustomerId, "orders_customerId_idx")on, none off; hand-edited file fails verify with exit 1mvn com.metaobjects:metaobjects-maven-plugin:8.3.0:generateon a disposable Kotlin project —index("orders_customerId_idx", false, customerId)on, none off;KotlinExposedForeignKeyIndexTest3/3;NeutralConfigTest(Java MigrateSettings) 17/17 (unit-level test-harness runs, not live product drives)scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains— STARTED, interrupted mid ts-fast lane at the enforced deadline; result unknown (the identical command passed as the phase baseline)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.