Skip to content

fix: enhance response handling in Mint adapter#803

Merged
yordis merged 1 commit intomasterfrom
yordis/fixes-450
Apr 18, 2026
Merged

fix: enhance response handling in Mint adapter#803
yordis merged 1 commit intomasterfrom
yordis/fixes-450

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented Aug 28, 2025

fixes #450

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

@yordis yordis marked this pull request as ready for review August 28, 2025 20:41
Copilot AI review requested due to automatic review settings August 28, 2025 20:41
Copy link
Copy Markdown

Copilot AI left a comment

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 enhances response handling in the Tesla Mint adapter to fix issue #450 by improving the message pattern matching robustness and adding comprehensive test coverage.

  • Added error handling patterns for HTTP/2 features and unknown response types
  • Extended test coverage for various response scenarios including timeouts, streaming, and error conditions
  • Improved forward compatibility by gracefully handling unsupported message types

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/tesla/adapter/mint.ex Added pattern matching for error, pong, push_promise, and unknown message types
test/tesla/adapter/mint_test.exs Added comprehensive test suite covering normal requests, errors, timeouts, streaming, and large responses

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/tesla/adapter/mint.ex Outdated
@yordis
Copy link
Copy Markdown
Member Author

yordis commented Aug 28, 2025

@teamon could you give me a hand reviewing this one?

@yordis yordis force-pushed the yordis/fixes-450 branch 3 times, most recently from 40d9899 to 4cc6119 Compare August 28, 2025 20:53
@yordis yordis marked this pull request as draft August 28, 2025 20:56
@yordis yordis marked this pull request as ready for review September 17, 2025 00:06
@yordis
Copy link
Copy Markdown
Member Author

yordis commented Nov 26, 2025

I am giving up how to properly test this, @teamon any clue 😭

@yordis yordis force-pushed the yordis/fixes-450 branch from 398a359 to 0d2eb42 Compare April 18, 2026 16:56
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 18, 2026

PR Summary

Medium Risk
Touches core response parsing in the Mint adapter to handle an additional Mint message type; could affect HTTP/2 response handling, but the behavioral change is narrowly scoped and covered by new tests.

Overview
Fixes Mint adapter response reduction to gracefully ignore {:push_promise, ...} messages (HTTP/2 server push) so unexpected response types don’t crash request handling.

Adds regression coverage for issue #450, including a small Cowboy TLS HTTP/2 server that emits a real push promise and tests for connection errors, timeouts, streaming, and the push-promise scenario.

Reviewed by Cursor Bugbot for commit e4c3a1d. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0d2eb42. Configure here.

Comment thread lib/tesla/adapter/mint.ex
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the yordis/fixes-450 branch from 0d2eb42 to e4c3a1d Compare April 18, 2026 17:58
@yordis yordis merged commit a672177 into master Apr 18, 2026
10 checks passed
@yordis yordis deleted the yordis/fixes-450 branch April 18, 2026 18:04
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.

Mint reduce_responses doesn't handle all possible responses

3 participants