Repository navigation
Conversation
Related #1321 Spec and plan for items 1-3 of #1321 (item 4, timeout logging, landed in #1513): call_id correlation, typed pending_call outcome layered on the 113-c taxonomy, (server, epoch, principal) pending-call registry with TTL, write/destructive retry gate with self-healing refusal, cancel via notifications/cancelled, MCP/REST/CLI parity. Three open questions with recommended defaults.
Related #1321 Addresses all 29 review findings, each checked against origin/main 44244b8 and mcp-go v1.0.0 (module cache): - Authoritative gate moved to managed.Client.callTool after the post-admission generation re-check (CheckAndBegin, serialized with MarkUnresolved). Covers activity replay and queued writes; advisory pre-admission check kept for slot economy. - Gate tier is contracts.AnnotationTier with unannotated -> write and not-found -> destructive (tierForAnnotations maps unannotated to read). - Always-detached stdio wait with a dispatch-time deadline, tie-to-result rule, publication handshake, tombstones and an epoch floor. - No forwarding of caller cancellation in v1: mcp-go cancels the handler ctx with a plain WithCancel, so an explicit cancel cannot be told apart from a client timeout, script deadline, disconnect or shutdown. - Typed JSON-RPC id; cancel pinned to the transport instance captured at dispatch. - Stable token principal (Name + CreatedAt), current-scope and exact permission checks, per-principal SSE and activity filtering. - HTTP/SSE entries survive epoch bumps; connection_reset, quarantine and restart documented as accepted ambiguity. - Per-(server, principal) caps; other principals never evict a gating entry. - Per-surface envelopes preserving the legacy error string; Spec 107 audit arms and count invariants; tool-surface delta; tenant allowlist decision; phase reorder so enforce needs late completion and cancel. - Spec 113 citations pinned to d5de932; assumptions labelled. Rejected as false positives: none. Narrowed: the configurable caller cancel forwarding mode is deferred to Q4, and SSE ownership is carried by an internal attribute stripped before send.
Related #1321 Address 20 review findings on the pending-call spec and plan. Each was checked against origin/main 44244b8 and mcp-go v1.0.0. - Authorization uses auth.ScopedView; confined anonymous callers become an anonymous_profile principal, never a raw IsAdmin() admin. - Global cap: records are only created at CheckAndBegin; evict, fold gating entries into per-scope overflow blockers, else refuse before dispatch (pending_registry_full). - Cancel is authorized against the admission tier; reconcile and cancel availability are computed per caller and server; FR-034 claim narrowed. - Both refusal points are audited as tool_call rejected (authz allow is already written at Started; auditAuthz is first-write-wins). - REST capture box keeps the legacy string; code_execution extends its {ok:false,error} envelope; replay returns typed errors and gets its own record fields. - Tenant allowlist gets a named must-refuse for /servers/{id}/pending-calls. - Principal id includes the token owner (names are unique per owner). - Activity resolution made reliable with a registry-driven resync and an activity-only untracked state. - HTTP/SSE cancel is local-only in v1. - Detached waits: dynamic fair share with preemption, three-principal test. - Implicit reconcile only for non-observable entries; explicit _meta reconciles otherwise; local principal gated per MCP session. - Registry methods return transitions emitted outside epochMu. - mcp-go multi-round calls: ordered id list, input_required late outcome. - Spec 113 FR-049 fallback acknowledged; mcp-go citations labelled as dependency assumptions with pin tests. Rejected in part: the claim that a deadline inside fulfillInputRequests is a human-wait signal. mcpproxy registers no elicitation, sampling or roots handler on upstream clients, so that path fails immediately; Q1 stays as is.
Member
Author
Open findings from review round 3 (not yet addressed)The spec went through 3 review rounds (opencode gpt-6.1-sol + an Opus critic). Findings fell from 35 to 21, but round 3 still reported the following. Address them before tasks.md and implementation:
|
Deploying mcpproxy-docs with
|
| Latest commit: |
778887f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://31e8857e.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://114-pending-call-outcome.mcpproxy-docs.pages.dev |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 37485745404 --repo smart-mcp-proxy/mcpproxy-go
|
This branch has not been deployed
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.
What this covers
Spec 114 (docs only:
specs/114-pending-call-outcome/spec.mdandplan.md) designs a typed pending-call outcome and call correlation for long-running stdio tool calls that hit atools/calltimeout. In short:pending_calloutcome (id, server, tool, reason, epoch) returned on MCP, REST andcode_executionsurfaces, additive to existing error shapes.pending_call_gate: off / warn / enforce) so a timed-out write is not blindly repeated while the original may still complete.No code is changed in this PR.
Open questions, with recommended defaults
Please answer in review. Defaults apply if there is no objection.
waiting_humanreason?pending_call_gatemodewarnthis release;enforceavailable from phase 3; flip stdio toenforceone minor release later._meta["io.mcpproxy/reconciles"].connection_resetopen the gate?cancel_pending_call?(Each is marked
[NEEDS CLARIFICATION]context in the spec's "Clarifications Needed" section.)Relationship to other work
Review history
Three cross-model review rounds were run (reviewer "sol" and a critic), all returning changes-needed, with revisions applied after rounds 1 and 2 (revision notes are at the end of the spec):
[{"round":1,"sol":"changes-needed","critic":"changes-needed"},{"round":2,"sol":"changes-needed","critic":"changes-needed"},{"round":3,"sol":"changes-needed","critic":"changes-needed"}]This design needs maintainer review; it is intentionally not set to auto-merge.
Refs #1321