Skip to content

TMP client library for publishers#9

Open
bokelley wants to merge 1 commit intomainfrom
bokelley/tmp-client
Open

TMP client library for publishers#9
bokelley wants to merge 1 commit intomainfrom
bokelley/tmp-client

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • Publisher-facing client that handles the full TMP match flow
  • Fires context and identity requests in parallel with temporal decorrelation (configurable random delay on identity request to prevent timing correlation)
  • Joins results locally: package eligible only if context offers it AND identity approves
  • Expose endpoint for post-impression frequency cap updates
  • Functional options: timeout, decorrelation max, HTTP client, retry with exponential backoff
  • Structured error types wrapping TMP ErrorResponse

Test plan

  • Parallel execution verified (both endpoints called)
  • Temporal decorrelation verified (identity request delayed)
  • Join logic: no context offer = not eligible, identity says no = not eligible
  • Signals pass-through from context response
  • Error handling: context failure, identity failure, timeout, HTTP errors
  • Expose flow
  • All tests pass with -race

Closes #7

🤖 Generated with Claude Code

Client handles the full TMP match flow: builds context and identity
requests, fires both in parallel with temporal decorrelation to prevent
timing correlation attacks, joins results locally, and reports exposure.

Features: functional options, retry with backoff, configurable
decorrelation delay, connection pooling, structured error types.

Closes #7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

TMP client library for publishers

1 participant