Skip to content

Conversation

@Schniz
Copy link
Collaborator

@Schniz Schniz commented Nov 23, 2025

A few unimplemented things or Postgres-specific quirks were fixed to make sure the e2e tests now pass (at least in Next.js)

  1. :linear-priority-urgent: Changed all JSONB columns to CBOR. The JSONB columns were kept as-is and used as a fallback on .get calls. The CBOR columns have the same name but with a _cbor suffix, and stored as bytea (blobs), allowing us to store nested binary structures and the null byte \x00 within a string.
  2. Hook metadata was not stored in the create function. Fixed.
  3. :linear-priority-urgent: getWorld and setWorld were setting a module instance variable. This is okay generally but the problem is that we will have 3 different module scopes due to our bundling strategy that doesn't treat @workflow/core as external:
    1. flow.js
    2. step.js
    3. the user module importing workflow/api or whatever that uses them
  4. adding @workflow/world-postgres to all workbench/* apps, otherwise starting them with that workflow world target will fail
  5. ever since a few weeks ago, we changed the initial step attempt to start with 0, instead of 1. This PR also implements that.

Every breaking change I had in the e2e tests was copied (in some form) to the @workflow/world-testing, which is a package that world authors can use to verify spec compliance. The more tests we have there, the better, as it allows our users to trust custom worlds and distribute their own ideas without being afraid of something breaking.

@Schniz Schniz self-assigned this Nov 23, 2025
@vercel
Copy link
Contributor

vercel bot commented Nov 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Nov 23, 2025 3:38pm
example-nextjs-workflow-webpack Ready Ready Preview Comment Nov 23, 2025 3:38pm
example-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-astro-workflow Error Error Nov 23, 2025 3:38pm
workbench-express-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-hono-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-nitro-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-nuxt-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-sveltekit-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workbench-vite-workflow Ready Ready Preview Comment Nov 23, 2025 3:38pm
workflow-docs Ready Ready Preview Comment Nov 23, 2025 3:38pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2025

⚠️ No Changeset found

Latest commit: c79a301

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Schniz Schniz force-pushed the schniz/fix-postgres-tests branch from 1ab3bf2 to 475eef6 Compare November 23, 2025 08:29
@vercel vercel bot temporarily deployed to Preview – workflow-docs November 23, 2025 08:29 Inactive
@vercel vercel bot temporarily deployed to Preview – workflow-docs November 23, 2025 10:28 Inactive
@Schniz Schniz force-pushed the schniz/fix-postgres-tests branch from 75ed5d9 to 61551fb Compare November 23, 2025 10:28
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
…obal and a symbol.

this makes sure that streamers can use in-memory event emitters and that it won't be compiled away into the different flow.js and step.js files.

this was figured out when i was adding a hooks tests to world-testing.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
we try to run them with the postgres world but it's not installed

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
…eleased. so initial attempt in postgres should reflect that.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
customType,
index,
integer,
/** @deprecated: use Cbor instead */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@pranaygp pranaygp merged commit 10ce313 into main Nov 23, 2025
47 of 57 checks passed
@pranaygp pranaygp deleted the schniz/fix-postgres-tests branch November 23, 2025 19:05
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.

3 participants