Files
amethyst/benchmark
Claude 420d999aa2 fix(r8): remove the TypeReference pattern everywhere, not just where it crashed
00f3fa38 fixed JacksonMapper's JavaTypes and flagged the rest: "the same
reflective pattern still backs JacksonMapper.fromJsonTo<T>, JsonMapperNip55
(NIP-55) and the NIP-46 bunker path ... untested and exposed the same way." All
three are the same <clinit>-poisoning crash waiting for a device that has an
external signer installed, or a bunker login. This removes the pattern from the
codebase instead of from one file.

  * JacksonMapper.fromJsonTo<T> now reads with T::class.java. Erasure costs
    nothing here: checkRegistered() has already limited T to the ten registered
    classes and each is answered by a StdDeserializer bound to that exact Class,
    so Jackson never infers a type argument. This is the NIP-46 path —
    NostrConnectEvent, RemoteSignerManager, NostrConnectLoginUseCase.
  * JsonMapperNip55's reified fromJsonTo is replaced by four named entry points
    over precomputed JavaTypes. T::class.java could not stand in for all of them:
    List<IntentResult> erases to List and every element comes back a
    LinkedHashMap. constructCollectionType keeps the element type.
  * jacksonTypeRefOf() is deleted. I added it in e7d3bcdc as the one thing plain
    databind had no equivalent of; it turns out to be the one thing R8 full mode
    will not let us have. Nothing can reach for it again.
  * The three instrumented tests that used it read through
    JacksonMapper.eventListTypeInstance instead.

Also adds zxingcpp to the reflection contract. main's `-keep class zxingcpp.**`
arrived in this merge with no contract line, and it is the same JNI-by-name
mechanism as ArtiNative: the .so exports
Java_zxingcpp_BarcodeReader_readYBuffer, and a rename fails silently with no
build error — the QR scanner simply never starts.

Verified: 25/25 contract checks on a fresh playRelease assemble, and
`grep -c TypeReference mapping.txt` is 0 — the class is shrunk out of the
shipped DEX entirely, so nothing is left to construct one. Full ./gradlew test
green, and all five affected source sets compile, instrumented ones included.

Still unexercised on a device: NIP-55 signing and the NIP-46 bunker login. The
crash mechanism is gone from the build, but these paths have never run minified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DEoxktEZyTrAS33vVZBiwm
2026-09-20 17:16:36 +00:00
..
2026-02-08 16:33:39 -05:00