♻️ uniformize with other sdks#266
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to “uniformize with other SDKs” by expanding Ruby SDK parity around polling cancellation, FieldConfidence comparison helpers, and stricter URL input validation (SSRF hardening), along with corresponding RBS and spec updates.
Changes:
- Add
Mindee::HTTP::CancellationTokenand wire it into V1/V2 async polling methods. - Add SSRF-focused URL validation to
URLInputSource(scheme/credentials/loopback/DNS-resolved IP range checks) plus extensive specs. - Extend
FieldConfidencewith</>operators and named aliases, updating RBS and adding specs.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Steepfile | Adds stdlib stubs (ipaddr, resolv) needed by new SSRF logic. |
| lib/mindee/http.rb | Requires the new cancellation token implementation. |
| lib/mindee/http/cancellation_token.rb | Introduces a cancellation token used by polling logic. |
| sig/mindee/http/cancellation_token.rbs | Adds RBS signature for the cancellation token. |
| lib/mindee/v2/client.rb | Adds optional cancellation token support to async polling. |
| lib/mindee/v1/client.rb | Adds optional cancellation token support to async polling. |
| lib/mindee/input/sources/url_input_source.rb | Adds SSRF validation for URL inputs. |
| sig/mindee/input/sources/url_input_source.rbs | Updates URLInputSource RBS for new validation helpers/constants. |
| spec/input/sources/url_input_source_spec.rb | Adds test coverage for the new SSRF URL validation rules. |
| lib/mindee/v2/parsing/field/field_confidence.rb | Adds </> and named aliases on FieldConfidence. |
| sig/mindee/v2/parsing/field/field_confidence.rbs | Updates RBS to reflect new FieldConfidence methods. |
| spec/v2/parsing/field_confidence_spec.rb | Adds tests for new FieldConfidence comparisons/aliases. |
| spec/http/cancellation_token_spec.rb | Adds tests for CancellationToken behavior. |
| spec/v2/client_v2_spec.rb | Adds tests for cancellation token behavior in V2 polling. |
| spec/v1/client_spec.rb | Adds tests for cancellation token behavior in V1 polling. |
sebastianMindee
force-pushed
the
uniformize-with-other-sdks
branch
from
July 17, 2026 20:25
f1caeb4 to
71c87e4
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Types of changes