You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shipping example in the README sent a phone verification time with a false verification result. The updated API reference says to send the time only when the result is true. This change removes the time from that example.
The two report transaction examples did not compile. They had no colon after the with statement and one space too many of indentation. The asynchronous example called async_client.report, but the context variable is client.
The Errors section named minfraud.HttpError. The package exports minfraud.HTTPError.
The shipping example sets the phone verification result to false.
The updated API reference says to send the verification time only
when the result is true.
STF-2488
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
The README updates the documented HTTP error class, removes shipping.phone_verification_time from a request example, and corrects the order dictionary and synchronous and asynchronous report examples.
Changes: README documentation
Layer / File(s)
Summary
Correct API examples README.rst
The documented error class changes to minfraud.HTTPError. The shipping example omits phone_verification_time, and the order dictionary has corrected indentation. The synchronous and asynchronous report examples have corrected syntax and indentation. The asynchronous example calls client.report.
This is a documentation-only change that corrects README examples and the error class name. It has no runtime impact and is safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "STF-2488: Fix README examples" names the main change: the PR corrects README examples. It does not name the specific fixes (removed phone verification time, syntax and indentation fixes, cl…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "STF-2488: Fix README examples" names the main change: the PR corrects README examples. It does not name the specific fixes (removed phone verification time, syntax and indentation fixes, client.report call, HTTPError class name), but the title is related to the main change and is not overly misleading. The ticket prefix is acceptable, and the title is specific enough for a teammate scanning history to see the primary change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the README page And fixes examples line by line The braces sit in proper place The calls now follow syntax fine Then hops away, contented and neat
Both examples had no colon after the `with` statement and one space
too many of indentation. The asynchronous example called
`async_client.report`, but the context variable is `client`.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
README.rst: 1
295-295: Minor · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Use continuation prompts in the report examples.
Both examples use >>> for lines inside compound statements. A Python console uses [REDACTED] for those lines, and doctest treats each >>> as a new statement. As written, the examples fail before they call report. Replace the continuation prompts with [REDACTED] in both blocks.
Also applies to: 310-310
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: f638f476-fc01-4c5d-889f-3e9e1bc10bef
Commits
Reviewing files that changed from the base of the PR and between 9f71b26 and 8810aaf.
Files selected for processing: 1
README.rst
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
This PR changes the guidance for the verification inputs, but HISTORY.rst has no entry for it. The sibling STF-2488 PRs for Java, .NET, PHP, Node and Ruby each add a changelog entry that states the new rules:
Send true if your system considers the email address or phone number verified as of the time of the event.
Send false if it is not verified, for example if its only verification is pending or failed.
Send nothing if your system does not track verification.
Send a verification time only with true.
There are two more reasons to add an entry here:
The 3.4.0 entry says these inputs "describe the most recent verification". The new rule is different: an earlier completed verification stays true when a newer attempt is pending or failed. Only a newer entry corrects that statement.
README.rst is the PyPI long description. PyPI shows the old example, which sends a time with false, until the next release.
Suggestion: add a 3.4.1 entry that matches the siblings, with was_verification_successful and phone_was_verification_successful as the field names, and "There are no code changes."
The reason will be displayed to describe this comment to others. Learn more.
This list is still incomplete. score(), insights(), factors() and report() raise PermissionRequiredError when the service returns PERMISSION_REQUIRED (_exception_for_web_service_error in src/minfraud/webservice.py). The list does not name it. Also, src/minfraud/__init__.py does not export it, so minfraud.PermissionRequiredError raises AttributeError, and only minfraud.errors.PermissionRequiredError works. The :raises: lines in the client method docstrings leave it out too.
This problem is older than this PR, but the PR already fixes one error name in this list.
Suggestion: export PermissionRequiredError from minfraud/__init__.py and add a bullet for minfraud.PermissionRequiredError here and in the :raises: lines. If you do not want to change the exports in a docs PR, add a bullet for minfraud.errors.PermissionRequiredError.
The reason will be displayed to describe this comment to others. Learn more.
Nit: this PR removes the time from the false shipping example. The tests still send a verification time with a false result, which the new reference text tells callers not to do:
tests/data/full-transaction-request.json lines 47-49 (shipping: network, a time, and false). The README example mirrors this fixture.
tests/test_request.py lines 71-72 and 79-80 (email time with false)
tests/test_webservice.py lines 284-285 and 300-301 (email time with false)
The tests pass because the client does not check the pairing. But readers copy request shapes from tests. Suggest removing the time from the false cases, or changing those cases to true, so that the fixture matches the README again.
The same comment is on the Java, .NET, PHP, Ruby, and Node PRs.
horgh
deleted the
greg/stf-2488-update-api-reference-documentation-on-minfraud
branch
December 1, 2026 17:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
falseverification result. The updated API reference says to send the time only when the result istrue. This change removes the time from that example.withstatement and one space too many of indentation. The asynchronous example calledasync_client.report, but the context variable isclient.minfraud.HttpError. The package exportsminfraud.HTTPError.STF-2488
🤖 Generated with Claude Code
Summary by CodeRabbit
shipping.phone_verification_timeand corrected the indentation of theorderdictionary.