Skip to content

fix(mcp-proxy): honor approval timeout across poll slices#46

Merged
oleg-bk merged 1 commit into
mainfrom
codex/mcp-proxy-approval-retry-loop
Jun 2, 2026
Merged

fix(mcp-proxy): honor approval timeout across poll slices#46
oleg-bk merged 1 commit into
mainfrom
codex/mcp-proxy-approval-retry-loop

Conversation

@oleg-bk
Copy link
Copy Markdown
Contributor

@oleg-bk oleg-bk commented Jun 2, 2026

Summary

  • keep nonblocking approval watchers alive until the configured approval timeout expires
  • prevent approved retries from creating a second pending approval prompt
  • add product-path regression tests for approval -> retry -> downstream execution

Scope

  • In scope: MCP Proxy local approval manager and focused approval/runtime-gate tests.
  • Out of scope: unknown-tool/schema-deny evidence, git/fetch policy, filesystem path rules, TrapDoor expansion, backend/private/control-plane/secrets, release/version bump.
  • Public/private boundary: public SDK MCP Proxy package only; no backend/private logic added.

Product-Path Acceptance

  • Product-path gate: pass
  • Artifact fingerprint: branch codex/mcp-proxy-approval-retry-loop, commit e36cc5a, base 4ccc8ec
  • Positive path: valid write call creates approval; after operator approval, identical retry executes downstream.
  • Negative path: retry does not create a second pending approval prompt.
  • Evidence path: parent approval reaches approved; child retry record reaches executed; no raw file content/secrets asserted in the focused acceptance path.
  • Old-state / migration behavior: old evidence DB upgrade/recovery not touched; remains a separate issue.
  • Remaining unverified: live Console with a real >60s human delay; deterministic test simulates the slow first poll slice without waiting 60s.

Type-specific gate:

  • Approval path: request -> approval -> retry -> execution

Validation

  • PYTHONPATH=../..:. python3 -m pytest tests/test_mcp_proxy_approval.py::test_nonblocking_watcher_honors_full_timeout_before_expiring tests/test_mcp_proxy_approval.py::test_nonblocking_retry_after_approval_executes_downstream tests/test_mcp_proxy_runtime_gate.py::test_waiting_retry_after_local_approval_executes_downstream -q -> 3 passed
  • PYTHONPATH=../..:. python3 -m pytest tests/test_mcp_proxy_approval.py tests/test_mcp_proxy_runtime_gate.py tests/test_mcp_proxy_evidence.py -q -> 163 passed
  • PYTHONPATH=../..:. python3 -m pytest tests/test_mcp_proxy_passthrough.py tests/test_mcp_proxy_passthrough_concurrent.py -q -> 68 passed, 1 skipped
  • git diff --check / git diff --cached --check -> passed

Release / Claim Notes

  • Claims this PR supports: approval retry can reuse a slow local approval and execute without a second pending prompt on the covered local approval/runtime-gate paths.
  • Claims this PR does not support: unknown-tool/schema-deny evidence fixes, old evidence DB chain recovery, release readiness by itself.

Implemented with assistance from Codex.

Keep nonblocking approval watchers alive until the configured approval timeout expires so a slow local approval can be reused by the retry path instead of creating a new pending prompt.

Add product-path regression coverage for approval -> retry -> downstream execution without a second pending approval.

Implemented with assistance from Codex.
@oleg-bk oleg-bk marked this pull request as ready for review June 2, 2026 11:22
@oleg-bk oleg-bk merged commit aabc009 into main Jun 2, 2026
15 checks passed
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