feat(android)!: require integrity_check on a JNI library integrity failure (#11624)

* feat(android)!: require integrity_check on a JNI library integrity failure

A JNI library failure is now a tagged union: kind integrity carries a
required integrity_check, and no other kind carries one. The producer builds
it from the reader failure, whose integrity constructor requires the check
since #11505. Also drop the stale "evidence produced before this field"
clause from the electron_semantics comment; earlier Evidence revisions are
refused.

BREAKING CHANGE: Android JNI Evidence whose library failure has kind
"integrity" must name integrity_check. Records written before #11191 that
lack it no longer parse; recreate them.

Refs #10510

* test(android): check the JNI failure union in its JSON Schema and the unnamed-check refusal

Exclude integrity from the other failure kinds with excludedValues, so the
JSON Schema conversion declares the exclusion that a bare refine dropped.
The test checks the converted schema against the same valid and malformed
records, and drives an integrity read failure with an explicitly undefined
check: the read is refused, the reader is closed and every checkpoint parses.
This commit is contained in:
morluto authored and GitHub committed 2026-11-16 08:38:29 +08:00
1 parent 18a47ee5aa
commit 3f4953bfae
4 files changed
+105 -24

No files matched your search

@@ -67,10 +67,9 @@ const electronBoundarySummarySchema = z.strictObject({
* sources were not fully examined or reported, for example after the result
* budget ran out; counts from those sources are unknown, not zero.
*
* Absent when no retained fact names an Electron module, or in evidence
* produced before this field existed. Absence is unknown rather than proof
* that the application has no Electron surface: unread sources, failed
* analysis, and dynamic module names can hide one.
* Absent when no retained fact names an Electron module. Absence is unknown
* rather than proof that the application has no Electron surface: unread
* sources, failed analysis, and dynamic module names can hide one.
*/
electron_semantics: z.enum(["recovered", "partial", "empty"]).exactOptional(),
});