Conversation
Generated-By: PostHog Desktop Task-Id: f297bd3a-39f9-4b2c-8c5e-ba8a282424d7
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
🤖 CI report✅ Trunk lane — non-backend lane (
|
|
[Low risk] Updates a version constant to read from package metadata. The version source is sound, but the test expectations should be updated before merging so the next package bump does not fail the Hono suite. Reviews (1) · Last reviewed commit: "fix(mcp): derive server version from pac..." |
|
|
||
| export const MCP_SERVER_NAME = 'PostHog' | ||
| export const MCP_SERVER_VERSION = '1.0.0' | ||
| export const MCP_SERVER_VERSION = packageJson.version |
There was a problem hiding this comment.
Version bumps will fail tests When
services/mcp/package.json is bumped, this value will change, but two assertions in request-context.test.ts still require '1.0.0'. The intended version update will fail the Hono tests. Derive those expectations from the package version too.
Prompt To Fix With AI
This is a comment left during a code review.
Path: services/mcp/src/lib/constants.ts
Line: 24
Comment:
**Version bumps will fail tests** When `services/mcp/package.json` is bumped, this value will change, but two assertions in `request-context.test.ts` still require `'1.0.0'`. The intended version update will fail the Hono tests. Derive those expectations from the package version too.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The server will advertise the MCP package’s declared version instead of a separate literal. The supplied response paths use this value, and no actionable merge risk is established beyond normal checks. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Problem
MCP clients and analytics can report a stale server version after the package version changes.
Why: The server duplicates package metadata in a string constant. The two values can diverge.
Refs #101133
Changes
$mcp_server_versionevents use the package version. This change adds no event or property.How did you test this code?
pnpm --filter=@posthog/mcp run typecheckpnpm --filter=@posthog/mcp run test:hono -- tests/hono/analytics.test.ts tests/hono/request-context.test.ts👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
Automatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Codex, GPT-5.6
Skills invoked:
writing-simplified-technical-englishandwriting-pr-descriptions.The open PR search found no matching version-source fix. The change uses existing package metadata and adds no new analytics behavior.
Created with PostHog Desktop