Skip to content

Swap 5222 user office experiment workflow improvement#1391

Open
yoganandaness wants to merge 32 commits into
SWAP-4949-workflow-overhaulfrom
SWAP-5222-user-office-experiment-workflow-improvement
Open

Swap 5222 user office experiment workflow improvement#1391
yoganandaness wants to merge 32 commits into
SWAP-4949-workflow-overhaulfrom
SWAP-5222-user-office-experiment-workflow-improvement

Conversation

@yoganandaness
Copy link
Copy Markdown
Contributor

This pull request introduces a major overhaul of the workflow data structures and migrates existing workflow data to the new schema. The changes are focused on improving workflow management, enabling more flexible graph-based workflows, and ensuring data integrity during migration. The update includes new tables, foreign key relationships, triggers, and migration scripts to transition all relevant data and references.

Schema redesign for workflow management:

  • Added new tables: workflow_has_statuses, workflow_status_connections, workflow_status_connection_has_workflow_status_changing_events, and workflow_status_connection_has_workflow_status_actions to support graph-based workflows, status transitions, and associated events/actions.
  • Updated the workflows table to include an updated_at timestamp, and renamed status_actions to workflow_status_actions for clarity.

Migration and data integrity:

  • Created comprehensive migration logic to transfer existing workflow nodes, edges, actions, and events to the new tables, with checks for unmapped data and warnings for any migration issues.
  • Updated references in proposals and experiment_safety tables to link to the new workflow graph, and added triggers to keep status_id in sync with the new workflow_status_id. [1] [2]

Cleanup and deprecation:

  • Removed deprecated tables and sequences related to the old workflow system, such as workflow_connections, workflow_connection_has_actions, and status_changing_events, after successful migration.

Event and action handling changes:

  • Events are now stored as strings in application code instead of a dedicated catalog table, simplifying event management and reducing schema complexity.

Referential integrity and constraints:

  • Enforced new foreign key and unique constraints to ensure all workflow transitions and actions/events are valid and prevent duplication or orphaned records. [1] [2]

Description

Motivation and Context

How Has This Been Tested

Fixes

Changes

Depends on

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@yoganandaness yoganandaness requested a review from a team as a code owner March 2, 2026 08:24
@yoganandaness yoganandaness requested review from ACLay and removed request for a team March 2, 2026 08:24
@yoganandaness yoganandaness changed the base branch from develop to SWAP-4949-workflow-overhaul March 2, 2026 08:25
@yoganandaness yoganandaness removed the request for review from ACLay March 2, 2026 15:43
yoganandaness and others added 23 commits April 1, 2026 08:27
…ect/user-office-core into SWAP-5222-user-office-experiment-workflow-improvement
…oject/user-office-core into SWAP-5222-user-office-experiment-workflow-improvement
Bumps [graphql-request](https://github.com/graffle-js/graffle) from 6.1.0 to 7.4.0.
- [Release notes](https://github.com/graffle-js/graffle/releases)
- [Commits](graffle-js/graffle@6.1.0...7.4.0)

---
updated-dependencies:
- dependency-name: graphql-request
  dependency-version: 7.4.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [string-strip-html](https://github.com/codsen/codsen/tree/HEAD/packages/string-strip-html) from 8.5.0 to 13.5.3.
- [Changelog](https://github.com/codsen/codsen/blob/string-strip-html@13.5.3/packages/string-strip-html/CHANGELOG.md)
- [Commits](https://github.com/codsen/codsen/commits/string-strip-html@13.5.3/packages/string-strip-html)

---
updated-dependencies:
- dependency-name: string-strip-html
  dependency-version: 13.5.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <copilot@github.com>
- Removed dependency on 'string-strip-html' from package.json.
- Implemented a custom stripHtml function in utils to handle HTML stripping.
- Updated all relevant files to use the new stripHtml function.
- Added unit tests for the stripHtml function to ensure expected behavior.
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.6 to 8.5.12.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.6...8.5.12)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
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