Skip to content

[CI] (ba86941) ruby-sdk/stdio-server - #5145

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-ba86941-ruby-sdk-stdio-server
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-ba86941-ruby-sdk-stdio-server

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: manual
Trigger ID: ba86941
App: ruby-sdk/stdio-server
App directory: apps/ruby-sdk/stdio-server
Workbench branch: wizard-ci-ba86941-ruby-sdk-stdio-server
Wizard branch: main
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-11-12T05:18:14.397Z
Duration: 99.7s

YARA Scanner

✓ 20 tool calls scanned, 0 violations detected

No violations: ✓ 20 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR adds PostHog MCP analytics to a Ruby stdio MCP server. It installs posthog-ruby, initializes a PostHog::Client with environment variables, wraps the existing MCP::Server with PostHog::MCP.instrument, and adds a shutdown hook. The integration is minimal and preserves all existing functionality.

Files changed Lines added Lines removed
4 +55 -0

Confidence score: 4/5 👍

  • No error tracking implemented: No capture_exception calls or error handling wrappers exist. Tool call failures or runtime exceptions will not be captured by PostHog. [MEDIUM]
  • No .env.example committed: While .env is correctly gitignored and the report markdown documents the variables, there is no committed .env.example file for developers to reference. [MEDIUM]

File changes

Filename Score Description
server.rb 4/5 Adds PostHog client initialization, MCP instrumentation, stderr logging, and shutdown hook
Gemfile 5/5 Adds posthog-ruby dependency with correct version constraint
.gitignore 5/5 Correctly ignores .env to prevent secret leakage
posthog-mcp-analytics-report.md 4/5 Documents changes, env vars, and manual steps clearly

App sanity check ⚠️

Criteria Result Description
App builds and runs Yes Valid Ruby syntax, correct gem dependency added
Preserves existing env vars & configs Yes Existing AddNote tool and stdio transport fully preserved
No syntax or type errors Yes All added code is syntactically valid Ruby
Correct imports/exports Yes require "posthog/mcp" is the correct require path for the MCP module
Minimal, focused changes Yes Only PostHog integration code added, no unrelated changes
Pre-existing issues None Base app is clean

Issues

  • No .env.example committed: The .env file is correctly gitignored, and the report markdown documents the needed variables (POSTHOG_PROJECT_TOKEN, POSTHOG_HOST), but a committed .env.example would be more discoverable for other developers. [MEDIUM]

Other completed criteria

  • Build configuration valid — Gemfile uses correct source and gem format
  • Code quality matches existing patterns — stderr logger for stdio server is appropriate
  • Environment variables loaded correctly from ENV

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes posthog-ruby ~> 3.0 added to Gemfile
PostHog client initialized Yes PostHog::Client.new with api_key and host from env vars; PostHog::MCP.instrument wraps the server
capture() Yes Delegated to PostHog::MCP.instrument which auto-captures , , `` events
identify() N/A Server-only app
Error tracking No No capture_exception calls or error handling. Tool call failures and runtime exceptions are not captured.
Reverse proxy N/A Server-only app

Issues

  • No error tracking: The integration does not set up any error/exception tracking. Adding begin/rescue blocks around tool execution with posthog.capture_exception(e, distinct_id) calls would capture runtime failures. [MEDIUM]

Other completed criteria

  • API key loaded from environment variable POSTHOG_PROJECT_TOKEN, not hardcoded
  • Host correctly configured via POSTHOG_HOST environment variable
  • Shutdown hook via at_exit { posthog.shutdown } ensures events are flushed before exit
  • PostHog logging redirected to stderr to keep stdio MCP transport clean

PostHog insights and events ⚠️

Filename PostHog events Description
server.rb , , `` MCP protocol lifecycle events auto-captured via PostHog::MCP.instrument wrapper

Issues

  • No custom events: The integration relies entirely on auto-instrumented MCP events. While these cover the MCP protocol lifecycle, there are no custom events tracking app-specific behavior (e.g., note count, note content length). [LOW]

Other completed criteria

  • Events represent real MCP protocol actions (initialization, tool listing, tool calls)
  • MCP events enable product insights — tool usage funnels, call frequency trends
  • MCP instrumentation auto-enriches events with contextual properties (tool name, server info)
  • No PII in event properties
  • Event names follow PostHog's * convention

Reviewed by wizard workbench PR evaluator

@wizard-ci-bot wizard-ci-bot Bot added the CI/CD label Nov 12, 2026
@wizard-ci-bot wizard-ci-bot Bot closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants