Skip to content

[CI] (cc5471b) custom-dispatcher/hono-server - #4799

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-cc5471b-custom-dispatcher-hono-server
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-cc5471b-custom-dispatcher-hono-server

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: scheduled
Trigger ID: cc5471b
App: custom-dispatcher/hono-server
App directory: apps/custom-dispatcher/hono-server
Workbench branch: wizard-ci-cc5471b-custom-dispatcher-hono-server
Wizard branch: main
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-10-28T17:09:35.862Z
Duration: 197.7s

YARA Scanner

✓ 29 tool calls scanned, 0 violations detected

No violations: ✓ 29 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
Author

Now I have all the context I need. Let me produce the evaluation.


PR Evaluation Report

Summary

This PR adds PostHog MCP analytics to a custom JSON-RPC dispatcher built on Hono. It installs @posthog/mcp and posthog-node, initializes PostHogMCP with environment variables, and instruments the initialize, tools/list, and tools/call MCP methods with appropriate capture calls. Graceful shutdown is handled via SIGTERM.

Files changed Lines added Lines removed
4 +149 -16

Confidence score: 5/5 🧙

  • No critical or medium issues found. The integration is clean, thorough, and follows the @posthog/mcp custom-dispatcher pattern correctly.

File changes

Filename Score Description
src/index.ts 5/5 Core integration: initializes PostHogMCP, instruments all three MCP methods, adds graceful shutdown
package.json 5/5 Adds @posthog/mcp (pinned) and posthog-node as dependencies
.gitignore 5/5 Adds .env to prevent committing secrets
posthog-mcp-analytics-report.md 5/5 Documents setup, changes, and manual steps

App sanity check ✅

Criteria Result Description
App builds and runs Yes Report confirms tsc --noEmit passes; no syntax issues visible
Preserves existing env vars & configs Yes Existing tools, dispatcher logic, and route handling preserved intact
No syntax or type errors Yes TypeScript is valid; careful type guards on clientInfo, rawRequestMeta
Correct imports/exports Yes PostHogMCP from @posthog/mcp is correct for the custom-dispatcher pattern
Minimal, focused changes Yes Only PostHog instrumentation added; no unrelated refactoring
Pre-existing issues None Base app is clean

Issues

No issues found.

Other completed criteria

  • .gitignore correctly excludes .env to prevent secret leakage
  • Environment variables documented in the report with clear manual steps
  • package.json remains valid with correct dependency declarations

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes @posthog/mcp@0.25.0 (pinned) and posthog-node@^5.59.0 in package.json
PostHog client initialized Yes PostHogMCP initialized at module scope with captureModel, enableExceptionAutocapture
capture() Yes captureInitialize, captureToolsList, captureToolCall cover all MCP methods
identify() N/A Server-only MCP app
Error tracking Yes enableExceptionAutocapture: true + isError: true and error passed in failed tool calls
Reverse proxy N/A Server-only app

Issues

No issues found.

Other completed criteria

  • API key loaded from process.env.POSTHOG_PROJECT_TOKEN — not hardcoded
  • Host loaded from process.env.POSTHOG_HOST — correctly configured
  • Graceful shutdown on SIGTERM with posthog?.shutdown()
  • Defensive posthog?. optional chaining throughout allows graceful degradation when env vars are missing
  • prepareToolList and prepareToolCall correctly used for agent intent/model capture and SDK-owned argument cleanup

PostHog insights and events ✅

Filename PostHog events Description
src/index.ts `` Captures MCP session initialization with protocol version, client info, duration
src/index.ts `` Captures tool listing with tool names, parameters, duration
src/index.ts `` Captures tool execution (success/failure) with tool name, description, args, response, duration, intent, model, error details
src/index.ts `` (auto) Autocaptured exceptions via enableExceptionAutocapture: true

Issues

No issues found.

Other completed criteria

  • Events represent real MCP protocol actions (initialize, list tools, call tools)
  • Rich properties enable funnel analysis (initialize → list → call), error rate tracking, duration analysis
  • Properties include duration, tool descriptions, client user-agent, vendor client, intent, LLM model
  • No PII in event properties — only tool names, arguments, and protocol metadata
  • Event naming follows canonical * convention via the SDK

Reviewed by wizard workbench PR evaluator

@wizard-ci-bot wizard-ci-bot Bot added the CI/CD label Oct 28, 2026
@wizard-ci-bot wizard-ci-bot Bot closed this Oct 28, 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