Skip to content

RFC: webhook-grading rendezvous service #2618

Closed as not planned
Closed as not planned

Description

@bokelley

Status: Draft
Author: @bokelley
Date: 2026-04-20
Requires: webhook_receiver_runner test-kit contract (AdCP 3.0)
Supersedes: Option B of docs/proposals/webhook-grading-reachability.md

Summary

A public relay service at rendezvous.adcontextprotocol.org that mints
short-lived HTTPS endpoints for AdCP compliance grading. The agent under test
POSTs to the minted URL over ordinary HTTP (production wire format); the
grader subscribes over WebSocket to receive those deliveries in real time.

Grader ←──WebSocket──→ rendezvous ←──HTTPS─── Agent under test

The agent-side contract is unchanged — it's still an HTTPS POST to a
public URL signed with RFC 9421. Only the grader-side ergonomics change:
subscribing by outbound WebSocket instead of hosting an inbound listener,
which lets graders run behind NAT, corporate proxies, or CI without ingress.

Motivation

The conformance-parity invariant

compliance/cache/latest/test-kits/webhook-receiver-runner.yaml defines a
hard invariant for the webhook_receiver_runner contract:

An agent that passes under loopback_mock MUST also pass under
proxy_url for the same storyboard. Any divergence is a conformance bug.

Both modes drive the same agent code path: production outbound-HTTP emitter,
TLS, RFC 9421 signature math over the wire, idempotency_key across retries,
body preservation through proxies, retry back-off against real 5xx. A
WebSocket push replacement ("Socket Mode") would validate a test-only
emitter and leave the production HTTP path ungraded — breaking parity.

The developer-laptop problem

Grading a remote agent from a laptop today requires:

  1. Manually standing up a tunnel (ngrok http, cloudflared tunnel, ...).
  2. Capturing its public URL.
  3. Passing it via --webhook-receiver-public-url.
  4. Tearing it down afterward.

--webhook-receiver-auto-tunnel (shipping in the companion PR) automates
steps 1–4 but still requires a tunnel binary installed locally and can't
help graders on networks that block arbitrary outbound connections or
whose corporate DNS blocks tunnel domains. The test-kit spec further says:

Operators MAY configure a tunnel as the proxy_url provider, but the
runner MUST NOT require a specific tunnel vendor.

A hosted rendezvous gives grading a first-party option that satisfies both
constraints — spec-compliant HTTP on the wire, zero tunnel-binary dependency
on the developer's machine.

Why not Slack-style Socket Mode

Already rejected in the reachability proposal (see
docs/proposals/webhook-grading-reachability.md § Why Socket Mode is the
wrong answer). TL;DR: Socket Mode is a delivery choice, not a conformance
harness. AdCP has exactly one delivery mechanism in production (HTTP POST)
and the conformance test surface has to exercise it end-to-end.

Design

Endpoint lifecycle

POST https://rendezvous.adcontextprotocol.org/v1/sessions
  body: { ttl_seconds: 1800 }  # optional, default 1800, max 7200
  → 201 { session_id, webhook_url, subscribe_url, expires_at }

GET  wss://rendezvous.adcontextprotocol.org/v1/sessions/{id}/subscribe
  Authorization: Bearer <session_token>
  → stream of delivery frames

DELETE https://rendezvous.adcontextprotocol.org/v1/sessions/{id}
  Authorization: Bearer <session_token>
  → 204

