Skip to content

Conversation

@0x8000-0000
Copy link
Contributor

Description

Why:
- To enable conformance testing of the checkout escalation flow according to spec.
- Provides a deterministic way to trigger 'requires_escalation' via 'risk_signals' payload in 'complete_checkout'.

What:
- Removed hardcoded buyer name check.
- Updated 'complete_checkout' to check for 'simulation_trigger': 'escalation_required' in 'risk_signals'.
- When triggered, returns 200 OK with status 'requires_escalation', 'continue_url', and 'requires_buyer_input' message, instead of completing the order.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules - this depends on feat: implement 'requires_escalation' triggered by risk signals samples#25 which is not merged yet.

@0x8000-0000 0x8000-0000 requested a review from a team January 17, 2026 00:12
Why:
- To verify that the server correctly implements the 'requires_escalation' status when risk checks fail during completion.
- Ensures conformance with the checkout status lifecycle.

What:
- Added 'test_escalation_flow' to 'CheckoutLifecycleTest'.
- Triggers escalation by sending 'simulation_trigger': 'escalation_required' in 'risk_signals' during 'complete_checkout'.
- Asserts that status becomes 'requires_escalation' and 'continue_url' is present.
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