You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 340b104
Browse filesBrowse the repository at this point in the historyBrowse files
fix(nav3): Verify the probe's encoded output to catch silent argument corruption
The property-encoding compatibility probe ran the encoder but ignored its output,
so a binary-incompatible kotlinx.serialization version that links and runs yet
mis-encodes under R8 (observed renaming {id=1} to {value=1} and dropping a route
as a duplicate key) passed the probe, and the mapper then recorded wrong
arguments.
The probe now compares the encoded ProbeClass fixture to its known-good output
and disables property encoding when they differ, keeping names. The mismatch
signal carries only a fixed message, never route data.
Copy file name to clipboardExpand all lines: sentry-android-navigation3/src/main/kotlin/io/sentry/compose/navigation3/internal/backstack/kotlinx/KotlinxCompatibilityProbe.kt
Copy file name to clipboardExpand all lines: sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/kotlinx/KotlinxBackStackEntryMapperProbeTest.kt
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -266,6 +266,34 @@ class KotlinxBackStackEntryMapperProbeTest {
Copy file name to clipboardExpand all lines: sentry-android-navigation3/src/test/kotlin/io/sentry/compose/navigation3/internal/backstack/kotlinx/KotlinxCompatibilityProbeTest.kt
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,26 @@ class KotlinxCompatibilityProbeTest {
27
27
28
28
@Test
29
29
fun`encoderIncompatibility() - returns null for a compatible kotlinx serialization version`() {
30
+
// A compatible version encodes the probe fixture to its expected output, so the probe's output
31
+
// verification matches and it reports no incompatibility.
30
32
val error =KotlinxCompatibilityProbe.encoderIncompatibility()
31
33
32
34
assertThat(error).isNull()
33
35
}
34
36
37
+
@Test
38
+
fun`EncoderProducedUnexpectedOutput is a RuntimeException with a message that leaks no route data`() {
0 commit comments