Skip to content

Add OperatorOtpChallenge resource - #447

Closed
rcabrera-py wants to merge 1 commit into
mainfrom
feat/operator-otp-challenges
Closed

rcabrera-py wants to merge 1 commit into
mainfrom
feat/operator-otp-challenges

Conversation

@rcabrera-py

@rcabrera-py rcabrera-py commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Verification

  • targeted pytest passes
  • flake8, isort, black, and mypy pass

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added support for creating one-time operator email verification challenges.
    • Exposes the challenge expiration time and a masked email hint.
    • Added public resource registration for operator OTP challenges.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 9c3be7e4-0be2-42d8-8999-1f95a42adc63

📥 Commits

Reviewing files that changed from the base of the PR and between 8436a25 and 8bfd298.

📒 Files selected for processing (4)
  • cuenca/__init__.py
  • cuenca/resources/__init__.py
  • cuenca/resources/operator_otp_challenges.py
  • tests/resources/test_operator_otp_challenges.py

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

Adds the OperatorOtpChallenge resource for one-shot operator email OTP sessions. The resource defines expiration and masked email hint fields and creates challenges through a session. The change registers the resource for lookup and exports it from the package and resources modules. Tests verify response parsing and the POST request with an empty JSON body.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: alexviquez

Merge Risk: ⚪ Minimal · up to 8bfd2

The new OTP challenge resource, exports, registry entry, and targeted request/response coverage have no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the OperatorOtpChallenge resource and its public exports.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8436a25) to head (8bfd298).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #447   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        59    +1     
  Lines         1297      1311   +14     
=========================================
+ Hits          1297      1311   +14     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cuenca/__init__.py 100.00% <ø> (ø)
cuenca/resources/__init__.py 100.00% <100.00%> (ø)
cuenca/resources/operator_otp_challenges.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8436a25...8bfd298. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rcabrera-py

Copy link
Copy Markdown
Contributor Author

Closing: no Python consumer needs the authorization OTP challenge today. The company portal uses cuenca-js, so this would be speculative API surface. Reopen when a Python service actually authorizes payment orders.

@rcabrera-py
rcabrera-py deleted the feat/operator-otp-challenges branch September 18, 2026 20:01
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