Commit 8874aab
committed
tighten to_json adapter_name + exercise warm-up path in test
CodeRabbit follow-up on 8dd34d1:
- to_json(): switch adapter_name fallback from truthy to explicit
`is not None`. This matches upstream's `??` semantics (preserve
stored "" instead of rewriting it) AND avoids triggering a lazy
`self.adapter.name` resolution when `_adapter_name` was set to ""
but no `_adapter` is bound — that combination would raise
RuntimeError from the adapter property.
- test_should_not_edit_placeholder_to_empty_during_llm_warmup:
the original stream `["Hello world"]` never actually exercised
the empty-edit guard path — by the time the edit loop fired the
buffer already had real content. Now the stream yields a bare
whitespace chunk, pauses long enough for the (10 ms) edit loop
to fire, then yields the real content. A regression that emits
empty intermediate edits would now fail here.
https://claude.ai/code/session_01XE1bMoQ5BjCvgi1iLGKKhG1 parent 8dd34d1 commit 8874aab
2 files changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
748 | 751 | | |
749 | 752 | | |
750 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
455 | 464 | | |
456 | 465 | | |
457 | 466 | | |
| |||
0 commit comments