From 796a3852a2ca9e1477ccb28bd6c7823a48be09f5 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Sun, 11 Oct 2026 15:29:44 +0800 Subject: [PATCH] test(android): inspect probe diagnostics without public transport API Use a test-owned MethodChannel with the explicit wire contract version to capture malformed native probe metadata. Preserve the diagnostic fallback after raw transport methods were removed from the public runtime facade. Validation: host static analysis passed. The Android device regression was not run on this macOS host. --- integration_test/android_real_media_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/integration_test/android_real_media_test.dart b/integration_test/android_real_media_test.dart index e9b5bb2..fea76be 100644 --- a/integration_test/android_real_media_test.dart +++ b/integration_test/android_real_media_test.dart @@ -22,6 +22,7 @@ import 'package:cutdex_sdk/timeline/engine.dart'; import 'package:cutdex_sdk/timeline/model.dart'; import 'package:drift/native.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; @@ -215,7 +216,12 @@ void main() { try { info = await runtime.probe(media); } catch (_) { - final raw = await runtime.invoke('probe', {'media': media.toMap()}); + // This diagnostic test deliberately inspects the native wire response. + final raw = await const MethodChannel('cutdex_runtime') + .invokeMethod('probe', { + 'contractVersion': 1, + 'media': media.toMap(), + }); result['rawProbeMetadata'] = raw; // Preserve the actual wire-contract failure in the device report. MediaInfo.fromMap(raw! as Map);