Skip to content

fix(api): scope block flow startup validation - #1300

Merged
ebma merged 2 commits into
stagingfrom
codex/fix-block-flow-startup-guard
Jul 31, 2026
Merged

fix(api): scope block flow startup validation#1300
ebma merged 2 commits into
stagingfrom
codex/fix-block-flow-startup-guard

Conversation

@ebma

@ebma ebma commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • scope startup compatibility checks to the configured flow variant
  • validate initial ramps only during the same 15-minute window enforced by updateRamp and startRamp
  • reject expired initial ramp updates before signatures are persisted or persisted-flow lifecycle hooks can create provider operations
  • keep every running non-terminal ramp for the current flow fail-closed
  • reject cross-flow ramp and quote references
  • align the block-flow security specification with the runtime recovery scope

Staging verification

  • current Mykobo selection: 2 pending quotes, both resolve to EurOnrampBaseSameChain version 1
  • current Mykobo resumable ramps: 0
  • no staging rows changed during verification

Tests

  • API: 909 passed, 38 skipped, 0 failed
  • focused quote-consumption HTTP invariants: 11 passed, 0 failed
  • TypeScript typecheck and Biome checks passed

@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for vrtx-dashboard canceled.

Name Link
🔨 Latest commit d7afa34
🔍 Latest deploy log https://app.netlify.com/projects/vrtx-dashboard/deploys/6a6cba675fb80e0008ea974f

@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for vortex-sandbox ready!

Name Link
🔨 Latest commit d7afa34
🔍 Latest deploy log https://app.netlify.com/projects/vortex-sandbox/deploys/6a6cba67a897f5000848b173
😎 Deploy Preview https://deploy-preview-1300--vortex-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for vortexfi ready!

Name Link
🔨 Latest commit d7afa34
🔍 Latest deploy log https://app.netlify.com/projects/vortexfi/deploys/6a6cba6734b594000724d7de
😎 Deploy Preview https://deploy-preview-1300--vortexfi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +25 to +29
resumableRampWhere: {
flowVariant,
[Op.or]: [
{ currentPhase: { [Op.notIn]: [...TERMINAL_RAMP_PHASES, "initial"] } },
{ createdAt: { [Op.gte]: initialRampCutoff }, currentPhase: "initial" }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +28 to +29
{ currentPhase: { [Op.notIn]: [...TERMINAL_RAMP_PHASES, "initial"] } },
{ createdAt: { [Op.gte]: initialRampCutoff }, currentPhase: "initial" }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@ebma
ebma merged commit fe9439f into staging Jul 31, 2026
7 checks passed
@ebma
ebma deleted the codex/fix-block-flow-startup-guard branch July 31, 2026 15:13
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