Skip to content

backends: the Claude MCP sampler's 48-byte name limit has no test that can fail #4424

Open

Description

@schlessera

Part of #4278. Found in the sixth review of PR #4327, which introduced it.

Context

  • The Claude MCP sampler's 48-byte per-name limit is at packages/ui-backend-claude/src/turn-stream.ts:103, and is documented in docs/integration-contract/wire.md.
  • The only oversized fixture name is 320 bytes (packages/ui-backend-claude/tests/backend.test.ts:71). The 192-byte budget at turn-stream.ts:105 rejects it without the per-name check, so removing the limit passes every assertion.

Scope

Test only: add names between 49 and about 150 bytes, ASCII and multi-byte. No product change.

Acceptance criteria

  • A 49-byte name is omitted and counted while a 48-byte name is sampled, with the total budget not the deciding factor.
  • The test fails when either length check at turn-stream.ts:103 is removed; the PR records the receipt.

Activity

  1. added
    type: test
    area: backends
    priority: p3
    agent-ready
    on Nov 21, 2026
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

    agent-readyarea: backendspriority: p3type: test

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions