Skip to content

chore(deps): upgrade MetaObjects to 1.3.0 - #54

Merged
dmealing merged 1 commit into
mainfrom
fm/woo-mo-130-upgrade
Dec 2, 2026
Merged

dmealing merged 1 commit into
mainfrom
fm/woo-mo-130-upgrade

Conversation

@dmealing

@dmealing dmealing commented Dec 2, 2026

Copy link
Copy Markdown
Member

Intent

"do a big burst to get everyone running on 1.3.0 for metaobjects" - upgrade Wizards of Odd from MetaObjects 1.2.0 to 1.3.0 (the @metaobjectsdev sdk, runtime-ts, render and metadata packages). MetaObjects 1.3.0 is released on npm; its release notes and migration steps are at https://github.com/metaobjectsdev/metaobjects/releases/tag/v1.3.0 and in the CHANGELOG [1.3.0] section.

What Changed

  • Bump @metaobjectsdev/{cli,codegen-ts,render,runtime-ts,sdk,metadata} from 1.2.0 to 1.3.0 in package.json and package-lock.json. Drop the now-unneeded ts-poet devDependency. Update the version mentions in CLAUDE.md and README.md.
  • Port the owned generators to the 1.3 codegen API. codegen/generators/composition-loaders.ts now writes through TsWriter, writeDbType and writeFindByIdFn in place of the code/imp templates, dbTypeBlock and renderFindByIdFn. src/codegen/lineage-mappers-generator.ts no longer calls formatTs. Regenerate everything under src/db/generated/ and src/render/generated/prompts.ts.
  • Refresh the shipped agent context with meta init --refresh-docs: the .claude/skills/metaobjects-* skills and references (new requirements, semantic-modelling, adopting-existing-models, typescript-providers and upgrading pages), .metaobjects/AGENTS.md and .agent-context.json. .metaobjects/CLAUDE.md moves to the metaobjects-codegen skill's references/principles.md. The codegen manifest .metaobjects/.gen-state/.hashes.json becomes per-package files under .hashes/, and .gitignore is updated to match.

Risk Assessment

✅ Low: The change is a mechanical upgrade from MetaObjects 1.2.0 to 1.3.0 that matches the stated intent: every @metaobjectsdev package is pinned to 1.3.0 in package.json and package-lock.json, and the two owned generators are ported cleanly off the removed formatTs, ts-poet and renderFindByIdFn APIs. The generated diffs are layout-only except for two upstream changes, and neither affects runtime behaviour here: (1) the prompt renderers now pass a verify field tree, and the snapshot tests cover it; (2) the primary-key columns are dropped from the Council and CouncilTurn update schemas, and no hand-written code uses those schemas. The manifest move to .hashes/ and the .gitignore change are consistent: the 38 tracked generated src files are all in the manifest, and the fingerprint file stays ignored.

Testing

