Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Nov 30, 2025

Add Flow Shape Comparison Utilities

This PR adds two new PostgreSQL functions to support flow shape validation:

  1. pgflow._get_flow_shape(p_flow_slug text): Retrieves a flow's structure from the database as JSONB, matching the TypeScript FlowShape interface with steps, their types, and dependencies.

  2. pgflow._compare_flow_shapes(p_local jsonb, p_db jsonb): Compares two flow shapes and returns an array of difference descriptions, mirroring the TypeScript compareFlowShapes() function logic.

The implementation includes comprehensive tests for both functions covering:

  • Basic shape retrieval
  • Map step type handling
  • Multiple dependencies (sorted alphabetically)
  • Nonexistent flow handling
  • Matching shapes comparison
  • Detecting differences in step count, slugs, types, and dependencies

These functions will enable validation of flow structures between client and server representations.

@changeset-bot
Copy link

changeset-bot bot commented Nov 30, 2025

⚠️ No Changeset found

Latest commit: 9adebe8

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

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Contributor Author

jumski commented Nov 30, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link

nx-cloud bot commented Nov 30, 2025

View your CI Pipeline Execution ↗ for commit 9adebe8

Command Status Duration Result
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 3s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 25s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 3m 49s View ↗
nx run edge-worker:e2e ✅ Succeeded 2m 53s View ↗
nx run cli:e2e ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-30 14:56:52 UTC

@jumski jumski force-pushed the 11-30-feat_core_add_shape_extraction_and_comparison_functions branch from b1eb033 to 9adebe8 Compare November 30, 2025 14:47
@jumski jumski force-pushed the 11-29-worker_statup_compilation branch from 44fa645 to 19fbfb4 Compare November 30, 2025 14:47
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-464.pgflow.pages.dev

📝 Details:

  • Branch: 11-30-feat_core_add_shape_extraction_and_comparison_functions
  • Commit: 43dc9b7aad061fdc43acead08d6bc10231848547
  • View Logs

_Last updated: _

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.

2 participants