Skip to content

feat: add constraints for input patterns and improve cascade skip tests#611

Merged
jumski merged 1 commit intomainfrom
02-16-test_core_cascade_skip
Mar 17, 2026
Merged

feat: add constraints for input patterns and improve cascade skip tests#611
jumski merged 1 commit intomainfrom
02-16-test_core_cascade_skip

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Feb 16, 2026

Add constraints and improve cascade skip functionality

This PR adds database constraints to ensure required_input_pattern and forbidden_input_pattern are always JSON objects, preventing invalid pattern types. It also enhances the _cascade_force_skip_steps function to:

  1. Return the count of skipped steps
  2. Make the function idempotent (safe to call multiple times)
  3. Improve event ordering tests with a more reliable trigger-based approach

The changes include:

  • Added CHECK constraints to the steps table to validate pattern types
  • Made _cascade_force_skip_steps return the number of steps skipped
  • Added a new test for idempotent behavior of _cascade_force_skip_steps
  • Improved event ordering tests to use a trigger-based approach instead of timestamp ordering
  • Added tests to verify rejection of invalid pattern types (arrays, strings)
  • Enhanced flow shape comparison tests to detect pattern differences

These changes improve data integrity and make the cascade skip functionality more robust and predictable.

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

⚠️ No Changeset found

Latest commit: 0090533

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

@nx-cloud
Copy link

nx-cloud bot commented Feb 16, 2026

View your CI Pipeline Execution ↗ for commit 0090533

Command Status Duration Result
nx test:types:health dsl ✅ Succeeded 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-17 19:38:58 UTC

@jumski jumski force-pushed the 02-16-test_core_cascade_skip branch from 565b7a8 to a0602c5 Compare February 16, 2026 12:15
@jumski jumski force-pushed the 02-16-test_core_cascade_skip branch 2 times, most recently from 4adfb3e to 8ef7352 Compare February 19, 2026 08:14
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

  • Branch: 02-16-test_core_cascade_skip
  • Commit: 4d85d95175c28d9bcef0ca39392bd6e97f7d17bd
  • View Logs

_Last updated: _

Copy link
Contributor Author

jumski commented Mar 17, 2026

Merge activity

  • Mar 17, 7:20 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 17, 7:38 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 17, 7:38 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski changed the base branch from 02-14-fix_missing_skip_archival to graphite-base/611 March 17, 2026 19:35
@jumski jumski changed the base branch from graphite-base/611 to main March 17, 2026 19:36
@jumski jumski force-pushed the 02-16-test_core_cascade_skip branch from 8ef7352 to 0090533 Compare March 17, 2026 19:37
@jumski jumski merged commit 6690fa5 into main Mar 17, 2026
13 checks passed
@github-actions
Copy link
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 6690fa58d7f1d1970cae1ce21f8e9a2fa0d535b9
  • View Logs

Deployed at: 2026-03-17T20:38:26+01:00

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