fix(android): bound helper output and verify installed artifacts

TH
16m ago
+896-393

Summary

Bound Android helper XML, verify installed helper APK bytes before reuse, and reject untrusted higher versions. Document clipping and refuse fill success when text is incomplete. This is the Android layer of the Daybreak remediation stack, based on #5244. Review feedback also added explicit budget reserves and tests for admission, deadlines, and diagnostic redaction.

Before / after

  • Before: A modified installed APK could pass a cached admission. After: Each admission checks installed version and digest; mismatched bytes trigger repair.
  • Before: A newer untrusted APK could pass by version alone. After: admission fails with android_helper_newer_untrusted.
  • Before: A partial XML text value could appear complete. After: the helper marks clipped text or omits the partial attribute; the host refuses fill success on text_clipped.

Validation

Head: af209edb82. The changed TypeScript test files passed 97/97 locally, with a separate 14/14 fill-verification rerun; the final IME fixture test passed 15/15. Rebase range-diff showed 17/17 own commits patch-identical onto #5244. The reason-table test passed (5/5). The fill-verification file passed 14/14 with and without coverage instrumentation; the single-file coverage report cannot meet the repository-wide threshold. Native Java tests and new-head CI remain pending. No live Android run was made because device ownership could not be established. An unreadable installed APK may reinstall on each admission. Signing rotation remains in #5260.