Commit 5ca5f32
fix(mcp): address QA round 1 findings
- Use O_NONBLOCK + clearerr() in Phase 2 fgetc probe to preserve the
60s idle eviction timeout when both kernel fd and FILE* buffer are
empty (fgetc on a blocking fd would otherwise block indefinitely,
bypassing Phase 3 poll timeout and preventing cbm_mcp_server_evict_idle)
- Add #include <fcntl.h> for fcntl()/O_NONBLOCK
- Fix comment: "two-phase" → "three-phase" (implementation has 3 phases)
- Improve Python integration test: verify id:1 (initialize) and id:2
(tools/list) response IDs are both present, not just "tools" substring
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 16552be commit 5ca5f32
2 files changed
Lines changed: 42 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
68 | 88 | | |
69 | | - | |
| 89 | + | |
70 | 90 | | |
71 | 91 | | |
72 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
2383 | 2384 | | |
2384 | 2385 | | |
2385 | 2386 | | |
2386 | | - | |
| 2387 | + | |
2387 | 2388 | | |
2388 | 2389 | | |
2389 | 2390 | | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
2390 | 2395 | | |
2391 | 2396 | | |
2392 | 2397 | | |
| |||
2414 | 2419 | | |
2415 | 2420 | | |
2416 | 2421 | | |
2417 | | - | |
2418 | | - | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2419 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
2420 | 2435 | | |
2421 | 2436 | | |
2422 | 2437 | | |
2423 | 2438 | | |
2424 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
2425 | 2442 | | |
2426 | 2443 | | |
2427 | 2444 | | |
| |||
0 commit comments