Repository navigation
feat(mcp-utils): add bounded request lifecycle observations - #427
Merged
Merged
Conversation
Coverage Report for CI Build 38265913768Coverage remained the same at 96.995%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
raulb
reviewed
Sep 30, 2026
raulb
left a comment
Member
There was a problem hiding this comment.
The code looks good. I would only add an example to observability.md to illustrate its use. Maybe we could use what we do in the platform code that uses it as an example.
Additional feedback
The PR description also looks AI written 💀. I was missing a human-readable explanation of what this is trying to solve (a linked Linear issue or who asked for this).
raulb
reviewed
Oct 2, 2026
barryroodt
marked this pull request as ready for review
October 5, 2026 14:54
…-observability-lifecycle
raulb
self-requested a review
October 6, 2026 11:55
raulb
approved these changes
Oct 6, 2026
…-observability-lifecycle
Merged
barryroodt
added a commit
that referenced
this pull request
Oct 14, 2026
) ## Why Platform measures how Supabase cost confirmations for `create_project` and `create_branch` behave, without shipping payloads. This is part of [AI-1273](https://linear.app/supabase/issue/AI-1273/observability-for-mcp-elicitations-and-requests), building on [#427](#427), with [#455](#455) adding SQL confirmation facts. ## What changed - Supabase owns concrete tool and fact types plus observer aliases, and classifies tools with a `CURRENT_ELICITATION_TOOLS` lookup; `mcp-utils` supplies the generic core. - `create_project` and `create_branch` report confirmation decisions and protected-operation durations that exclude observer recording latency. Consumed responses set the outcome before fact dispatch or changed-quote validation. - Built-in facts contain bounded values without raw arguments, results, state or errors. Custom fact producers remain responsible for privacy. - Existing confirmation behavior stays intact. With no observer, no facts or timings are recorded. ## How to test ```sh pnpm test:packed-platform-consumer ``` All 3 packed-consumer checks pass. ## Trade-offs - Hosts own collection; synchronous observers can block despite failure isolation. - Packed checks don't cover branch or cancellation paths.
barryroodt
pushed a commit
that referenced
this pull request
Oct 14, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-utils: 0.9.0</summary> ## [0.9.0](mcp-utils-v0.8.0...mcp-utils-v0.9.0) (2026-10-14) ### Features * **mcp-utils:** add bounded request lifecycle observations ([#427](#427)) ([b11d62b](b11d62b)) </details> <details><summary>mcp-server-supabase: 0.14.0</summary> ## [0.14.0](mcp-server-supabase-v0.13.0...mcp-server-supabase-v0.14.0) (2026-10-14) ### Features * **advisors:** add health advisor support ([#420](#420)) ([8a26508](8a26508)) * **mcp-server-supabase:** add bounded cost lifecycle observations ([#428](#428)) ([657d1f3](657d1f3)) * **mcp-server-supabase:** add destructive SQL observations ([#455](#455)) ([4595698](4595698)) ### Bug Fixes * **mcp:** clarify cost and deploy tool descriptions for OpenAI scanner ([#467](#467)) ([1f9da03](1f9da03)) * **mcp:** stop double cost confirmation on create_project and create_branch ([#468](#468)) ([3c3b1fc](3c3b1fc)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
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.
Why
Platform measures hosted MCP request lifecycles (attempts, outcomes and durations) without shipping request payloads. This adds the generic core for that work in AI-1273, and #428 supplies Supabase-owned types and cost facts.
What changed
createMcpServeraccepts an optionalobserverand an optionalclassifyToolfunction that maps a tool name to a host-defined bucket orother. Onlytools/callcontexts include a tool bucket; other contexts contain only the method.recordandsetOutcome. Outcomes don't depend on fact contents. Errors andinput_requiredretain precedence.onToolCallstays unchanged.How to test
pnpm --filter @supabase/mcp-utils exec vitest run36 tests pass.
Trade-offs
classifyTooland sink failures are isolated, but synchronous observer and classifier work can still block requests.