Repository navigation
refactor(android): take the host in JADX configuration, doctor and workspace roots - #11086
Merged
Merged
Conversation
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. |
Contributor
[Low impact] The reviewed changes appear safe to merge; no new actionable issue was found. SummaryJADX configuration, doctor checks, and workspace creation now receive the host explicitly.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
H["HOST_PLATFORM"] --> P["JadxProvider"]
H --> D["createSystemDoctorHost"]
D --> J["inspectJadxProvider"]
P --> C["JadxConfiguration"]
J --> C
C --> A["Host admission and Java selection"]
A --> N["systemWindowsNativeAuthority"]
N --> Q{"Same HOST_PLATFORM object?"}
Q -->|Yes| K["Reuse stable cached result"]
Q -->|No| U["Load without changing cache"]
P --> W["createJadxWorkspaceRoot"]
W --> R{"Windows?"}
R -->|Yes| G["Detached workspace guardian"]
R -->|No| X["PrivateRuntimeRoot"]
Reviews (4) · Last reviewed commit: "test(platform): count tests that redefin..." · Reviewed by Greptile |
19 tasks
morluto
force-pushed
the
refactor/host-platform-android
branch
from
November 15, 2026 12:21
5eda839 to
8cfc021
Compare
19 tasks
…d test the native cache split
….arch (#11102) Tests select a host by injection. A redefined process.platform stops exercising its branch once the module under test reads HOST_PLATFORM, and still passes. A counted baseline (105 sites in 20 files) may only shrink; each module migration switches its tests to injection.
morluto
force-pushed
the
refactor/host-platform-android
branch
from
November 15, 2026 12:49
662dbf1 to
0ce677b
Compare
This was referenced Nov 15, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HostPlatform migration (W8),
src/android. JADX configuration, the JADX doctor probe and the workspace root take the host as a parameter instead of readingprocess.platform/process.arch, so tests select another host by passing it rather than redefining global process properties.Also carries #11102 (collapsed): a counted
test-host-platform-stubarchitecture guard against tests that redefineprocess.platform/process.arch(baseline may only shrink; each module migration switches its tests to injection).Problem and expected behavior
requireSupportedHost,resolveJavaandcreateJadxWorkspaceRootread the ambient platform and architecture, andsystemWindowsNativeAuthorityread them too. Tests for unsupported hosts and Windows native admission (jadxDoctor,JadxWorkspaceRoot,androidGuardianObservation) redefinedprocess.platform/process.arch; with a frozenHOST_PLATFORMthat only works while these modules keep ambient reads, and the redefined win32 result was also cached bysystemWindowsNativeAuthorityfor the rest of the worker. Expected: the host flows from the caller, and tests inject it.Change and scope
inspectJadxAvailabilityoptions gain a requiredhost: HostPlatform;resolveJadxConfigurationInputs(environment, operation, host, signal?);inspectJadxProvider(environment, resourceOwner, host, signal?);createJadxWorkspaceRoot(platform).JadxProvidertakes an optionalhostconstructor argument defaulting toHOST_PLATFORM(composition is unchanged) and uses it for environment snapshots, admission and the workspace root.doctorRuntimepassesHOST_PLATFORMto the doctor probe.systemWindowsNativeAuthority(host = HOST_PLATFORM): only this host's result is cached; another host's admission loads the packaged artifact uncached (test seam), so an injected win32 run no longer poisons the cache. Callers pass the sameHOST_PLATFORMobject in production, so caching is unchanged.{ platform, architecture };JadxWorkspaceRoot.test.tspasses"win32";verifyWindowsGuardianIsolation(platform = process.platform)inscripts/verify/android/windows-guardian-isolation.mjsletsandroidGuardianObservationpass"win32". No test in these files redefinesprocess.platformany more.ambient-host-platformand 4ambient-host-architecturereads removed fromsrc/android;src/windows/WindowsNativeLoader.ts's platform/arch reads are gone too.Contract and boundary impact
src/platform/HostPlatform; consumers are JADX admission, doctor and workspace root, and the Windows native loader.docs/public/product-catalog.json), package, or installation impact: 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/jadxDoctor.test.ts(unsupported host, two Windows native admission cases),src/android/JadxWorkspaceRoot.test.ts,tests/boundary/process/androidGuardianObservation.test.ts, plus callers injadxConfiguration,jadxArchiveLifecycleandjadxJavaLifecycletests.systemWindowsNativeAuthoritystill readingprocess.platform, the two injected Windows doctor tests failed (unsupported_hostinstead ofruntime_missing), which shows the tests now exercise the injected host rather than the global.Validation performed
npx tsc --noEmit -p .— passed.node scripts/verify/architecture-guards.mjs --shrink-baselines— passed; baseline lowered.npm run test:focused -- src/android/JadxWorkspaceRoot.test.ts tests/boundary/android/jadxDoctor.test.ts tests/boundary/android/jadxConfiguration.test.ts tests/boundary/android/jadxArchiveLifecycle.test.ts tests/boundary/process/jadxJavaLifecycle.test.ts tests/boundary/process/androidGuardianObservation.test.ts src/windows/WindowsNativeLoader.test.ts tests/process-global/windowsNativeControlCapability.test.ts tests/process-global/windowsRuntimeAdmission.test.ts tests/composition/reverseProviderLaunchErrors.test.ts tests/boundary/process/jadxIntegration.test.ts— 10 files passed;windowsNativeControlCapability.test.tsfailed, and it fails the same way on current main sources (it redefinesprocess.platform, whichsrc/processno longer reads since refactor(process): take the host from HOST_PLATFORM and require the platform in process helpers #11038); fixed in test(windows): select the Windows host through HOST_PLATFORM in the native-control capability test #11088.npm run check:fast— passed.npm run test:focused -- src/windows/WindowsNativeLoader.test.ts tests/boundary/android/jadxDoctor.test.ts tests/boundary/android/jadxConfiguration.test.ts— 69 passed; the two new cache cases fail (2 failed / 26 passed) with the host bypass removed. Verifier scripts (scripts/verify/android/*.mjs) now passHOST_PLATFORM;npm run verify:androidnot run (needs the real JADX lane).node scripts/verify/architecture-guards.mjs --shrink-baselineslowered the stub baseline forwindowsNativeControlCapability.test.ts(main already moved it to injection); guards passed; pre-pushcheck:fastpassed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.