Session lifecycle:

  1. Mint. Grader POSTs to /v1/sessions. Rendezvous returns a webhook_url
    (public HTTPS, unguessable path), a subscribe_url (wss://), and a
    short-lived session_token (used to authorize subscription and deletion,
    not for inbound deliveries — those are path-secret-gated).
  2. Subscribe. Grader opens a WebSocket to subscribe_url and authenticates
    via Authorization: Bearer <session_token> during the upgrade handshake.
  3. Agent delivers. Agent under test POSTs to webhook_url. Rendezvous
    stores the delivery (body, headers, timestamp) and fans out a WebSocket
    frame to any subscribed grader.
  4. Respond. Grader sends a WebSocket reply frame back (status, headers,
    body). Rendezvous translates that into the HTTP response to the agent.
    Timeout: 10s (agent retry budget). If no reply, rendezvous returns 504.
  5. Expire. Session destroyed on grader disconnect, explicit DELETE, or
    TTL expiry. Subsequent deliveries to the stale webhook_url return 410.

Delivery frame format

{
  "type": "delivery",
  "delivery_id": "d_01J...",
  "received_at": "2026-04-21T12:34:56.789Z",
  "request": {
    "method": "POST",
    "path": "/",
    "headers": { "content-type": "application/json", "signature": "...", "signature-input": "...", "idempotency-key": "..." },
    "body_b64": "..."
  }
}

Reply frame:

{
  "type": "reply",
  "delivery_id": "d_01J...",
  "status": 200,
  "headers": { "content-type": "application/json" },
  "body_b64": "..."
}

Wire parity

Rendezvous is transparent to the agent: it receives a real HTTPS POST,
runs its real signature math, gets a real HTTP response. No agent-side code
changes. The loopback_mock ≡ proxy_url invariant holds because the agent
exercises the same emitter path it would for any production webhook delivery.

From the grader's perspective, the WebSocket subscription is an
out-of-band observation channel — equivalent to reading from the loopback
receiver's in-memory queue, just over the wire.

Authentication and secrets

  • Session token. Minted at POST /v1/sessions, returned once. Used by
    the grader only. Rotated per session. 32-byte random. Lifetime = session
    TTL. Not revocable mid-session — if exfiltrated, worst case is another
    party seeing the next ~30 minutes of inbound deliveries to that session.
  • Webhook URL. Path includes a 32-byte unguessable segment. No auth
    header required for inbound POSTs from agents (they sign with RFC 9421
    against whatever key the storyboard configured; rendezvous passes headers
    through unmodified).
  • No user accounts. Session-scoped tokens only. No persistent state
    about who created a session.

Rate-limiting and abuse

  • Rate limit on session creation by source IP + per-UA (e.g. 60/hour/IP).
  • Max active sessions per IP: 20. Prevents lockboxing the service as a
    generic tunnel-for-anything.
  • Max delivery body size: 1 MiB (same as the local receiver default).
  • Max WebSocket frames buffered per session: 1000 (backpressure threshold).
  • Deliveries to expired sessions return 410, not 404, to distinguish from
    typo'd URLs.

Durability

  • Deliveries are kept in Durable Object / Redis until either acknowledged
    (grader sends reply) or session expires, whichever is first.
  • No persistent storage past session TTL. No audit log of bodies.
  • Log lines retain session_id, delivery_id, timestamps, status code, and
    body size (not body) for 30 days for operational debugging.

Hosting

Target: Cloudflare Workers + Durable Objects, or Fly.io + Redis for the
routing table. Sizing: a full AdCP compliance run emits O(10) webhooks,
sessions last ~30 min, so one instance handles thousands of concurrent
graders at steady state. Cost budget: <$50/month at current grading volume.

CLI integration

Companion flag to --webhook-receiver-auto-tunnel:

adcp storyboard run <remote-agent> webhook-emission --webhook-receiver-rendezvous

Detection:

  1. If $ADCP_RENDEZVOUS_URL is set, use it (dogfooding + self-hosted).
  2. Otherwise default to https://rendezvous.adcontextprotocol.org.

On failure (unreachable, 5xx, TTL too short), exit 2 with actionable message
— no silent fallback to loopback (would produce misleading grades).

Alternatives considered

Cloudflare Quick Tunnels as a hosted option

cloudflared tunnel --url <local> already provides temporary public HTTPS
without an account. But it still requires the binary on PATH, still depends
on Cloudflare policy, and there's no grader-side WebSocket option — the
grader still hosts a listener on localhost, just with a public URL stapled
to it. Good for --webhook-receiver-auto-tunnel; doesn't replace rendezvous.

Per-grader-fingerprint DNS + self-hosted Caddy

Interesting but operational burden shifts to every grading operator. Rendezvous
centralizes the operational cost on the spec-steward side, which is the
right tradeoff — grading is a protocol-level concern.

WebRTC data channels

Sidesteps NAT cleanly but adds a signaling server anyway, and complicates
the agent side (now every agent needs WebRTC to emit webhooks). Kills wire
parity. Rejected.

Open questions

  1. Who owns rendezvous.adcontextprotocol.org? This RFC presumes the
    AdCP stewardship org (adcontextprotocol.org operators) takes operational
    responsibility. Needs explicit approval before implementation.
  2. Is session minting anonymous? Proposed yes, rate-limited by IP. Anonymous
    minting keeps grading frictionless, but production abuse may require adding
    a minimal "grader identity" (e.g. an API key tied to AdCP Verified).
  3. How do we test the rendezvous itself for conformance? The service is
    part of the compliance surface; need a storyboard or test-kit that
    validates rendezvous behavior end-to-end (probably rendezvous-runner.yaml
    alongside webhook-receiver-runner.yaml).
  4. Bidirectional signatures? The grader's reply could be signed too
    (rendezvous proxies the signature through). Default off; opt-in per session.

Rollout

Phase 1 — RFC acceptance. Land this doc. Get sign-off from AdCP
stewardship on operational ownership. Block on open question #1.

Phase 2 — reference implementation. services/rendezvous/ as a Cloudflare
Worker, deployed behind a staging subdomain. Conformance storyboard for the
rendezvous itself (rendezvous-runner.yaml). No CLI wiring yet.

Phase 3 — CLI integration. --webhook-receiver-rendezvous flag. Default
pointing at staging until production SLO established. Coexists with
--webhook-receiver-auto-tunnel; not a replacement.

Phase 4 — production. Flip default URL to
rendezvous.adcontextprotocol.org. Document in AdCP Verified grading flow.

Phase 1 should not block shipping --webhook-receiver-auto-tunnel, which
solves the laptop-with-tunnel-installed case today.

Non-goals

  • Replacing the local loopback_mock mode. That's the right default when
    the runner and agent share a host; rendezvous is strictly for the
    remote-agent / private-grader crossing.
  • Replacing --webhook-receiver-auto-tunnel for operators who already have
    tunnel binaries installed and don't want to depend on a hosted service.
  • Persistent webhook-history storage. Rendezvous is ephemeral by design.

Originally drafted in adcontextprotocol/adcp-client#681 as an in-repo RFC; promoted to an issue here per spec-repo convention.

Activity

  1. added this to the 3.1.0 milestone on Apr 21, 2026
  2. added
    rfc
    on Apr 21, 2026
  3. added
    claude-triaged
    on Apr 27, 2026
  4. bokelley commented on May 17, 2026

    @bokelley
    ContributorAuthor

    Closing — Socket Mode (PR #4007, #4082, docs at docs/building/verification/addie-socket-mode.mdx) shipped and covers the dev-loop case this RFC was motivated by. The wire-parity argument here was resolved by scoping Socket Mode to non-production / non-Verified — production conformance still requires real HTTPS endpoints, so the original concern doesn't apply to where Socket Mode actually runs.

    The remaining niche this RFC would address (grader-behind-NAT against a real production endpoint) is rare enough that hosting rendezvous.adcontextprotocol.org isn't worth the operational cost. Re-open if that scenario becomes a real adopter blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedrfc

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions