Skip to content

Add :clear to report transaction tag values (STF-190)#219

Merged
horgh merged 2 commits intomainfrom
greg/stf-190
Apr 23, 2026
Merged

Add :clear to report transaction tag values (STF-190)#219
horgh merged 2 commits intomainfrom
greg/stf-190

Conversation

@oschwald
Copy link
Copy Markdown
Member

@oschwald oschwald commented Apr 22, 2026

Summary

  • Commit 1 — Adds :clear to the enum_accessor :tag array on
    Minfraud::Components::Report::Transaction, updates the docstring
    (with a parenthetical clarifying that :clear retracts a previous
    report), and extends the valid-values iteration in the component spec.
    Appends a bullet to the existing unreleased v2.10.0 entry in
    CHANGELOG.md.
  • Commit 2 — Adds a mise.toml (and generated mise.lock) so
    contributors can mise install to get a working Ruby toolchain. Uses
    ruby = "latest" to match the "latest" convention used in
    minfraud-api-dotnet / GeoIP2-dotnet. Not STF-190 specific —
    separate commit for easy review.

The clear tag retracts a previously reported fraud report on a transaction
(restoring its label to "unknown", distinct from the positive :not_fraud
signal). Backend support shipped in STF-15; this adds SDK support per STF-190.

Linear: https://linear.app/maxmind/issue/STF-190

Test plan

  • bundle exec rake (sandbox could not build Ruby from source due
    to missing libssl-dev — relying on CI to verify)
  • Change is mechanical: one symbol added to the enum array; spec
    iterates the same array.

🤖 Generated with Claude Code

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds the :clear tag to the Minfraud::Components::Report::Transaction component, updating the documentation, the enum_accessor, and the test suite. A suggestion was made to clarify the purpose of the :clear tag in the documentation, specifically noting its use for retracting previous reports.

Comment on lines +26 to +27
# This may be one of +:chargeback+, +:clear+, +:not_fraud+,
# +:spam_or_abuse+, or +:suspected_fraud+.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The :clear tag has a specific functional behavior (retracting a previous report) that distinguishes it from the other likelihood-based tags. Adding a brief explanation in the docstring would help users understand its purpose without needing to refer to the external API documentation.

        # This may be one of +:chargeback+, +:clear+ (to retract a previous
        # report), +:not_fraud+, +:spam_or_abuse+, or +:suspected_fraud+.

oschwald and others added 2 commits April 22, 2026 21:54
Part of STF-190. The `clear` tag retracts a previously reported fraud
report tag on a transaction, restoring its label to "unknown" (distinct
from the positive `:not_fraud` signal). Backend support shipped in
STF-15; this adds SDK support.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sets up `mise` for automatic Ruby provisioning, matching the pattern
already in use in minfraud-api-dotnet and GeoIP2-dotnet. Uses `latest`
to let contributors pick up the newest stable Ruby, mirroring the
behavior of the dotnet repos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@horgh horgh merged commit d6eb584 into main Apr 23, 2026
36 checks passed
@horgh horgh deleted the greg/stf-190 branch April 23, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants