Repository navigation
feat(android): pin jadx-headless-mcp 0.8.0 - #7772
Conversation
Codex Review SummaryThis 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. |
[Medium impact] The PR appears safe to merge, with no new actionable findings. SummaryPins
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Release["JADX_RELEASE: 0.8.0"] --> Fixtures["Fixture filename and checksum"]
Release --> Guard["Engine version check"]
Bridge["ReaJadxBridge: version 12"] --> Schemas["REA-owned input schemas"]
Schemas --> Catalog["tools/list"]
Catalog --> Check["bridge-catalog.mjs checks names, types and required fields"]
Reviews (7) · Last reviewed commit: "test(android): stop hand-copying the eng..." · Reviewed by Greptile |
|
Hi! This PR's checks pass, but GitHub shows a merge conflict with 🤖 Written with Claude Code (Opus 5.5), posted with my OK 🦊 |
|
Thanks for the 0.8.0 pin. Changing the pinned engine or the bridge behaviour while keeping bridge identity version |
31f4caf to
edc70fe
Compare
|
Done — thanks for catching this, @N0zoM1z0. Git archaeology confirmed your concern: identity Fixed in edc70fe: |
The 0.7.1 era already published, cached and verified identity 10, and the schema-advertising bridge kept that version. Shipping the changed advertised contract under the unchanged identity would make the cached value ambiguous, so the identity moves to 11 with the new contract. Suggested-by: N0zoM1z0 (morluto#7772 (comment)) Validation: check:fast and the Android MCP boundary tests (8 tests).
701d8c1 to
3a6ee6f
Compare
Identity 11 now belongs to main's JNI split-qualification change (455ed1b), so this branch's schema-advertised contract and the 0.8.0 engine pin cannot reuse it. The identity moves to 12, one past main's, so a cached 11 from the JNI change cannot collide with the behaviour introduced here. The original review suggested 11 when main still advertised 10; after the rebase exposed the collision, 12 continues the same rule. Suggested-by: N0zoM1z0 (morluto#7772 (comment)) Validation: check:fast and the Android MCP boundary tests.
3a6ee6f to
8ca4ae4
Compare
Identity 11 now belongs to main's JNI split-qualification change (455ed1b), so this branch's schema-advertised contract and the 0.8.0 engine pin cannot reuse it. The identity moves to 12, one past main's, so a cached 11 from the JNI change cannot collide with the behaviour introduced here. The original review suggested 11 when main still advertised 10; after the rebase exposed the collision, 12 continues the same rule. Suggested-by: N0zoM1z0 (morluto#7772 (comment)) Validation: check:fast and the Android MCP boundary tests.
ac5efa1 to
7c4029b
Compare
Move the audited engine release and its submodule gitlink from v0.7.1 to v0.8.0 (commit 2b2a560e, sha256 4b9a01c2...). Upstream only changed source-window paging and metadata-only field reads, so the six tools REA consumes and the bridge identity stay unchanged. Hand-copied version numbers now derive from JADX_RELEASE: the fixture download name, the metadata-bridge workflow path and the fake MCP server's reported engine version. The composition fallback availability text no longer names a release, because the Android boundary owns the versioned remediation. Validation: build:cached, check:fast, docs:check, test:focused over the 16 Android test files (296 tests), and verify:android against the real 0.8.0 JAR and ApiDemos 6.0.18.
Listing the bridge tools closed the connection. The bridge copied each property from the pinned engine's schema, and that schema has no `overload_index` for `get_xrefs_to_method`, so the advertised map carried a null that kotlinx serialization cannot write. Only `tools/list` was affected: REA calls tools by name, which is why the real lanes never saw it, and the same defect reproduces against the 0.7.1 engine. The bridge now declares the properties and required fields it accepts, so an engine bump can neither advertise a null nor drop the overload selector REA relies on. The real Android lane lists the live catalog to keep the shape under test. One tool list serves both the consumed set and the reimplementation loop, unknown names fail fast instead of inheriting a method-shaped schema, and the identity moves to 12 because main's JNI split-qualification change already owns 11. Validation: build:cached, check:fast, docs:check, test:focused over the Android boundary files, and verify:android against the real 0.8.0 JAR and ApiDemos 6.0.18. The new catalog step passes; the lane still stops at the pre-existing `missing java` recovery expectation, which this change does not touch.
The catalog check compared property names and required fields only, so advertising `overload_index` as a string would still have passed even though the bridge rejects it. Each expected property now carries its type. The transport piped the bridge's stderr and never read it, so a failing startup or catalog reply surfaced as "Connection closed" with the Java error hidden. Retain a bounded tail and append it to the failure. Validation: bridge-catalog against the real 0.8.0 JAR passes; a wrong expected type fails with "get_method_body.overload_index must stay string", and a missing engine JAR now reports the javac diagnostics instead of only the closed connection.
The bridge-owned catalog omitted method_name and reference_target from get_class_summary and reference_target from get_xrefs_to_method, even though the bridge reads both on its external-prototype path and REA sends both for reference queries. Neither side validates against the schema today, but the verified catalog contradicted the traffic it describes, and any schema-validating client would reject REA's own reference queries. The REA call sites also stopped sending limit, resolve_line and smali_fallback, which the bridge never reads. Validation: check:fast, and the Android MCP boundary plus JadxAnalysis tests (92 tests). The bridge source itself was not compiled here; the local engine JAR is absent, so verify:android against the real 0.8.0 JAR remains the authoritative catalog check.
Boundary tests derive the jadx engine version from JADX_RELEASE, matching the fixture convention this branch already established. Domain view tests cannot import the provider layer without inverting dependency flow, so their synthetic engine metadata uses a neutral version instead of the stale pin. Validation: check:fast, and the five touched test files (114 tests).
7c4029b to
9db3c6c
Compare
|
TL;DR: I ran the PR's 6 changed test files on Node 22.23.4, 24.22.1 and 26.12.1. Each run passed all 124 tests. I did not run I ran head 9db3c6c in a VM. The PR changes 26 files against the merge base: 6 test files and 20 others.
On 14 Nov, N0zoM1z0 asked for a bridge identity bump along with the pin. At this head, The head is 173 commits behind main 3d95d34. These results cover the head alone. CI on the head, read live with
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/domain/analysisView/androidPackageView.test.ts src/domain/analysisView/androidSymbolView.test.ts tests/boundary/android/JadxAnalysis.test.ts tests/boundary/android/JadxExternalReferences.test.ts tests/boundary/mcp/androidPackageSummaryMcp.test.ts tests/boundary/process/androidAnalysisMcp.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
gensokyo-dev
left a comment
There was a problem hiding this comment.
Verified the supply chain and the engine. Tag v0.8.0 resolves to 2b2a560e8, the release is by the repository owner, and the asset's SHA-256 (my download and GitHub's digest) matches the pin. Upstream rewrote its history, but the rewritten v0.7.1 commit has the same tree as the old pin, and the v0.7.1 to v0.8.0 source diff adds no process, network or class-loading calls. Locally, the real Android lane (analysis.mjs with the bridge catalog check) passes against the 0.8.0 JAR on JDK 17, along with 560 touched tests. Fresh CI is green. Thanks.
Summary
Move the audited Android engine from jadx-headless-mcp v0.7.1 to v0.8.0, and let the metadata bridge advertise the input schemas it actually accepts. No linked issue: this is a routine engine pin plus a defect found while verifying it.
Problem and expected behavior
src/android/JadxRelease.tspinned v0.7.1, so REA rejected the current upstream release (Expected engine 0.7.1; JAR reported 0.8.0).overload_indexforget_xrefs_to_method, so the advertised map contained a null that kotlinx serialization cannot write. Onlytools/listwas affected, which is why the existing lanes never saw it: REA calls tools by name. The same failure reproduces against the 0.7.1 engine, so this is a pre-existing defect, not an upstream regression.Expected: the pinned 0.8.0 release loads and inspects APKs exactly as before, and a client can list the bridge catalog.
Change and scope
2b2a560e, sha2564b9a01c2…). Upstream only changed source-window paging and metadata-only field reads; the six tools REA consumes are unchanged.real-android-metadataworkflow JAR path, and the fake MCP server's reported engine version now derive fromJADX_RELEASE. The composition fallback availability text no longer names a release, because the Android boundary owns the versioned remediation.get_class_summarynow listsmethod_nameandreference_target, andget_xrefs_to_methodlistsreference_target; the bridge already reads both on its external-prototype path, and REA stopped sendinglimit,resolve_lineandsmali_fallback, which the bridge never read.scripts/verify/android/bridge-catalog.mjsto the real lane: it connects to the live bridge, lists the catalog, and asserts the exact advertised schemas.docs/public/product-catalog.jsonandskills/are regenerated, not hand-edited.Scope note: an earlier draft of this PR reported
scripts/verify/android/failure-recovery.mjsas expecting a spawnENOENTfor themissing javascenario whileJadxConfigurationreports a PATH lookup failure. That observation no longer holds on this branch's base — the file is identical tomain, and its expectation there matches theJadxConfigurationreport (Cannot find an executable java …,phase: "path-lookup"). A later full rerun of the lane passed that scenario (see validation); the earlier stop did not reproduce.Contract and boundary impact
src/android/JadxRelease.ts; bridge input schemas move from engine-derived to REA-owned inbridge/android/ReaJadxBridge.java.method_nameandreference_targetonget_class_summary,reference_targetonget_xrefs_to_method) alongsideoverload_indexonget_xrefs_to_method, which REA already sends.JadxSession.docs/public/product-catalog.jsonregenerated and validated bydocs:check; authored skill text edited in.agents/skills/and regenerated.Expected effects:
Evidence and regression coverage
scripts/verify/android/bridge-catalog.mjs(new, real bridge, exact catalog, schemas and property types, plus the source-read bridge identity); the fake MCP fixture andtests/boundary/process/androidAnalysisMcp.test.tsnow derive engine and bridge versions from the release constants, and the domain view tests use a neutral synthetic version instead of the current pin.tools/listagainst either the 0.7.1 or the 0.8.0 JAR logsError writing to output sink … JsonElementSerializer … parameter valueand closes the connection; with this change the same call returns ten tools with the expected properties.inspect_android_package,search_android_classes,inspect_android_class,inspect_android_methodandtrace_android_references(CLI/MCP parity re-run below).Validation performed
npm run build:cached— success.npm run check:fast— success (typecheck, lint).npm run docs:check— success.npm run test:focused -- <16 Android boundary files>— 296 passed.npm run test:focused -- tests/boundary/process/jadxIntegration.test.ts— 52 passed (re-run in isolation; one poll timed out once under parallel load and did not reproduce).npm run verify:androidwith the pinned 0.8.0 JAR and ApiDemos 6.0.18 on macOS/OpenJDK 21 — bridge build, metadata regressions, five-operation CLI/MCP parity, ownership cleanup and the new catalog step passed; the lane stops at the pre-existingmissing javaexpectation.npm run verify:androidwith the sha256-matched 0.8.0 JAR (4b9a01c2…) and ApiDemos 6.0.18 — every step passed, including the bridge-catalog schemas step and themissing javarecovery scenario that stopped earlier runs; that stop did not reproduce (reviewer's local run on the rewritten branch).npm run check:fastplus the touched domain view tests (16 tests) were re-run.Compatibility, safety, and release
Expected engine 0.8.0; JAR reported 0.7.1; replace the file and updateREA_JADX_MCP_JAR. The supply docs carry the new URL and digest.Author readiness
Human owner: @cainiao1992
Before merge
type(scope): outcome.