Repository navigation
feat(ffi): Kotlin runtime helpers take underscore-prefixed names - #807
Merged
Merged
Conversation
Quest-Claim: 4ab13702b949afe1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' `_<Name>` aliases Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 14, 2026 11:00
There was a problem hiding this comment.
ℹ️ No critical issues — two stale doc comments inline.
Reviewed changes
I reviewed the rename of Kotlin's runtime helpers to __-prefixed names, their removal from TAKEN, and the new Handle fixture.
- Runtime rename: every top-level class in
ffi/runtime/rt.ktnow starts with__, and so does_Native.__Failed. Every glue template inffi/src/kotlin.rsuses the new names. A grep found no remaining unqualified or_Native.-qualified references to the old names, andjni.rslooks these classes up by method only, with no class-name strings. TAKENshrinks: the helper names are gone fromTAKEN.StartSeekableand the Kotlin builtins stay.- Guard test:
runtime_classes_prefixednow requires a__prefix on top-level runtime classes, in place of the oldTAKENmembership check. - Fixture: an exported
Handleobject, with a sync and an async factory, exercised fromtests/api.ktunder its own name.
claude-opus-5-5 | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed what changed since the prior Pullfrog review at ba6964d.
- Fixture comment:
ffi/fixtures/api/src/lib.rsnow says the runtime's helpers take a leading__, matching the actual prefix. TAKENdoc:ffi/src/kotlin.rsnow explains that the__helpers need no place inTAKEN, because neither an exported type's name nor its_<Name>alias has that prefix. The wrap width is fixed too.
Both earlier threads are addressed and resolved.
claude-sonnet-5-5 | 𝕏
kixelated
added a commit
that referenced
this pull request
Nov 14, 2026
Main's #808 makes Score an opaque value, so the refusal fixtures hold a new checked Copy handle, Mark. Its handed-back `&mut self` calls (#808) now pass a status, which `Handed` places last; `Score::note(&Mark)` covers it. #807's underscore names extend to `__Close` and `__Refused`, and Swift's moq program drops the `try`s #808's values made unneeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Kotlin's runtime helper classes, which
_Nativenests, now take a leading__(__Reader,__Writer,__Handle,__Cleanup,__Returned,__Drop,__Lent,__Free,__Signal,__Pollable,__Ready,__Pending,__Eq,__Failed). This follows #777's naming for_Native. They're gone fromTAKEN, so an exported type named like one keeps its name and no longer gets a trailing_.ffi/runtime/rt.ktand the glue templates inffi/src/kotlin.rsuse the new names.TAKENnow requires each one to start with__(runtime_classes_prefixed).Handle, andtests/api.ktcallsHandle.new(5u)and the asyncHandle.later(6u)under that name. The async case covers a factory return inside_Native.Decisions
__, not_. A single_would clash with feat(ffi): Kotlin variant classes never shadow a name their enum uses #777's_<Name>import aliases for exported types, which Codex caught in review round 1.StartSeekablestays inTAKENwithout a prefix. It's a public interface that users implement, likeWakerandBytes, not an internal helper.Handle, an object. It's the helper whose name clashed most inside the glue.Waiting
_Xto__X), so it lands only on your pick. Recommendation: merge; CI passes and Codex's review of 7549a88 found nothing.Models
Size: S
Implementer: Claude, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, S)
🤖 Generated with Claude Code
(Written by Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 7549a88
Base: origin/main at 639d8bf
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:
01a1db2a-3afc-7603-87c2-1b314be90aed, round 1Score: 9/10,
The helper renames are consistent across the Kotlin runtime and generator, and the fixture covers the formerly reserved Handle name; no actionable defects were found by inspection, though builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Summary by CodeRabbit
New Features
Improvements
__prefix, reducing conflicts with exported Kotlin names.Tests
Summary by CodeRabbit
HandleAPI with a count getter and synchronous and asynchronous constructors.Handleconstructors preserve the supplied count.