Skip to content

feat(mcp): add verifier latency observer - #497

Closed
brooksmcmillin wants to merge 1 commit into
tenuo-ai:mainfrom
brooksmcmillin:feat/mcp-verifier-latency-observer
Closed

feat(mcp): add verifier latency observer#497
brooksmcmillin wants to merge 1 commit into
tenuo-ai:mainfrom
brooksmcmillin:feat/mcp-verifier-latency-observer

Conversation

@brooksmcmillin

Copy link
Copy Markdown
Contributor

Summary

  • add an optional latency_observer callback to MCPVerifier
  • measure end-to-end verification latency from method entry across every allow and denial return path
  • isolate observer failures and mutations by passing a deep-copied result snapshot after trusted control-plane emission
  • feed the same end-to-end duration into existing control-plane telemetry
  • document a Prometheus histogram adapter

Test plan

  • ruff check tenuo/mcp/server.py tests/adapters/test_mcp_server.py
  • uv run --no-sync python -m pytest tests/adapters/test_mcp_server.py tests/adapters/test_control_plane.py -q (84 passed, 5 skipped)
  • git diff --check

Closes #496

Task: https://nexus.brooksmcmillin.com/task/1688

Expose end-to-end verifier latency through an optional isolated callback on every allow and denial path.

Closes tenuo-ai#496

Task: https://nexus.brooksmcmillin.com/task/1688
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.

Expose end-to-end MCPVerifier latency through an observer callback

2 participants