fix(api): scope block flow startup validation - #1300
Conversation
✅ Deploy Preview for vrtx-dashboard canceled.
|
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Scopes API startup compatibility validation to the configured block-flow variant and resumable state.
Changes:
- Shares the 15-minute ramp start deadline.
- Filters startup checks by flow variant and resumability.
- Rejects cross-flow ramp-to-quote references.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
constants.ts |
Exposes the ramp start deadline. |
ramp.service.ts |
Uses the shared deadline constant. |
register-handlers.ts |
Applies scoped validation and cross-flow checks. |
compatibility-scope.ts |
Defines quote and ramp compatibility filters. |
compatibility-scope.test.ts |
Tests generated compatibility scopes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| resumableRampWhere: { | ||
| flowVariant, | ||
| [Op.or]: [ | ||
| { currentPhase: { [Op.notIn]: [...TERMINAL_RAMP_PHASES, "initial"] } }, | ||
| { createdAt: { [Op.gte]: initialRampCutoff }, currentPhase: "initial" } |
There was a problem hiding this comment.
Addressed in d7afa34. The recovery invariant, threat mitigation, and deployment checklist now describe the per-flow-variant scope: unexpired pending quotes, all non-initial nonterminal ramps, and initial ramps only within the start deadline.
| { currentPhase: { [Op.notIn]: [...TERMINAL_RAMP_PHASES, "initial"] } }, | ||
| { createdAt: { [Op.gte]: initialRampCutoff }, currentPhase: "initial" } |
There was a problem hiding this comment.
Addressed in d7afa34. updateRamp and startRamp now share the same deadline guard, and updateRamp checks it before validating or persisting signatures and before invoking startPersistedFlow. The HTTP regression test verifies a 400 response and that the expired ramp remains initial with no persisted signatures.
Summary
Staging verification
Tests