Skip to content

Update cuenca-validations to version 2.1.31.dev0, increment internal …#440

Open
rcabrera-py wants to merge 1 commit intomainfrom
feat/add-reset-password
Open

Update cuenca-validations to version 2.1.31.dev0, increment internal …#440
rcabrera-py wants to merge 1 commit intomainfrom
feat/add-reset-password

Conversation

@rcabrera-py
Copy link
Copy Markdown
Contributor

@rcabrera-py rcabrera-py commented May 6, 2026

…version to 2.1.20.dev0, and add PasswordReset resource with tests.

Summary by CodeRabbit

  • New Features

    • Added PasswordReset resource to the public API, enabling password reset creation, retrieval, and query operations with coordinate-based location support.
  • Chores

    • Updated sandbox host configuration to align with production API.
    • Bumped package version to 2.1.20.dev0.
    • Updated project dependencies.
    • Added comprehensive tests for PasswordReset functionality.

…version to 2.1.20.dev0, and add PasswordReset resource with tests.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Walkthrough

This PR introduces a new PasswordReset resource to the cuenca Python package. It adds a PasswordReset class to cuenca/resources/password_resets.py with create, retrieve, and query capabilities, including fields for platform identifiers, verification status, and timestamps. The resource is registered in the public API through updates to cuenca/__init__.py and cuenca/resources/__init__.py. Additionally, the SANDBOX_HOST is updated from sandbox.cuenca.com to api.cuenca.com, the package version is bumped to 2.1.20.dev0, the cuenca-validations dependency is updated to 2.1.31.dev0, and comprehensive tests are added for the new functionality.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • alexviquez
  • rogelioLpz
  • felipao-mx
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title is truncated and incomplete. While it references updating cuenca-validations and incrementing internal version, it uses ellipsis and doesn't fully convey the main addition of the PasswordReset resource. Complete the title to fully describe all key changes. Consider: 'Add PasswordReset resource, update cuenca-validations to 2.1.31.dev0, and bump version to 2.1.20.dev0' or similar to capture the main addition.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-reset-password

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuenca/http/client.py`:
- Line 21: SANDBOX_HOST is incorrectly set to the same value as API_HOST so
configure(sandbox=True) doesn't switch environments; restore a distinct sandbox
hostname by changing the SANDBOX_HOST assignment (symbol SANDBOX_HOST in
cuenca/http/client.py) back to the sandbox-specific host used by the service and
ensure configure(sandbox=True) uses SANDBOX_HOST instead of API_HOST (refer to
the configure(sandbox=True) logic and any host-selection code that reads
API_HOST/SANDBOX_HOST).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f579c9db-d1a0-4fa8-a059-4ca9028b44df

📥 Commits

Reviewing files that changed from the base of the PR and between f33c0e5 and fcb5ae5.

📒 Files selected for processing (7)
  • cuenca/__init__.py
  • cuenca/http/client.py
  • cuenca/resources/__init__.py
  • cuenca/resources/password_resets.py
  • cuenca/version.py
  • requirements.txt
  • tests/resources/test_password_resets.py

Comment thread cuenca/http/client.py

API_HOST = 'api.cuenca.com'
SANDBOX_HOST = 'sandbox.cuenca.com'
SANDBOX_HOST = 'api.cuenca.com'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Restore a distinct sandbox host for sandbox mode.

Line 21 makes SANDBOX_HOST equal to API_HOST, so configure(sandbox=True) no longer changes environment. This collapses sandbox/prod separation and matches the observed 403 failures in password reset tests.

🔧 Proposed fix
 API_HOST = 'api.cuenca.com'
-SANDBOX_HOST = 'api.cuenca.com'
+SANDBOX_HOST = 'sandbox.cuenca.com'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuenca/http/client.py` at line 21, SANDBOX_HOST is incorrectly set to the
same value as API_HOST so configure(sandbox=True) doesn't switch environments;
restore a distinct sandbox hostname by changing the SANDBOX_HOST assignment
(symbol SANDBOX_HOST in cuenca/http/client.py) back to the sandbox-specific host
used by the service and ensure configure(sandbox=True) uses SANDBOX_HOST instead
of API_HOST (refer to the configure(sandbox=True) logic and any host-selection
code that reads API_HOST/SANDBOX_HOST).

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