Skip to content

Feat/tm capability telemetry - #443

Open
SavioBS629 wants to merge 4 commits into
browserstack:feat/tm-capability-registryfrom
SavioBS629:feat/tm-capability-telemetry
Open

SavioBS629 wants to merge 4 commits into
browserstack:feat/tm-capability-registryfrom
SavioBS629:feat/tm-capability-telemetry

Conversation

@SavioBS629

Copy link
Copy Markdown
Collaborator

No description provided.

SavioBS629 and others added 4 commits September 25, 2026 16:36
…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]>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited), Workspace UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: b43190a0-fdde-4382-8056-58d2c975c2f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@SavioBS629
SavioBS629 changed the base branch from main to feat/tm-capability-registry September 25, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant