Skip to content

feat(elicitation)!: split confirmation and secret collection TTLs - #538

Merged
barryroodt merged 7 commits into
mainfrom
barryroodt/ai-1438-per-flow-elicitation-ttl
Nov 9, 2026
Merged

barryroodt merged 7 commits into
mainfrom
barryroodt/ai-1438-per-flow-elicitation-ttl

Conversation

@barryroodt

Copy link
Copy Markdown
Contributor

Motivation

On hosted MCP, confirmations for execute_sql, apply_migration and the other confirmation tools expire after 2 minutes (AI-1438). Codex/ChatGPT users answered at 161 s and 288 s and got "This confirmation expired after 2 minutes" (AI-1424, AI-1427, AI-1428). The 2 minutes comes from the platform's elicitation.requestState.ttlSeconds: 120, set for URL-mode secret collection. Every elicitation flow shares that option, so the secret link's 2 minutes also applied to confirmations.

Changes

  • elicitation.requestState.ttlSeconds is replaced by elicitation.confirmation.ttlSeconds and elicitation.secretCollection.ttlSeconds. Both default to 600 s, and each one only applies to the state its own flow issues.
  • The AI-1372 "confirmation expired" error keeps its wording and now names the TTL of the tool that was called.
  • The local HTTP entry now uses 600 s for confirmations and 120 s for secret collection, which matches what hosted should use.

Important

Breaking: the old option is gone, so release-please will cut 0.17.0. When platform bumps, it needs to set secretCollection: { ..., ttlSeconds: 120 } and confirmation: { ..., ttlSeconds: 600 } explicitly. An inline config object turns the removed option into a type error. A config built through a variable or spread drops the 120 silently, which would widen secret links to 10 minutes.

Verification

I wrote the tests first from the spec, and they failed on main for the intended reason:

  • In the hosted HTTP round trip, the secret link expires at 121 s with "2 minutes". A confirmation is still accepted at 161 s and expires at 601 s with "10 minutes".
  • A direct server test checks that secret collection expires at 121 s whatever the confirmation TTL is.
  • The existing custom-TTL table now drives confirmation.ttlSeconds.

The tests control the clock, so nothing waits in real time. Request-state signing and principal/method binding are unchanged. A state from one flow can't resume the other flow's tool because the tool checks already reject it.

Closes AI-1438

@barryroodt
barryroodt requested a review from a team as a code owner November 9, 2026 10:01
@barryroodt barryroodt added the publish-preview Runs `publish-preview` workflow to publish preview packages via https://pkg.pr.new/ label Nov 9, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@supabase/mcp-server-postgrest@7723c75
pnpm add https://pkg.pr.new/@supabase/mcp-server-supabase@7723c75
pnpm add https://pkg.pr.new/@supabase/mcp-utils@7723c75

commit: 7723c75

@coveralls

coveralls commented Nov 9, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 42635330599

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.1%) to 98.069%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: 49 of 49 lines across 3 files are fully covered (100%).
  • 16 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

16 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/mcp-server-supabase/src/tools/destructive-sql.ts 16 94.63%

Coverage Stats

Coverage Status
Relevant Lines: 6222
Covered Lines: 6123
Line Coverage: 98.41%
Relevant Branches: 1338
Covered Branches: 1291
Branch Coverage: 96.49%
Branches in Coverage %: Yes
Coverage Strength: 283.71 hits per line

💛 - Coveralls

@barryroodt barryroodt self-assigned this Nov 9, 2026

@Rodriguespn Rodriguespn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, thanks @barryroodt! I tested it locally with the MCP Inspector:

  • Confirmations still go through after the old 2 minutes, and expire at 10 minutes with "expired after 10 minutes".
  • The secret link still expires at 2 minutes.
Image

A couple of nits inline, none blocking:

  1. One thing outside the diff: CONTRIBUTING.md:56 still says every local HTTP confirmation expires after 120 seconds. The comment at confirmation-instant-cancel.test.ts:546 ("platform passes 120") is also out of date now. Could we update both: 600 s for confirmations, 120 s for URL secret collection?

  2. there's no test for the secret-collection default, or for a confirmation TTL shorter than the secret one.

@barryroodt
barryroodt merged commit 8a08e48 into main Nov 9, 2026
5 of 6 checks passed
@supabase-releaser supabase-releaser Bot mentioned this pull request Nov 9, 2026
barryroodt pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mcp-utils: 0.10.0</summary>

##
[0.10.0](mcp-utils-v0.9.0...mcp-utils-v0.10.0)
(2026-11-13)


### Features

* tag cost-confirmation errors and report caller-input errors as
ToolCallerError ([#543](#543))
([ac366c4](ac366c4))
</details>

<details><summary>mcp-server-supabase: 0.17.0</summary>

##
[0.17.0](mcp-server-supabase-v0.16.1...mcp-server-supabase-v0.17.0)
(2026-11-13)


### ⚠ BREAKING CHANGES

* **elicitation:** split confirmation and secret collection TTLs
([#538](#538))

### Features

* agent feedback capabilities including docs
([#488](#488))
([698ccd5](698ccd5))
* **elicitation:** split confirmation and secret collection TTLs
([#538](#538))
([8a08e48](8a08e48))
* tag cost-confirmation errors and report caller-input errors as
ToolCallerError ([#543](#543))
([ac366c4](ac366c4))


### Bug Fixes

* **content api:** report GraphQL errors that have no locations
([#528](#528))
([6b2fca9](6b2fca9))
* **mcp:** confirm UPDATEs without WHERE that have a leading comment,
ONLY or an alias ([#524](#524))
([7df9fb8](7df9fb8))
* **mcp:** don't read semicolons or EXECUTE inside data literals as
destructive SQL ([#533](#533))
([0dcdd2d](0dcdd2d))
* tell agents the log window, project readiness, docs query and SQL size
rules up front ([#542](#542))
([23f0df0](23f0df0))
</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish-preview Runs `publish-preview` workflow to publish preview packages via https://pkg.pr.new/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants