Skip to content

docs(bridge): trust-boundary + multi-tenant adopter responsibility#1779

Merged
bokelley merged 2 commits into
mainfrom
bokelley/bridge-jsdoc-trust-boundary
May 16, 2026
Merged

docs(bridge): trust-boundary + multi-tenant adopter responsibility#1779
bokelley merged 2 commits into
mainfrom
bokelley/bridge-jsdoc-trust-boundary

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • Adds two paragraphs to the top-of-file JSDoc on src/lib/server/test-controller-bridge.ts:
    1. Scope of verification — storyboard pass via the bridge proves wire conformance against fixture data, NOT adapter health against the real upstream. Cross-references Storyboard runner: surface bridge participation in run record #1775.
    2. Adopter responsibilities — names resolveAccount as the trust boundary (production bindings MUST configure it; otherwise the request-signal check is the only line of defense) and multi-tenant keying as the adopter's job (SDK does no defensive cross-check).
  • No code change.

Background

After #1753 + phases #1759/#1761/#1772 grew the bridge surface to 13 tools on main, the four-expert review of (now-closed) #1754 found that the public-surface JSDoc didn't name either trust pattern. Security review flagged the ctx.account === undefined permissive branch in the dispatcher gate at src/lib/server/create-adcp-server.ts:3913-3917 as a real adopter footgun — adopters who deploy the bridge to a production binding without resolveAccount configured can have buyers stamp context.sandbox:true and trigger the merge.

The patterns themselves are intentional (storyboard runners often have no account scoping); the gap was naming them on the public surface so adopters don't deploy through them by accident.

Test plan

  • tsc --noEmit clean (docs-only change).
  • prettier --check clean.
  • Diff is +43/-4 in test-controller-bridge.ts, all inside the leading /** ... */ block.

…g as adopter responsibility

Adds two paragraphs to the top-of-file JSDoc on TestControllerBridge:

1. Scope of verification — a storyboard pass through this bridge proves
   wire conformance against fixture data, not adapter health against
   the real upstream. Sellers must still exercise adapters against a
   live-OAuth sandbox runner separately. Cross-references the
   runner-visible-bridge-marker ask at #1775.

2. Adopter responsibilities — names two patterns the SDK can't enforce:
   (a) resolveAccount is the trust boundary; production bindings MUST
   configure it or the request-signal check is the only line of defense,
   because the dispatcher gate falls through to permissive when
   ctx.account === undefined. (b) Multi-tenant keying is the adopter's
   job; the SDK does no defensive cross-check between fixture-entry
   account IDs and the resolved ctx.account.

No code change. Security-review-driven during the post-merge review of
#1754 — main shipped the bridge surface (#1753 + phases #1759/#1761/
#1772) but no public-surface warning about either trust pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- "bypassed by the post-handler merge" → "shadowed by the post-handler
  merge" (more accurate: the upstream is called, then its response is
  overridden).
- "request-signal check is the only line of defense" → "buyer-supplied
  sandbox marker is the only gate" (flatter, more accurate).
- Drop the "Snap, Meta, TikTok, Google Ads" brand list → "social / search
  / programmatic inventory APIs" (illustrative without pulling toward a
  specific adopter or violating fictional-names-only convention).
- Echo a one-paragraph trust-boundary note on createAdcpServer's
  testController config field — that's where a wiring author lands when
  they hit autocomplete, and the last chance to warn before
  resolveAccount gets omitted. Cross-references the top-of-file JSDoc
  on TestControllerBridge.

All four changes from the docs-expert review of PR #1779. No code
behavior change; pure JSDoc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit cfa6a0f into main May 16, 2026
10 checks passed
bokelley added a commit that referenced this pull request May 16, 2026
…roxy sellers only (#1787)

Names the audience explicitly so state-local sellers don't wire the bridge
unnecessarily, and upstream-proxy sellers know to wire it. Cross-links the
upstream taxonomy proposal at adcontextprotocol/adcp#4593 and the leaderboard
policy at #1782.

Also collapses a duplicate trust-boundary blurb (added in #1779 alongside the
security-review note in #1786) into a single coherent section.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot mentioned this pull request May 16, 2026
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