Skip to content

fix(rust): add the tls feature to the blocking-client install - #1572

Merged
gewenyu99 merged 1 commit into
mainfrom
vincent/rust-blocking-tls
Nov 17, 2026
Merged

gewenyu99 merged 1 commit into
mainfrom
vincent/rust-blocking-tls

Conversation

@gewenyu99

Copy link
Copy Markdown
Collaborator

Problem

posthog-rs 1.x turns TLS off when default features are off. For a Rust project with no async runtime, the wizard tells the agent to run cargo add posthog-rs --no-default-features. That build has no TLS, so every capture to https://us.i.posthog.com fails, and because capture() is fire-and-forget the app runs and drops every event.

posthog-rs 0.x kept TLS on with default features off, so this broke with the 1.0 release.

Changes

  • The no-runtime install line is now cargo add posthog-rs --no-default-features --features tls.
  • It tells the agent to leave out --features tls on posthog-rs 0.x, which has no tls feature, so cargo add doesn't fail on crates pinned to 0.x.

How did you test this?

  • Two crates on posthog-rs 1.0.0 with the blocking client calling capture_immediate against https://example.com. default-features = false has no rustls in Cargo.lock and fails with error sending request. Adding features = ["tls"] pulls in rustls and gets an HTTP 405 back from the host.
  • pnpm build, pnpm typecheck, and vitest run src/services/detection/__tests__/framework.test.ts pass.

🤖 Generated with Claude Code

posthog-rs 1.x turns TLS off with default features. The no-runtime
install, `cargo add posthog-rs --no-default-features`, built a client
that never sends to an https host. Add `--features tls`, and leave it
out on posthog-rs 0.x, which has no such feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gewenyu99
gewenyu99 requested a review from a team as a code owner November 17, 2026 22:00
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/go-sdk
  • /wizard-ci mcp-analytics/python-sdk
  • /wizard-ci mcp-analytics/ruby-sdk
  • /wizard-ci mcp-analytics/rust-sdk
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

@veria-ai

veria-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@posthog-security-review-bot posthog-security-review-bot Bot added the security-review Request a security review label Nov 17, 2026
@posthog-security-review-bot

posthog-security-review-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Security review complete — 86258921ab5c

No findings above the confidence threshold, in 3 min.

Add the security-review label to run again on the latest commit.

@posthog-security-review-bot posthog-security-review-bot 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.

Agent-driven security review - no findings.

@posthog-security-review-bot posthog-security-review-bot Bot removed the security-review Request a security review label Nov 17, 2026
@gewenyu99
gewenyu99 merged commit b779973 into main Nov 17, 2026
22 checks passed
@gewenyu99
gewenyu99 deleted the vincent/rust-blocking-tls branch November 17, 2026 22:24
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