Add comprehensive test suite for transition scheduling#662
Draft
scazan wants to merge 6 commits intotransition-scheduling-corefrom
Draft
Add comprehensive test suite for transition scheduling#662scazan wants to merge 6 commits intotransition-scheduling-corefrom
scazan wants to merge 6 commits intotransition-scheduling-corefrom
Conversation
Move ProcessPhase type from scattered UI component definitions to a single export from the encoder. Replace legacy processSchemaEncoder with a phase-based format that uses passthrough for flexibility.
Implement date-based transition creation, update, and processing for decision process phases. Key changes: - Rewrite createTransitionsForProcess with date-based advancement filtering - Rewrite updateTransitionsForProcess with parallel operations - Refactor transitionMonitor for batch processing and deferred state updates - Move transition creation to publish time instead of instance creation - Add ScheduledTransition type and new exports
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Transitions are no longer created on instance creation (DRAFT status). They are created when the instance is published.
a372b25 to
fcc3152
Compare
Use v2 relational query API in createInstanceFromTemplate and updateDecisionInstance. transitionEngine and transitionMonitor remain on db._query as their relations are not yet in v2.
fcc3152 to
8dbca60
Compare
Instance data phases always contain rules (copied from template at creation time), so the extra process schema fetch is unnecessary. Removes the schema lookup and reads advancement rules directly from instanceData.phases[].rules.
Add 23 integration tests covering transition processing including: - Phase transition creation and updates - Batch processing and concurrent execution - Edge cases for date-based advancement - Test helper infrastructure for decisions data management
8dbca60 to
7035e23
Compare
3d4417d to
fb1de90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
processTransitions.test.ts(2,020 lines)TestDecisionsDataManagerfor test setupcreateInstanceFromTemplate.test.tsfor new transition behaviorpackages/common/src/test/setup.tsPart 3 of 3 in the transition scheduling logic stack:
encoder-type-consolidation(Consolidate ProcessPhase type and modernize process schema encoder #660) — Encoder/UI type consolidationtransition-scheduling-core(Add transition scheduling logic for phase-based advancement #661) — Core scheduling logicTest plan
pnpm typecheckpassespnpm format:checkpassespnpm w:api test -- --run src/routers/decision/transitions/processTransitions.test.ts