Improve agent feedback signal quality - #189
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33b3133. Configure here.
rgarcia
approved these changes
Sep 15, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
reviewed — the structured routing is a solid direction, but several cases can still produce incorrect or unsafe analytics signals:
bugs
src/lib/mcp/analytics.ts:235— the IPv6 redaction misses common valid forms including2001:4860:4860::8888,fe80::1, and::1, leaving IPs in captured free-form text. please cover compressed and digit-only IPv6 addresses.src/lib/mcp/tool-names.ts:40-42— namespace normalization discards every__prefix, so names likemcp__slack__manage_browsersandexternal__manage_appsare accepted as KERNEL-owned. please only strip recognized KERNEL namespace forms.src/lib/mcp/analytics.ts:647-651— positive product feedback withoutproduct_arearoutes toproduct_praise, makingproduct_unclassifiedunreachable for that case. check for the missing area before sentiment.src/lib/mcp/analytics.ts:671— dedupe normalization removes all non-ASCII letters, causing unrelated Chinese, Japanese, and accented summaries to share the same input. consider hashing the sanitized summary directly or preserving Unicode letters and numbers.src/lib/mcp/tools/missing-capability.ts:127-133—idempotentHint: trueconflicts with emitting a new PostHog event on every call. the custom dedupe property does not enforce capture idempotency, so this should befalseunless a stable$insert_idis added.
questions
src/lib/mcp/analytics.ts:653-658— lookup reports withoutanalysis_idshare one dedupe key per domain even when the applied configuration or outcome changes. should the key include the applied-config key and observed outcome?src/lib/mcp/tools/feedback.ts:256-268,440-464— descriptions sayaffected_toolandproduct_areaare required conditionally, but runtime accepts MCP feedback without a tool and product feedback without an area. if this is for legacy compatibility, could the schema/docs say “preferred”; otherwise, should these be enforced?
tests
src/lib/mcp/register.test.ts:56-67— this only proves registered tools appear in the allowlist; it cannot detect stale entries that remain accepted after tool removal. please check both set differences, accounting forget_more_toolsandsubmit_feedbackbeing registered elsewhere.src/lib/mcp/analytics.test.ts:1066-1111— the classifier’s external-integration, owner-mismatch, existing-tool-failure, and capture-failure branches are untested. these are core routing paths and worth covering alongside the fixes above.
masnwilliams
force-pushed
the
hypeship/tighten-feedback-signal
branch
from
September 15, 2026 22:32
7dedc43 to
e8e7135
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

summary
testing
bun test(539 passing)bun x tsc --noEmitbun run buildwith the required OAuth client IDs set to build-only placeholdersgit diff --checkThe repository-wide Prettier check still flags the pre-existing formatting of
AGENTS.md; this change does not modify that file.Note
Medium Risk
Changes MCP agent-facing tool contracts and PostHog event shapes for feedback and capability demand; behavior is heavily tested but alters how client reports are classified and recorded.
Overview
Replaces the PostHog SDK’s unstructured
get_more_toolspath with a first-class MCP tool that validates structured gap reports and emitsmcp_capability_requestedonly for true KERNEL or external-integration demand. Existing-tool failures, transient capacity issues, and client permission blocks are rejected from demand analytics and steered towardsubmit_feedbackinstead; SDKreportMissingis disabled so the real tool schema always runs.submit_feedbackgains normalizedtask_outcome, optionalaffected_tool(canonical KERNEL names with namespace normalization), richerfeedback_destinationrouting, dedupe keys, and server-side redaction across free-form fields. MCP feedback must name a KERNEL-owned tool; capability gaps are directed toget_more_tools.Analytics redaction now strips domains, IPv4/IPv6, and filesystem paths in addition to URLs, emails, and tokens. A
KERNEL_MCP_TOOL_NAMESregistry plus registration test keeps advertised tools aligned with the ownership checks. README standalone-tool docs reflect the split betweenget_more_toolsandsubmit_feedback.Reviewed by Cursor Bugbot for commit e8e7135. Bugbot is set up for automated code reviews on this repo. Configure here.