Skip to content

♻️ uniformize with other sdks#266

Merged
sebastianMindee merged 3 commits into
mainfrom
uniformize-with-other-sdks
Jul 17, 2026
Merged

♻️ uniformize with other sdks#266
sebastianMindee merged 3 commits into
mainfrom
uniformize-with-other-sdks

Conversation

@sebastianMindee

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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::CancellationToken and 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 FieldConfidence with </> 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.

Comment thread lib/mindee/input/sources/url_input_source.rb
Comment thread lib/mindee/http/cancellation_token.rb
Comment thread lib/mindee/v2/parsing/field/field_confidence.rb
Comment thread sig/mindee/http/cancellation_token.rbs
@sebastianMindee
sebastianMindee force-pushed the uniformize-with-other-sdks branch from f1caeb4 to 71c87e4 Compare July 17, 2026 20:25
@sebastianMindee
sebastianMindee merged commit 6b31667 into main Jul 17, 2026
33 checks passed
@sebastianMindee
sebastianMindee deleted the uniformize-with-other-sdks branch July 17, 2026 21:23
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.

2 participants