Repository navigation
fix: move sdk to zod 4 and fix port verify and quickstart defects - #452
Merged
Merged
Conversation
…s, README, CI wording) - sdk: zod ^4.6.6 (a fresh npm i of the CLI no longer reports advisories); config read on the zod 4 API - docs/ports: Java, Kotlin and C# quickstarts work as written against the published packages; 1.1.0 / 8.1.0 stamped - C#: verify --templates <missing dir> fails; bare verify uses the default prompt root; routes no longer warn CS8600 - Maven: stale-code advice names the generate command that runs for the module's configuration - README quick start; CONTRIBUTING says one thing about CI
…auto-install The pristine project the check generates in lives under the system temp dir, with no node_modules above it, so Bun auto-installed the config's @metaobjectsdev/* imports from the machine-wide cache. That copy cannot resolve @biomejs/wasm-nodejs, the formatter failed, and every ts file read as stale. An empty node_modules turns auto-install off.
… without templates
…ONTRIBUTING Local CI header/trigger wording (PR runs leak scan only). Version restamps, zod, quickstart, port docs were already current in the diff. AGENTS.md left unedited.
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
@metaobjectsdev/sdkdeclareszod^4.6.6instead of^3.23.0, and its config loader moves to the zod 4 API (prefault,z.core.$ZodIssue, union-arm paths carried down). A freshnpm i @metaobjectsdev/clino longer pulls the zod 3 line that the advisory covers. Accepted config is unchanged; config errors keep naming each path.verify --templates <dir>exits 2 when<dir>does not exist. Bareverify <metadataDir>now runs the templates gate, readingprompts/if present, elsetemplates/. The drift message saysgenneeds--out. The generated create route declaresAuthor? input, so*Routes.g.cschanges one line on the next regen.mvn metaobjects:generate@<execution-id>when the generate configuration sits inside an<execution>, instead of a bare goal that fails there.main, nightly and on release tags. CHANGELOG[Unreleased]records these fixes.Notes
scripts/regen-showcase.tscreates an emptynode_modulesin the pristine temp project so Bun does not auto-install the workspace packages.Validation
Risk Assessment
✅ Low: Changes are doc restamps and quickstart fixes, a bounded zod 3→4 move in sdk that I traced as correct (prefault, union issue paths), small C# verify and Maven message fixes with behavioral tests, and a showcase hash that matches the regenerated file; I found no defects.
Testing
Fixes for the three prior findings were already in HEAD; I verified them live: the TS quickstart runs clean (init, eject, gen, verify --codegen all exit 0, and drift is caught), and the C# verify cases fail/pass as help states. C# CLI tests pass (305). Not driven: Java/Kotlin quickstarts, Maven stale-drift advice, zod range, README language restamp, CONTRIBUTING D8, GitHub settings. Full TS suite did not finish within 10 min, so full regression is incomplete.
bun testin server/typescript exceeded 10 min and was killed; scoped ts-unit baseline passed.Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
README.md:39- README quick start was not copy-paste correct.meta ejectnever edits metaobjects.config.ts (server/typescript/packages/cli/src/commands/eject.ts:11), so the followingmeta genprinted "no generators are wired" and generated nothing. Baremeta verifyruns only the templates gate (cli/src/commands/verify.ts:199), so "fail if anything has drifted" was false: generated-code drift went unchecked. This is the same defect the intent asked to fix in the C# quickstart. Changed the eject comment to "copy them in; add the lines it prints to metaobjects.config.ts" and the last line tonpx meta gen && npx meta verify --codegen # generate, then fail if generated code has drifted. The quick start is still five lines, and the locked pitch is byte-identical to base.CONTRIBUTING.md:28- D8 rewrite replaced one false statement with another. The new text said "GitHub Actions runs the same checks on your pull request, so a red local run is a red PR", but only hygiene.yml triggers on pull_request, and it runs only--only leak-scan. conformance.yml runs on tags and the nightly schedule, integration-tests.yml on tags, and local-ci.yml on push to main and nightly. Rewrote step 3 and the Local CI header to say what is true: a PR runs only the leak scan, and the other lanes run on main, nightly and on tags. Corrected the matching CHANGELOG bullet the same way.CHANGELOG.md:18- The CHANGELOG said the sdk's config errors are "unchanged" after the zod 3 to 4 move. describeConfigError printsissue.message, and zod 4's issue wording differs from zod 3's (for example unrecognized keys and literal mismatches). Reworded to: the accepted config is unchanged, and a rejected config still names each path, with the reason in zod 4's wording.README.md:39- The inline commit c09c56b changes two lines in the README Quick start, and no recorded inline fix covers that hunk. The eject comment now says 'copy them in; add the lines it prints to metaobjects.config.ts', and the last line changesnpx meta verifytonpx meta verify --codegen. The content is correct and is documentation only. Baremeta verifyruns only the templates gate (verify.ts:198-212), so--codegenis the gate that catches generated-code drift.meta ejectreports the config edits and never makes them (eject.ts:11, 768-780). Do not revert this hunk. Record it as an inline fix (README quick start: verify flag and eject wiring note) so the inline-fix record matches the diff.🔧 No changes applied.
2 infos still open:
CONTRIBUTING.md:28- D8 rewrite replaced one false statement with another. The new text said "GitHub Actions runs the same checks on your pull request, so a red local run is a red PR", but only hygiene.yml triggers on pull_request, and it runs only--only leak-scan. conformance.yml runs on tags and the nightly schedule, integration-tests.yml on tags, and local-ci.yml on push to main and nightly. Rewrote step 3 and the Local CI header to say what is true: a PR runs only the leak scan, and the other lanes run on main, nightly and on tags. Corrected the matching CHANGELOG bullet the same way.CHANGELOG.md:18- The CHANGELOG said the sdk's config errors are "unchanged" after the zod 3 to 4 move. describeConfigError printsissue.message, and zod 4's issue wording differs from zod 3's (for example unrecognized keys and literal mismatches). Reworded to: the accepted config is unchanged, and a rejected config still names each path, with the reason in zod 4's wording.README.md:39- README Quick start fails as written:meta genexits 1 with[routes-file] codegen config is missing dbImportafter the five-line flow, soroutesin the eject list needs a dbImport line or must be dropped.server/csharp/MetaObjects.Cli/Program.cs:437- C# baredotnet meta verifywith neither prompts/ nor templates/ present exits 0 printing--templates: OK; help says it reads templates/ otherwise and a missing directory must fail, so the gate passes vacuously.scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsQuickstart steps in /tmp/mo-qs via worktree CLI build: meta init, gen --list --probe, eject, gen, verify --codegen, verifyInvalid config via meta gen --dry-run (zod 4 paths)Fresh npm i @metaobjectsdev/cli@1.1.0 and npm audit (published, 3 high)Fresh install with worktree sdk/metadata tarballs via npm overrides and npm audit (0 vulns)dotnet build of server/csharp/MetaObjects.Cli; dotnet MetaObjects.Cli.dll verify --templates <missing> and bare verifybun test in server/typescript/packages/sdk (360 pass) and cli (1735 tests, 0 fail)gh api read-only check of repo description, homepage, topics, discussions🔧 Fix applied.
1 warning still open:
bun testin server/typescript exceeded 10 min and was killed; scoped ts-unit baseline passed.scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsFresh temp project:bun server/typescript/packages/cli/bin/meta.ts init, model in metaobjects/meta.shop.json,eject entity queries names barrel, wire 4 generators,gen(exit 0),verify --codegen(exit 0)Drift check: change model without regen ->verify --codegenexit 1 naming src/generated/Customer.ts;genthenverify --codegenexit 0Baremeta verifyin TS quickstart project exit 0C# CLI built to temp dir:verify --templates ./does-not-existexit 2 with 'templates directory not found'C# CLI: bareverifywith metadata but no prompts/ or templates/ -> exit 2 with templates-not-found messageC# CLI: bareverifywith prompts/ present -> exit 0--templates: OKdotnet test server/csharp/MetaObjects.Cli.Tests-> 305 passed, 0 failedBaselinescripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains(given, passed)bun testin server/typescript: exceeded 10 min, killed; no resultAGENTS.md:42- AGENTS.md still says latest is 1.0.13 and 1.1.0 is not released; both are now false. Human-owned agent memory file, so left unedited.CONTRIBUTING.md:28- Repo settings from D6/B5 (enable Discussions, set description, homepage https://metaobjects.dev, add topics) are GitHub settings, not doc edits. Not done in the doc phase.server/typescript/packages/codegen-ts/package.json:161- codegen-ts devDependency still pins zod ^3.23.0. Dev-only, so fresh-install audit is unaffected. Not a doc fact; left as is.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.