@@ -217,3 +217,49 @@ down the middle. `010` is now smaller than it was three rounds ago. |
217 | 217 | Added to the open follow-ups: the `NGHTTP2_CANCEL` zero-terminal path |
218 | 218 | (`live-transport.ts:619` throws, `cursor.ts:181` swallows), confirmed by a fresh |
219 | 219 | probe to produce zero adapter events. Separate defect, separate unit. |
| 220 | + |
| 221 | +## Implementation status (2026-08-17) |
| 222 | + |
| 223 | +| Phase | Outcome | Evidence | |
| 224 | +|-------|---------|----------| |
| 225 | +| `010` clean-EOF terminal | **SHIPPED** `54f68daf5` | 7 audit rounds; red-before-green proven; lidge 608 pass/0 fail | |
| 226 | +| `020` tool-result images | **SHIPPED** `878b067e8..cc906b0fc` | 5 review rounds; byte-equality with `4e167fd38` verified twice; lidge 624 pass/0 fail | |
| 227 | +| `030` xai apply_patch | **NOT REPRODUCED** | live probe: both `xai/grok-4.6` and `cursor/grok-4.6` used `apply_patch` successfully | |
| 228 | + |
| 229 | +### What shipped for 010 |
| 230 | + |
| 231 | +A framed Cursor stream that ends with no terminal while a client tool call is open |
| 232 | +now fails with `CursorStreamTruncatedError` instead of settling as success. Before |
| 233 | +this, the deferred tool call emitted nothing at all: streaming degraded to |
| 234 | +`response.incomplete`, and the non-streaming path returned `"completed"` for a turn |
| 235 | +whose tool call had silently vanished. `expectedClose` (client-tool suspend) and an |
| 236 | +already-emitted terminal stay graceful. |
| 237 | + |
| 238 | +### What shipped for 020 |
| 239 | + |
| 240 | +Tool-result images reach Cursor as real `McpImageContent`. The final design differs |
| 241 | +from the original plan in three ways, each forced by a review that proved the plan |
| 242 | +would have broken a working request: |
| 243 | + |
| 244 | +1. **Bounding is post-serialization, not a byte budget.** A step is one blob shared |
| 245 | + with the call's arguments, text, and framing, so `toolCallStep` serializes and |
| 246 | + re-serializes with fewer images (oldest dropped first) until it fits the live |
| 247 | + `cursorBlobMaxEntryBytes()`. |
| 248 | +2. **Placeholders are capped to the legacy string length.** A longer replacement text |
| 249 | + could itself push a previously admissible step past the ceiling. |
| 250 | +3. **Consecutive text is newline-joined into one item**, as the legacy encoding did. |
| 251 | + Emitting one protobuf item per part added framing that overflowed at the boundary. |
| 252 | + |
| 253 | +The net invariant, verified by two independent reviewers across 300 adversarial |
| 254 | +probes: **a tool result with no images serializes byte-identically to the |
| 255 | +pre-feature encoding.** |
| 256 | + |
| 257 | +### Why 030 did not ship |
| 258 | + |
| 259 | +A live probe spawned `xai/grok-4.6` and `cursor/grok-4.6` as subagents on the same |
| 260 | +edit task. Both edited the file and both reported using `apply_patch`. The symptom |
| 261 | +this phase was written to fix did not reproduce, so no code was written. The |
| 262 | +measurement cycle in `030` stands, and the phase closes NOOP unless the user |
| 263 | +supplies a failing case. Note the probe did not isolate the top-level freeform |
| 264 | +surface — the cursor agent reached `apply_patch` through code mode — so this is |
| 265 | +"not reproduced", not "proven absent". |