[PR #1727] [MERGED] fix(slurp2): start on zod 4 Engines without ZodEffects (0.4.3) #1711

Closed
opened 2026-10-27 06:06:04 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1727
Author: @Gunterlie
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @Gunterlie

Base: staging ← Head: fix/slurp2-zod4-feed-effects


📝 Commits (4)

  • dc33fe9 fix(slurp2): start on zod 4 Engines without ZodEffects (0.4.3)
  • 5ac8f08 merge: staging into fix/slurp2-zod4-feed-effects
  • 84bca25 test(slurp2): compare the plain creator request object in the vocabulary-shape regression
  • 194fdad style: prettier

📊 Changes

17 files changed (+272 additions, -268 deletions)

View changed files

➕ artifacts/slurp2-0.4.3.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/slurp2/CHANGELOG.md (+4 -0)
📝 packages/slurp2/client.js (+1 -1)
📝 packages/slurp2/manifest.json (+5 -5)
📝 packages/slurp2/server.mjs (+175 -175)
📝 packages/slurp2/src/engine/packages/client/src/slp/features/onboarding/slp-release.ts (+6 -1)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-post-routes.ts (+1 -6)
📝 packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-publishing-routes.ts (+6 -8)
📝 packages/slurp2/src/engine/packages/shared/src/slp/slp-social-generation.schema.ts (+25 -24)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/slurp2-vocabulary-shape.regression.ts (+6 -5)

📄 Description

Fixes #1726

Why this change

Users on current Engine builds (zod ^4.6.7) still cannot start Slurp after the 0.4.2 hotfix (#1721). Discord report:

TypeError: Right-hand side of 'instanceof' is not an object
    at .../slurp2-0.4.2-…/server.mjs:378:1013
Failed to activate capability package slurp2@0.4.2

Two module-level checks still did schema instanceof z.ZodEffects. Zod 4 has no ZodEffects, so the check throws while the module loads.

What changed

  • slp-feed-post-routes.ts: slpCreatorPostCreateWithMediaSchema is already a plain z.object, so extend it directly.
  • slp-social-generation.schema.ts: export the unrefined slpCreatorGenerationRequestObjectSchema; slpCreatorGenerationRequestSchema is now that object plus the same superRefine.
  • slp-feed-publishing-routes.ts: extend the object schema. Behavior matches the old zod 3 path (which unwrapped the refinement before .extend).
  • Slurp2 0.4.3: version, release note, CHANGELOG, rebuilt server.mjs/client.js/manifest, artifacts/slurp2-0.4.3.zip, catalogs.

Validation

  • Reproduced: importing the 0.4.2 server.mjs with Engine staging 15013e946 (zod 4.6.7) fails with the reported error; the 0.4.3 server.mjs loads and exports activate/selfCheck.
  • npm run check (eslint + prettier) passes.
  • slurp2-architecture, typecheck-packages slurp2, slurp2-manual-post-format, slurp2-vocabulary-shape, slurp2-release-notes, slurp2-step8-first-run, slurp2-simulation-tuning regressions pass.
  • test-catalog-lanes, validate-package-locales, validate-catalog, catalog-release-notes pass; git diff --check is clean.
  • Rebuild is deterministic (same server.mjs and ZIP hashes on a second build).

Manual verification

  • Update Slurp from 0.4.0/0.4.2 to 0.4.3 on a current Engine and confirm it activates without the instanceof error
  • Create a manual post and a Creator-generated post in Slurp

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1727 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `fix/slurp2-zod4-feed-effects` --- ### 📝 Commits (4) - [`dc33fe9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dc33fe90f8a71e13bc311b0b8c456df7a7d2a8d2) fix(slurp2): start on zod 4 Engines without ZodEffects (0.4.3) - [`5ac8f08`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5ac8f080e0cf5c3bd1fbb5afef221e20cb950bfe) merge: staging into fix/slurp2-zod4-feed-effects - [`84bca25`](https://github.com/Pasta-Devs/Marinara-Agents/commit/84bca2501ee66cbf967e6d1b91abd16a07905672) test(slurp2): compare the plain creator request object in the vocabulary-shape regression - [`194fdad`](https://github.com/Pasta-Devs/Marinara-Agents/commit/194fdad75682e0b8748562b31c7cfa1209439b6d) style: prettier ### 📊 Changes **17 files changed** (+272 additions, -268 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/slurp2-0.4.3.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/slurp2/CHANGELOG.md` (+4 -0) 📝 `packages/slurp2/client.js` (+1 -1) 📝 `packages/slurp2/manifest.json` (+5 -5) 📝 `packages/slurp2/server.mjs` (+175 -175) 📝 `packages/slurp2/src/engine/packages/client/src/slp/features/onboarding/slp-release.ts` (+6 -1) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-post-routes.ts` (+1 -6) 📝 `packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-feed-publishing-routes.ts` (+6 -8) 📝 `packages/slurp2/src/engine/packages/shared/src/slp/slp-social-generation.schema.ts` (+25 -24) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/slurp2-vocabulary-shape.regression.ts` (+6 -5) </details> ### 📄 Description Fixes #1726 ## Why this change Users on current Engine builds (`zod ^4.6.7`) still cannot start Slurp after the 0.4.2 hotfix (#1721). Discord report: ``` TypeError: Right-hand side of 'instanceof' is not an object at .../slurp2-0.4.2-…/server.mjs:378:1013 Failed to activate capability package slurp2@0.4.2 ``` Two module-level checks still did `schema instanceof z.ZodEffects`. Zod 4 has no `ZodEffects`, so the check throws while the module loads. ## What changed - `slp-feed-post-routes.ts`: `slpCreatorPostCreateWithMediaSchema` is already a plain `z.object`, so extend it directly. - `slp-social-generation.schema.ts`: export the unrefined `slpCreatorGenerationRequestObjectSchema`; `slpCreatorGenerationRequestSchema` is now that object plus the same `superRefine`. - `slp-feed-publishing-routes.ts`: extend the object schema. Behavior matches the old zod 3 path (which unwrapped the refinement before `.extend`). - Slurp2 0.4.3: version, release note, CHANGELOG, rebuilt `server.mjs`/`client.js`/manifest, `artifacts/slurp2-0.4.3.zip`, catalogs. ## Validation - Reproduced: importing the 0.4.2 `server.mjs` with Engine staging `15013e946` (zod 4.6.7) fails with the reported error; the 0.4.3 `server.mjs` loads and exports `activate`/`selfCheck`. - `npm run check` (eslint + prettier) passes. - `slurp2-architecture`, `typecheck-packages slurp2`, `slurp2-manual-post-format`, `slurp2-vocabulary-shape`, `slurp2-release-notes`, `slurp2-step8-first-run`, `slurp2-simulation-tuning` regressions pass. - `test-catalog-lanes`, `validate-package-locales`, `validate-catalog`, `catalog-release-notes` pass; `git diff --check` is clean. - Rebuild is deterministic (same `server.mjs` and ZIP hashes on a second build). ## Manual verification - [ ] Update Slurp from 0.4.0/0.4.2 to 0.4.3 on a current Engine and confirm it activates without the `instanceof` error - [ ] Create a manual post and a Creator-generated post in Slurp --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 06:06:04 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1711
No description provided.