Confirmed response-formatting defect
Reviewed master at 886c36d8ebe861aa987059a1744d45b78797baae (v4.7.0). Suggested priority: P3.
The response chunker updates code-fence state before deciding whether the incoming line fits. If a closing fence triggers a split, it considers the block already closed, sends the old chunk without a closing fence, and places the original closing fence at the start of the new chunk. Subsequent ordinary prose is then formatted as code.
Source: ResponseDelivery.send_chunked.
Isolated reproduction
Call the real chunker with a fake message/transport and this text:
text = "```python\n" + "x" * 1977 + "\n```\nnormal prose after code block"
Observed:
chunk lengths: [1988, 34]
fence counts: [1, 1]
last chunk: '```\nnormal prose after code block\n'
Both outgoing messages have unmatched fences. Independently reproduced twice without sending Discord messages. Agent's focused regression selection: 104 passed.
Acceptance criteria
- Compute the outgoing chunk's fence state before consuming the next logical line.
- Close/reopen continuations consistently, retaining the language only while inside the original code block.
- Test closing-fence-at-boundary, opening-fence-at-boundary, long code lines and following prose.
- Preserve all content and Discord message-size limits.
This is a formatting defect, not claimed content loss or send failure. The issue was also mentioned as deferred in an older review; no matching existing repository issue was found. No source changes were made.
Confirmed response-formatting defect
Reviewed
masterat886c36d8ebe861aa987059a1744d45b78797baae(v4.7.0). Suggested priority: P3.The response chunker updates code-fence state before deciding whether the incoming line fits. If a closing fence triggers a split, it considers the block already closed, sends the old chunk without a closing fence, and places the original closing fence at the start of the new chunk. Subsequent ordinary prose is then formatted as code.
Source:
ResponseDelivery.send_chunked.Isolated reproduction
Call the real chunker with a fake message/transport and this text:
Observed:
Both outgoing messages have unmatched fences. Independently reproduced twice without sending Discord messages. Agent's focused regression selection: 104 passed.
Acceptance criteria
This is a formatting defect, not claimed content loss or send failure. The issue was also mentioned as deferred in an older review; no matching existing repository issue was found. No source changes were made.