$ the-wire · showcase
buffa fixes double-drop, unset ProtoJSON null, and re-measures benchmarks
By RepoJournal · Filed · About Anthropic
buffa shipped three correctness fixes today: a double-drop panic in OwnedView, an unsafe early length publish, and ProtoJSON null now treated as unset for extensions.
buffa fixed a double-drop in OwnedView::into_bytes [1]: if V::drop panicked, the unwind dropped self and impl Drop for OwnedView ran ManuallyDrop::drop again. The fix stores the view behind MaybeDangling. Separately, merge_bytes, merge_string, decode_bytes, and decode_string published the destination length before writing the bytes [2]; if a caller-supplied Buf panicked part-way through, the vec exposed unwritten bytes. Those functions now publish length only after the wire bytes are copied. buffa also treats ProtoJSON null on a registered extension key as an absent field [3], applied once at extension dispatch so every singular and repeated codec gets the rule. Extension registry lookups by (extendee, number) no longer allocate a temporary String [4], and the same borrowed-key layout applies to both JSON and text registries. The performance history added v0.9.0 [5] by re-measuring the whole series, since every committed run predates `-align-loops=64` and the README requires it. Meanwhile, the changelog entries for the SDK beta files/skills GA-shape change were expanded in both anthropic-sdk-python [6] and anthropic-sdk-go [7], with migration guide links. claude-agent-sdk-python released v0.2.149 [8], which updates the bundled Claude CLI to 2.1.252.
Action items
- → Review buffa code that uses OwnedView::into_bytes or extension ProtoJSON null handling anthropics/buffa [plan]
- → Update to claude-agent-sdk-python v0.2.149 to get the bundled CLI 2.1.252 anthropics/claude-agent-sdk-python [plan]
References
- [1] view: drop OwnedView's Drop impl and store the view behind MaybeDangling ↗ anthropics/buffa
- [2] Publish Vec length only after the wire bytes are copied ↗ anthropics/buffa
- [3] extensions: treat ProtoJSON null as unset ↗ anthropics/buffa
- [4] perf: avoid allocating extension registry lookup keys ↗ anthropics/buffa
- [5] benchmarks/history: re-measure the series 1-up and add v0.9.0 ↗ anthropics/buffa
- [6] docs(changelog): detail the beta files/skills GA-shape change ↗ anthropics/anthropic-sdk-python
- [7] docs(changelog): detail the beta files/skills GA-shape change ↗ anthropics/anthropic-sdk-go
- [8] v0.2.149 ↗ anthropics/claude-agent-sdk-python