Feat/tm capability telemetry - #443
Open
SavioBS629 wants to merge 4 commits into
Open
SavioBS629 wants to merge 4 commits into
SavioBS629 wants to merge 4 commits into
Conversation
…d why a call was refused Registry telemetry recorded only a tool name at entry, and every error path returned through `failed()` without recording anything. - `trackMCP` takes an optional `extras` object (scalars only), merged into the row. Existing callers are unaffected. - invokeCapability and describeCapability record the capability name, method, path, mode and product once resolved; invokeCapability adds `upstream_ok` and `upstream_status` when the product answers. `invoke()` returns 4xx/5xx rather than throwing, so `success` keeps its tool-level meaning and those two fields carry whether the call worked. - searchCapability records result count, total matched, truncated, weak_match and coverage, plus the search text. - A `refuse()` helper records and returns in one step, so every refusal carries a reason (unknown_capability, missing_parameter, bad_parameter_type, destructive_blocked, permission_not_granted, change_summary_missing, product_ambiguous, no_base_url). Refusals that never reach the network now produce a row. - Free text (`search_query`, `change_summary`) passes through `redact()` first: emails, URL credentials, JWTs, opaque tokens, IPs, phone numbers and long digit runs are replaced by shape, with no word lists, then capped at 200 characters. It fails closed, dropping the field rather than sending raw text. Names have no shape and are not covered; the module documents this. Registry rows stay identifiable by their tool names, and no field changes meaning for any existing tool. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
invokeCapability recorded once after resolving the capability and again once the product answered, so a completed call produced two rows and counting invokes double-counted. The first record existed to keep the capability name if the call never returned, but every path between the two points already writes its own row through `refuse()`, so it was redundant on every path. Removing it leaves one row per invoke, carrying both the identity and the upstream result. A call killed mid-flight now produces no row rather than a partial one, which is the trade for a count that needs no filter. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Redaction still runs on the full string, so truncation was removing detail without adding protection. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited), Workspace UI (inherited) Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
SavioBS629
changed the base branch from
main
to
feat/tm-capability-registry
September 25, 2026 11:13
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.
No description provided.