SEP: say whether `durationMs` and `timeoutMs` are integers; SDKs disagree and do not interoperate
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
The mismatch lives in the SEP text at docs/sep.md (the durationMs and timeoutMs field types and the timeoutMs: 5000 example) and in the SDK wire types: go/sdk/interceptors/wire.go and csharp/sdk/src/ModelContextProtocol.Interceptors/Protocol/InvokeInterceptorRequestParams.cs and InterceptorResult.cs. Reproduce by serializing a Python float such as 5000.0 into those C# types. Done means the maintainers pick one integer-or-number option, the SEP text states it, and the SDKs agree on it. Because this needs a spec decision first, it is not a good first code change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The SEP types the millisecond fields as number (durationMs, timeoutMs), and every example uses whole numbers (for instance timeoutMs: 5000). The SDKs have read this differently, and the readings do not interoperate.
| SDK | timeoutMs |
durationMs |
|---|---|---|
| Go | int64 |
int64 |
| C# | int? |
long? |
| Python (#30) | float, sent as 5000.0 |
float, sent as e.g. 0.0072 |
Effect. System.Text.Json throws JsonException when it reads {"timeoutMs":5000.0} into int? or {"durationMs":0.0072} into long? (tested on .NET 10 with a class that uses the same field types). So a C# invoker cannot read any result from a Python interceptor server, and a C# server rejects any Python request that carries timeoutMs. Go's encoding/json is expected to reject the same values for int64; that was not run.
Options.
- Say in the SEP that both fields are integer milliseconds. This matches every example in the text and the Go and C# SDKs; Python would round on send.
- Keep
numberand say that fractional values are allowed. Go and C# would then need to accept them.
Either way, senders could emit integers and receivers could accept any JSON number, which would make the SDKs tolerant of each other regardless of which option is chosen.
Found while reviewing #30.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- C#
- Star
- 24
- Fork
- 16
- Merge trung bình
- 3 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/experimental-ext-interceptors
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
SEP: which severity decides blocking when `valid`, `severity` and `messages[].severity` disagree?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Python SDK: support `phase="both"` as decorator sugarCó thể làm lại được @olaservo đã nhận 101 ngày trước và không có pull request nào đang mở. Đang mởenhancement
modelcontextprotocol/experimental-ext-interceptors#37 · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
modelcontextprotocol/experimental-ext-interceptors#29 · 2 bình luận ·
-
Conformance plan for InterceptorĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
modelcontextprotocol/experimental-ext-interceptors#20 · 1 bình luận ·
Tất cả issue của modelcontextprotocol/experimental-ext-interceptors
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
fluentmigrator/fluentmigrator#2460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hand-to-AI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CactuseSecurity/firewall-orchestrator#5803 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Typed MINID rejects numeric thresholds with a leading plus sign accepted by Redis and ValkeyĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
DXF with empty names failsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 3 ngày
-
bug python
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
Maintainer thường phản hồi trong vòng 13 ngày