Uh oh!
There was an error while loading. Please reload this page.
docs(protocol): correct depth-refusal contract to match live router behavior - #65
Conversation
…ehavior Investigation surfaced two doc inaccuracies the freshly-merged spec doc inherited from my own assumption rather than measurement: 1. Refusal status code is 429 + body code 'bridge_depth_exceeded' (live in tangle-router app/api/chat/route.ts:1390-1410), not the 413 the spec claimed. Updated header table + invariant #5 accordingly. 2. The spec read as fully shipped end-to-end. Added an Implementation status table making the per-layer reality explicit: - agent-runtime emits all six headers (this is the work that shipped in #64). - tangle-router enforces depth + forwards auth (already live). - cli-bridge forwards authorization to sandbox backends (already live); does not enforce depth locally — inherits via router. - agent-gateway middleware: NOT YET. Deferred to a real consumer. No code changes. The agent-runtime headers builders and emitters are already correct (they emit the header; refusal is the gateway's job). The doc was the only thing out of step.
tangletools
left a comment
There was a problem hiding this comment.
APPROVE. Doc-only fix, 17 lines, no code changes. Verified the three factual claims against source:
tangle-router/app/api/chat/route.ts:1390-1410does refuse with HTTP 429 +bridge_depth_exceeded. ✓cli-bridge/src/routes/chat-completions.ts:190+212does readx-tangle-forwarded-authorizationand thread it to backends. ✓agent-gateway/src/has zerox-tangle-forwarded-*handling. ✓ (true negative)
Approving without further reservations. The new Implementation status table is exactly the kind of "what's actually shipped vs what the spec demands of conformant implementations" delineation that keeps a normative spec from rotting into vaporware.
Senior staff principal call to NOT build the original two follow-ups is the right one: cli-bridge depth is redundant with router-side enforcement, agent-gateway middleware has no consumer today. Both tracked on ops board for when a consumer surfaces.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Doc-only correction to the protocol spec that shipped in #64. Investigation of the proposed follow-ups (`agent-gateway` middleware, `cli-bridge` propagation) surfaced two factual inaccuracies I'd written into the spec from assumption rather than measurement.
What I found while investigating the follow-ups
Doc bugs this fixes
Decision not to build the originally-named follow-ups (yet)
After reading the actual code:
Both are tracked on the ops board for when a real consumer materializes (a third-party agent-gateway deployment, or an agent-to-agent call that bypasses tangle-router).
What's NOT in this PR
This is a 17-line doc fix.
Test plan