Repository navigation
Delete the Kotlin callback lent-return quest: no callback can return lent bytes - #927
Conversation
Quest-Claim: c52ccc9f11014f8f
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…lent bytes The exporter refuses a closure or callback that returns Bytes, a Vec<u8>, or any record, so the window the quest names has no consumer. fixtures/reject's gather holds the refusal. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — the PR's claim (no callback or closure signature can return lent Bytes) is backed by the existing gather rejection in ffi/fixtures/reject, so deleting the quest is the right call.
Reviewed changes
- Quest deleted — removes
quest/m1/ffi-kotlin-callback-lent.md; no other file references it.
claude-sonnet-5-5 | 𝕏

Deletes quest/m1/ffi-kotlin-callback-lent.md: its problem is not reachable, so there is nothing to fix.
Summary
The quest feared a Kotlin closure or callback returning Rust's lent
Bytes, which the GC could free between__Writer.use { ...; finish() }returning and Rust reading the encoding. No such return can exist:foreign_returninffi/src/collect.rs; anything else is acallback signaturerefusal).String, or aCopyopaque value or anOptionof one, or aResultof those with aStringerror. ACopyvalue cannot holdBytes, so the writerlower_retbuilds for it never gets akeptowner.ffi/fixtures/reject'sgather(impl Fn() -> Vec<u8>) already pins the refusal:closure signature std::vec::Vec<u8>.Reproduced it instead of assuming: a fixture
supplied(count, impl Fn(u32) -> Packet)(a record holdingBytes) to returntokenBytes(..)over 1 KiB under four collector threads fails at export withcannot export fn supplied: closure signature Packet, and a callback trait method returningPacketlands in the census ascallback signature supply. Those fixture changes are not kept: the existinggatherrejection covers the refusal.The old limit dates from the exporter spike (#41), so CodeRabbit's finding on #876 was against a path no input reaches;
release'sreachabilityFencewindow is moot for the same reason. The argument path, where a JNI call keeps__Lentalive, is unchanged.Public API and wire impact
None.
Validation
No behavior to exercise: only a quest file is deleted.
quest check --base origin/mainpasses. The reproduction above ran throughjust ffi test --test fixtures api_kotlinon a throwaway fixture, then reverted.Decisions
Models
Size: S
Implementer: Claude, claude-sonnet-5-5, unknown effort (arm B)
(Written by Sonnet 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 2a85fd3
Base: origin/main at 24ff182
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f9d7-5247-7331-88b0-0c198503c5de, round 1Score: 10/10,
The deletion removes only an obsolete quest document, changes no executable code or tests, and leaves no references to the deleted file.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1f9d7-5247-7d33-a2f5-c848453162fa, round 1Score: 10/10,
The scoped diff only deletes a quest document, changes no implementation or tests, and introduces no demonstrable behavioral defect.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Summary by CodeRabbit