Skip to content

dzejkop/client improvements - #72

Merged
Dzejkop merged 6 commits into
mainfrom
dzejkop/client-improvements
Sep 7, 2026
Merged

dzejkop/client improvements#72
Dzejkop merged 6 commits into
mainfrom
dzejkop/client-improvements

Conversation

@Dzejkop

@Dzejkop Dzejkop commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
  • chore: allow modifying the request prior to sending
  • chore: allow sypplying external client but preserve required configuration

Note

Low Risk
Refactor and new public hooks around the same verify-and-seal logic; no change to attestation or channel crypto behavior beyond call structure.

Overview
Extends FaceVerifierClient so embedders can tune HTTP before send without bypassing sealing, attestation checks, or response verification.

new now builds through with_http_client_builder, which still forces cookie store (ALB affinity), connect timeout, and request timeout on whatever reqwest::ClientBuilder the caller supplies. Assignment and match flows are split into build helpers (build_assignment_request, build_match_request → builder + ResponseOpener) and send helpers (request_assignment_with, request_match_with); the one-shot request_* methods delegate to those. The private request_match_with_consumer path is removed in favor of the public request_match_with API. Endpoint path constants are inlined as /v1/enclave-assignment and /v1/matches.

Match HTTP tests move from tests/matches.rs into an inline mod tests in client.rs, using a local helper that exercises request_match_with instead of the removed private method.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors FaceVerifierClient to support more flexible HTTP customization: callers can modify reqwest::RequestBuilders before sending, and can supply an externally configured reqwest::ClientBuilder, while preserving the client’s required settings (cookie store + timeouts) and keeping the existing high-level new / request_* APIs intact.

Changes:

  • Add with_http_client_builder to allow constructing the client from an externally configured reqwest::ClientBuilder while enforcing required HTTP settings.
  • Split assignment/match flows into “build request” helpers and “send/verify” helpers (build_* + request_*_with).
  • Inline endpoint paths in the new builder helpers (removing the old path constants).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread deepface/client/src/client.rs Outdated
Comment thread deepface/client/src/client.rs Outdated
@@ -17,12 +17,6 @@ use getrandom::SysRng;

use crate::config::Config;

/// Path of the assignment endpoint.
const ASSIGNMENT_PATH: &str = "/v1/enclave-assignment";

@0xOsiris 0xOsiris Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we keep these constant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they're used only to construct the urls? It's easier to read if they're inline imo

Comment thread deepface/client/src/client.rs Outdated
Comment thread deepface/client/src/client.rs Outdated
0xOsiris
0xOsiris previously approved these changes Sep 3, 2026

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort 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 7bf0046. Configure here.

Comment thread deepface/client/src/client.rs Outdated
@Dzejkop
Dzejkop force-pushed the dzejkop/client-improvements branch 2 times, most recently from b7ea1d0 to 52b566f Compare September 4, 2026 15:25
Takaros999
Takaros999 previously approved these changes Sep 4, 2026
@Dzejkop
Dzejkop merged commit e5ef8d2 into main Sep 7, 2026
14 checks passed
@Dzejkop
Dzejkop deleted the dzejkop/client-improvements branch September 7, 2026 13:38
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
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.

5 participants