Skip to content

Stop pending MCP checks from telling hosts to check again - #363

Merged
ericlovold merged 1 commit into
mainfrom
cursor/bounded-mcp-check-wait-9768
Oct 8, 2026
Merged

ericlovold merged 1 commit into
mainfrom
cursor/bounded-mcp-check-wait-9768

Conversation

@ericlovold

@ericlovold ericlovold commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Pending sanction_check_authorization results could still tell a host to call the check tool once more. A host that obeys every response literally could therefore poll forever, which broke the bounded wait path from #362.

What changed for MCP hosts

  • After one of the four authorize tools returns pending/escalated, guidance is unchanged: pause for human review, then call sanction_check_authorization once with request_id.
  • After sanction_check_authorization itself returns pending/escalated, structured remediation and readable text now say the request is still awaiting the owner's decision. Do not proceed. Do not check again automatically or request another approval. Tell the owner it is awaiting approval (request_id stays visible). Check again only after they say they have decided.
  • next_action stays wait — the request is still open; stop would look terminal.
  • Missing request_id and malformed/stop branches are unchanged. Authorization and grant semantics are unchanged.
  • The check-tool description no longer says "poll indefinitely" / "Polling can settle…". Settlement is described as a possible side effect of a single check; the not-read-only warning stays.

Closes the two CodeRabbit findings left on #362. Stdio bundle rebuilt; npm publication remains a separate step.

Validation: npm run check passed (1,857 tests passed, 56 DB tests skipped; TypeScript and ESLint passed). git diff --check passed. Contract tests cover pending/escalated check results (no re-check instruction, JSON/text parity) and authorize-tool pending (still check once).

Open in Web Open in Cursor 

A pending or escalated sanction_check_authorization result now tells the
host the request is still awaiting the owner, not to check again. The
four authorize tools keep the wait-then-check-once path.

Co-authored-by: ELo <ericlovold@gmail.com>
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sanction Ready Ready Preview Oct 8, 2026 2:04am UTC

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: ericlovold/sanction/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 9af8bfa0-30bf-4cc6-bdf3-aba9137f658b
📥 Commits

Reviewing files that changed from the base of the PR and between 4116dcd and 973fbbb.

📒 Files selected for processing (5)
  • lib/changelog.ts
  • lib/mcpDecisionResult.ts
  • lib/mcpServer.ts
  • packages/sanction-mcp/mcp-server.js
  • tests/mcpDecisionContract.test.ts
 __________________________________________________________________________________________________________________________________
< Functions delay binding; data structures induce binding. Moral: Structure data late in the programming process. - Alan J. Perlis >
 ----------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ericlovold
ericlovold marked this pull request as ready for review October 8, 2026 21:29
@ericlovold
ericlovold merged commit 56aa4e4 into main Oct 8, 2026
9 checks passed
@cursor

cursor Bot commented Oct 8, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: f78ce130-ed98-48e0-90cb-07c55bde997d)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved. Cursor Bugbot was skipped, so that signal was not used; remaining configured signals and approval policy do not require human review. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

This branch was successfully deployed

1 active deployment
Preview — 973fbbbf Deployed Oct 8, 2026 by vercel[bot]
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.

2 participants