Under 1.3.0, npm ci, the drift gate, regeneration (no diff), and the full npm run check all pass. The wrangler dev Worker was driven live with a dummy Anthropic key. Council POST streamed council, error, verdict and done SSE frames and persisted the turn to local D1. The persisted council then rendered through the share JSON and SSR HTML routes, and the guards returned 429, 400 and 404 as expected. The LLM call itself was not exercised, because there is no real Anthropic key. The error path proves the generated tool-call and prompt plumbing loads and the frame encoders work. No visual artifacts were captured because the change has no UI changes. The Worker and scratch state were removed, and build output in public/ was reverted.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Dependencies resolve to MetaObjects 1.3.0 after clean npm ci ✅ pass live node_modules/@metaobjectsdev/*/package.json all report version 1.3.0 (cli, codegen-ts, render, runtime-ts, sdk, metadata)
Drift gate (meta verify --templates --codegen --prompts) is green and meta gen reproduces committed generated code ✅ pass live drift.log, gen.log; demo:drift exit 0; gen:db exit 0 with a clean git status afterwards
Local Worker (wrangler dev, dummy Anthropic key, Turnstile bypass secret) serves POST /api/council as SSE and persists the council ✅ pass live council-sse.txt shows council, error, verdict and done frames with a generated slug
Persisted council renders at /c/:slug.json and /c/:slug HTML ✅ pass live share.json contains the public SharedCouncil and SharedTurn fields only, with no visitorId, councilId or ordinal. share.html returned 200 and contains the Lorekeeper turn.
Adversarial guards: missing Turnstile token returns 429, empty question returns 400, malformed slug and unknown slug return 404 ✅ pass live curl status codes: noToken:429, empty:400, badslug:404, missing:404
Full regression npm run check (drift, verify, verify:db, tsc -b, vitest) ✅ pass live check.log exit 0; 37 test files and 233 tests passed
Evidence: drift gate log
npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> demo:drift
> meta verify --templates --codegen --prompts data/templates

meta: meta verify — 22 template(s) clean.
meta: meta verify — docs/generated: the repository git-ignores every documentation page generated there, so they were not compared.
meta: meta verify — every file's generated contribution is current (no codegen drift).
meta: meta verify — not run: schema (--db <url>), deps (--deps), replay (--replay)
verify[6]{gate,ran,ok}:
  templates,true,true
  schema,false,true
  codegen,true,true
  deps,false,true
  requirements,true,true
  replay,false,true
exitCode: 0
summary: "3 gate(s) ran, all clean"
help[1]: no drift and nothing advisory to answer — nothing to do
antiPatterns:
  status: ran
  total: 0
  rows: []
requirements:
  status: ran
  total: 0
  rows: []
overlays:
  status: ran
  total: 0
  rows: []
names:
  status: ran
  total: 0
  rows: []
deprecations:
  status: ran
  total: 0
  rows: []
fields:
  status: ran
  total: 0
  rows: []
notRepresented[2]: "per-gate drift detail for every gate but schema (which template variable drifted, which generated file differs, which migration failed to replay) — printed as text on stderr; this payload carries each gate's pass/fail verdict, and the schema gate's differences in schemaDrift",the loader's own warnings and the agent-context/manifest advisories — printed as text on stderr
Evidence: full npm run check log
npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> check
> npm run demo:drift && npm run verify && npm run verify:db && tsc -b && vitest run

npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> demo:drift
> meta verify --templates --codegen --prompts data/templates

meta: meta verify — 22 template(s) clean.
meta: meta verify — nothing changed since the last `meta gen`, and all 47 generated file(s) match their record (no codegen drift; --full renders and compares).
meta: meta verify — not run: schema (--db <url>), deps (--deps), replay (--replay)
verify[6]{gate,ran,ok}:
  templates,true,true
  schema,false,true
  codegen,true,true
  deps,false,true
  requirements,true,true
  replay,false,true
exitCode: 0
summary: "3 gate(s) ran, all clean"
help[1]: no drift and nothing advisory to answer — nothing to do
antiPatterns:
  status: ran
  total: 0
  rows: []
requirements:
  status: ran
  total: 0
  rows: []
overlays:
  status: ran
  total: 0
  rows: []
names:
  status: ran
  total: 0
  rows: []
deprecations:
  status: ran
  total: 0
  rows: []
fields:
  status: ran
  total: 0
  rows: []
notRepresented[2]: "per-gate drift detail for every gate but schema (which template variable drifted, which generated file differs, which migration failed to replay) — printed as text on stderr; this payload carries each gate's pass/fail verdict, and the schema gate's differences in schemaDrift",the loader's own warnings and the agent-context/manifest advisories — printed as text on stderr
npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> verify
> npm run verify:portraits

npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> verify:portraits
> tsx scripts/verify-portraits.ts

verify-portraits OK: 10 wizards × portraits matched
npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> verify:db
> npm run db:migrate:local && meta verify --dialect d1 --d1 DB

npm warn Unknown env config "store-dir". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.

> db:migrate:local
> wrangler d1 migrations apply wizardsofodd --local


 ⛅️ wrangler 4.127.0 (update available 4.170.0)
───────────────────────────────────────────────
Resource location: local 

Use --remote if you want to access the remote instance.

Migrations to be applied:
┌──────────────────────────────────────┐
│ name                                 │
├──────────────────────────────────────┤
│ 0001_init.sql                        │
├──────────────────────────────────────┤
│ 0002_structured_outputs.sql          │
├──────────────────────────────────────┤
│ 0003_verdict_agree_split.sql         │
├──────────────────────────────────────┤
│ 0004_followup_rounds.sql             │
├──────────────────────────────────────┤
│ 0005_drop_dead_followups.sql         │
├──────────────────────────────────────┤
│ 0006_reconcile-schema.sql            │
├──────────────────────────────────────┤
│ 0007_link-verdict-and-council-id.sql │
└──────────────────────────────────────┘
? About to apply 7 migration(s)
Your database may not be available to serve requests during the migration, continue?
🤖 Using fallback value in non-interactive context: yes
🌀 Executing on local database wizardsofodd (37b76295-e8f3-40af-bd2c-049264101eb1) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.
🚣 3 commands executed successfully.
┌──────────────────────────────────────┬────────┐
│ name                                 │ status │
├──────────────────────────────────────┼────────┤
│ 0001_init.sql                        │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0002_structured_outputs.sql          │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0003_verdict_agree_split.sql         │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0004_followup_rounds.sql             │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0005_drop_dead_followups.sql         │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0006_reconcile-schema.sql            │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0007_link-verdict-and-council-id.sql │ 🕒️    │
└──────────────────────────────────────┴────────┘
🌀 Executing on local database wizardsofodd (37b76295-e8f3-40af-bd2c-049264101eb1) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.
🚣 14 commands executed successfully.
┌──────────────────────────────────────┬────────┐
│ name                                 │ status │
├──────────────────────────────────────┼────────┤
│ 0001_init.sql                        │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0002_structured_outputs.sql          │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0003_verdict_agree_split.sql         │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0004_followup_rounds.sql             │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0005_drop_dead_followups.sql         │ 🕒️    │
├──────────────────────────────────────┼────────

... [3820 bytes truncated] ...

──────┼────────┤
│ 0005_drop_dead_followups.sql         │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0006_reconcile-schema.sql            │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0007_link-verdict-and-council-id.sql │ 🕒️    │
└──────────────────────────────────────┴────────┘
🌀 Executing on local database wizardsofodd (37b76295-e8f3-40af-bd2c-049264101eb1) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.
🚣 2 commands executed successfully.
┌──────────────────────────────────────┬────────┐
│ name                                 │ status │
├──────────────────────────────────────┼────────┤
│ 0001_init.sql                        │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0002_structured_outputs.sql          │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0003_verdict_agree_split.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0004_followup_rounds.sql             │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0005_drop_dead_followups.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0006_reconcile-schema.sql            │ 🕒️    │
├──────────────────────────────────────┼────────┤
│ 0007_link-verdict-and-council-id.sql │ 🕒️    │
└──────────────────────────────────────┴────────┘
🌀 Executing on local database wizardsofodd (37b76295-e8f3-40af-bd2c-049264101eb1) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.
🚣 15 commands executed successfully.
┌──────────────────────────────────────┬────────┐
│ name                                 │ status │
├──────────────────────────────────────┼────────┤
│ 0001_init.sql                        │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0002_structured_outputs.sql          │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0003_verdict_agree_split.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0004_followup_rounds.sql             │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0005_drop_dead_followups.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0006_reconcile-schema.sql            │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0007_link-verdict-and-council-id.sql │ 🕒️    │
└──────────────────────────────────────┴────────┘
🌀 Executing on local database wizardsofodd (37b76295-e8f3-40af-bd2c-049264101eb1) from .wrangler/state/v3/d1:
🌀 To execute on your remote database, add a --remote flag to your wrangler command.
🚣 10 commands executed successfully.
┌──────────────────────────────────────┬────────┐
│ name                                 │ status │
├──────────────────────────────────────┼────────┤
│ 0001_init.sql                        │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0002_structured_outputs.sql          │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0003_verdict_agree_split.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0004_followup_rounds.sql             │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0005_drop_dead_followups.sql         │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0006_reconcile-schema.sql            │ ✅     │
├──────────────────────────────────────┼────────┤
│ 0007_link-verdict-and-council-id.sql │ ✅     │
└──────────────────────────────────────┴────────┘
meta: meta verify — schema in sync with d1:DB (local).
meta: meta verify — not run: templates (--templates), codegen (--codegen), deps (--deps), replay (--replay)
verify[6]{gate,ran,ok}:
  templates,false,true
  schema,true,true
  codegen,false,true
  deps,false,true
  requirements,true,true
  replay,false,true
exitCode: 0
summary: "2 gate(s) ran, all clean"
help[1]: no drift and nothing advisory to answer — nothing to do
antiPatterns:
  status: ran
  total: 0
  rows: []
requirements:
  status: ran
  total: 0
  rows: []
overlays:
  status: ran
  total: 0
  rows: []
names:
  status: ran
  total: 0
  rows: []
deprecations:
  status: ran
  total: 0
  rows: []
fields:
  status: ran
  total: 0
  rows: []
schemaDrift:
  changes: []
  findings: []
notRepresented[2]: "per-gate drift detail for every gate but schema (which template variable drifted, which generated file differs, which migration failed to replay) — printed as text on stderr; this payload carries each gate's pass/fail verdict, and the schema gate's differences in schemaDrift",the loader's own warnings and the agent-context/manifest advisories — printed as text on stderr

 RUN  v4.1.11 {run-worktree}


 Test Files  37 passed (37)
      Tests  233 passed (233)
   Start at  08:42:50
   Duration  12.51s (transform 46.80s, setup 115.58s, import 33.10s, tests 21.28s, environment 8.73s)
Evidence: live council SSE transcript
event: council
data: {"id":"HjVc9DuE"}

event: error
data: {"wizardId":"lorekeeper","wizardName":"The Lorekeeper of Footnotes","reason":"The Lorekeeper is lost in thought and does not answer."}

event: verdict
data: {"verdict":{"stance":"unanswerable","confidence":0,"takeMarkdown":"No wizard was able to answer this time, so the Guild has no verdict to offer. Please try again in a moment.","dissents":[],"evidenceQuality":"none","agreements":[],"splits":[],"verifyNote":""}}

event: done
data: {"ok":true}
Evidence: persisted share JSON
{"council":{"id":"HjVc9DuE","question":"Should I upgrade?","status":"complete","verdictStance":"unanswerable","verdictConfidence":0,"verdictMarkdown":"No wizard was able to answer this time, so the Guild has no verdict to offer. Please try again in a moment.","verdictEvidenceQuality":"none","dissents":[],"verdictAgreements":[],"verdictSplits":[],"verdictVerifyNote":"","createdAt":1796219014656,"completedAt":1796219014724},"turns":[{"wizardId":"lorekeeper","wizardName":"The Lorekeeper of Footnotes","kind":"error","stance":"abstains","takeMarkdown":"The Lorekeeper is lost in thought and does not answer.","oneLineSummary":"The Lorekeeper is lost in thought and does not answer.","confidence":0,"keyClaims":[],"citations":null}]}
Evidence: SSR share page HTML
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>The Wizards of Odd weigh in on: Should I upgrade?</title>
    <meta name="robots" content="noindex" />
    <link rel="stylesheet" href="/styles.css" />
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" />
    <meta property="og:title" content="The Wizards of Odd weigh in on: Should I upgrade?" />
    <meta property="og:description" content="No wizard was able to answer this time, so the Guild has no verdict to offer. Please try again in a moment." />
    <meta property="og:image" content="/portraits/verdict-seal.webp" />
    <meta property="og:type" content="article" />
  </head>
  <body>
    <div id="root"><main class="homepage share-page"><header class="masthead"><h1>The Wizards of Odd</h1></header><section class="question-block"><h2>The question</h2><blockquote>Should I upgrade?</blockquote></section><section class="council"><article class="card card-error" aria-label="The Lorekeeper of Footnotes error"><img class="portrait" src="/portraits/lorekeeper.webp" alt=""/><div class="body"><header><h2>The Lorekeeper of Footnotes</h2><span class="stance stance-error">unable</span></header><p class="reason">The Lorekeeper is lost in thought and does not answer.</p></div></article><article class="card card-verdict" aria-label="Verdict of the Guild"><img class="portrait" src="/portraits/verdict-seal.webp" alt=""/><div class="body"><header><h2>Verdict of the Guild</h2><span class="stance stance-unanswerable">Unanswerable</span><span class="confidence" title="confidence 0">0<!-- -->%</span><span class="evidence evidence-none">evidence: <!-- -->none</span></header><div class="take">No wizard was able to answer this time, so the Guild has no verdict to offer. Please try again in a moment.</div></div></article></section></main></div>
  </body>
</html>

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Dependencies resolve to MetaObjects 1.3.0 after clean npm ci ✅ pass live node_modules/@metaobjectsdev/*/package.json all report version 1.3.0 (cli, codegen-ts, render, runtime-ts, sdk, metadata)
Drift gate (meta verify --templates --codegen --prompts) is green and meta gen reproduces committed generated code ✅ pass live drift.log, gen.log; demo:drift exit 0; gen:db exit 0 with a clean git status afterwards
Local Worker (wrangler dev, dummy Anthropic key, Turnstile bypass secret) serves POST /api/council as SSE and persists the council ✅ pass live council-sse.txt shows council, error, verdict and done frames with a generated slug
Persisted council renders at /c/:slug.json and /c/:slug HTML ✅ pass live share.json contains the public SharedCouncil and SharedTurn fields only, with no visitorId, councilId or ordinal. share.html returned 200 and contains the Lorekeeper turn.
Adversarial guards: missing Turnstile token returns 429, empty question returns 400, malformed slug and unknown slug return 404 ✅ pass live curl status codes: noToken:429, empty:400, badslug:404, missing:404
Full regression npm run check (drift, verify, verify:db, tsc -b, vitest) ✅ pass live check.log exit 0; 37 test files and 233 tests passed
  • npm ci (all @metaobjectsdev/* packages resolve to 1.3.0)
  • npm run demo:drift (meta verify --templates --codegen --prompts): exit 0
  • npm run gen:db then git status: clean, so regeneration under 1.3.0 matches the committed output
  • npm run check (drift, verify:portraits, verify:db local D1 migrate and meta verify, tsc -b, vitest run): exit 0, 37 files and 233 tests passed
  • npm run build:web, then wrangler dev on a scratch-persisted local D1/KV with a dummy Anthropic key and the Turnstile bypass secret
  • Live POST /api/council, GET /c/:slug.json, GET /c/:slug, bad-input and 404 cases against that Worker
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Bump every @metaobjectsdev package (cli, codegen-ts, render, runtime-ts,
sdk, metadata) from 1.2.0 to 1.3.0 and regenerate with the 1.3.0 CLI,
following the 1.3.0 "Upgrading from 1.2.0" notes:

- Port the owned composition-loaders generator off the removed ts-poet
  printer, formatTs and renderFindByIdFn onto TsWriter, writeDbType and
  writeFindByIdFn. lineage-mappers drops the removed formatTs.
- Drop the now-unused ts-poet devDependency.
- The hash manifest is now one file per package under
  .metaobjects/.gen-state/.hashes/; .gitignore un-ignores that directory
  instead of .hashes.json and keeps the new fingerprint file ignored.
- TypeScript generation runs no formatter, so the generated tree changes
  layout once; the prompt render helpers now pass the payload field tree
  so an unknown template variable raises at render time.
- Refresh the agent context (meta init --docs-only --refresh-docs), which
  retires .metaobjects/CLAUDE.md; update the version and manifest path in
  CLAUDE.md and README.md.

npm run check (drift gate, verify:db, tsc, 233 tests) and build:web pass.
@dmealing
dmealing merged commit 77ccdf4 into main Dec 2, 2026
2 checks passed
@dmealing
dmealing deleted the fm/woo-mo-130-upgrade branch December 2, 2026 13:48
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