Repository navigation
feat(android)!: require integrity_check on a JNI library integrity failure - #11624
Conversation
…ilure 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
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Medium impact] The PR appears safe to merge; both previous findings are addressed. SummaryRequires
No new actionable issues were found. Validation was source-based; tests were not rerun. Supersession could not be confirmed because GitHub access required authentication. Reviews (3) · Last reviewed commit: "test(android): check the JNI failure uni..." · Reviewed by Greptile |
… 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.
Summary
Refs #10510 (remaining JNI item, unblocked by #11505). A JNI library failure with
kind: "integrity"must nameintegrity_check; other kinds may not carry one. Also removes the stale historical clause from theelectron_semanticscomment.Problem and expected behavior
androidJniLibraryFailureSchemahadkind: z.string()and an optionalintegrity_check, documented as "Evidence recorded before this field has no check". Since #11505 everyArtifactReaderFailure("integrity", ...)must name its check at the type level, so an integrity failure without one is no longer a producer state; leaving the field optional kept an ambiguousundefinedfor consumers.Change and scope
{kind: "integrity", message, integrity_check}(required) and{kind: <any other>, message}(no check).jniReadFailure(cause)inAndroidJniLibraries.tsmaps a read failure once; an integrity failure without a check (only reachable through the explicit-undefinedrebuild constructor) throws an invariant violation instead of writing a record the schema would refuse.javascriptApplicationAnalysis.ts: theelectron_semanticscomment no longer says it may be absent "in evidence produced before this field existed" (earlier Evidence revisions are refused); absence still means unknown, which is a live state.TargetIdentityitems of [Design] Version Evidence bundles and own historical format compatibility in one place #10510 (W12).Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
src/domain/android/androidJniBindings.ts(schema) andsrc/android/AndroidJniLibraries.ts(the one producer of a read failure record).verify:advertised-schemasreports no catalog summary change.integritywithoutintegrity_check(written before feat(android): name the reader check on a JNI library's integrity failure #11191). Evidence of earlier format revisions is already refused.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): None.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/android/androidJniLibraries.test.ts"names the reader check when a selected library fails an integrity check": the checkpoint schema refuses{kind: "integrity"}without a check and{kind: "io", integrity_check}.androidJniBindings.tsthe test fails (1 failed, 11 passed): the old schema accepts both malformed records.For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/android/androidJniLibraries.test.ts src/domain/android/androidJniBindings.test.ts: 43 passed; with main's schema: 1 failed.npm run check:fast,npm run verify:advertised-schemas: passed.npx oxfmt; pre-commit and pre-push hooks ran.excludedValuesfor the other-kind branch (JSON Schema conversion checked with Ajv 2020; fails with the bare refine) and a test for the unnamed-check invariant (fails with the guard disabled).npm run test:focused -- tests/boundary/android/androidJniLibraries.test.ts: 13 passed;check:fastpassed.Compatibility, safety, and release
integritymust nameintegrity_check. Records written before feat(android): name the reader check on a JNI library's integrity failure #11191 that lack it no longer parse; recreate them.Author readiness
Human owner:
Before merge
type(scope): outcome.