Skip to content

feat(android): name the reader check on a JNI library's integrity failure - #11191

Merged
morluto merged 2 commits into
mainfrom
feat/jni-failure-integrity-check
Nov 15, 2026
Merged

morluto merged 2 commits into
mainfrom
feat/jni-failure-integrity-check

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #10508 (Phase 6.1). A selected JNI library that fails a reader integrity check now records which check in its failure, instead of only the message.

Problem and expected behavior

Change and scope

  • Optional integrity_check on the JNI library failure schema, an enum of ARTIFACT_INTEGRITY_CHECKS, which now also defines the ArtifactIntegrityCheck type.
  • Not included: other per-item failure records that copy only a message.

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

  • Semantic owner and earliest changed stage: ArtifactReaderFailure.integrityCheck (set by the ZIP reader and readAndroidJniLibraries) is the owner; readAndroidJniLibraries now copies it into the per-library failure record. ARTIFACT_INTEGRITY_CHECKS (domain/artifactOperationError.ts) becomes the one list the type and the Evidence schema derive from; one androidJniLibraryFailureSchema replaces two identical inline failure schemas
  • Contribution scope fit and linked maintainer decision: Phase 6.1 ([Design] Assert structured remediation facts instead of guidance prose #10508); follow-up from the feat(artifacts): name the integrity check for stable, selected and provider artifact sources #11129 review (the JNI record discarded the check)
  • CLI and MCP/tool-catalog contract: additive: inspect_android_jni_bindings library failure gains optional integrity_check; the compact advertised profile digest is unchanged
  • Provider, bridge, target-format, or platform compatibility: none
  • Evidence, artifact, provenance, or reconstruction contract: additive optional Evidence field; records without it still parse and mean the check is unknown
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; 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.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/android/androidJniLibraries.test.ts: "names the reader check when a selected library fails an integrity check" (the reader refuses altered entry metadata as entry-metadata; the checkpoint schema retains the check)
  • Base reproduction or other evidence: with the source reverted to base, the new test fails (1 failed, 11 passed)
  • User-visible CLI/MCP output (if applicable): failure: {"kind": "integrity", "message": "...", "integrity_check": "entry-metadata"}
  • Remaining proof gaps: the declared-size path inside readAndroidJniLibraries is not separately exercised (the reader's own entry check fires first for an altered entry)

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • command — result

Compatibility, safety, and release

  • Breaking changes or migration steps: none (optional additive field)
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T14:08:56.541662Z
We couldn’t complete this review. Comment @codex review to try again.
52b9f53 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Adds optional failure.integrity_check to selected JNI library failures.

  • JNI library failures now name the reader's integrity check.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into feat/jni-failur..." · Reviewed by Greptile

@morluto
morluto merged commit f1366f1 into main Nov 15, 2026
15 checks passed
@morluto
morluto deleted the feat/jni-failure-integrity-check branch November 15, 2026 19:57
morluto added a commit that referenced this pull request Nov 16, 2026
…ilure (#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.
@morluto morluto added enhancement New feature or request area: runtime Process capture and runtime observation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant