Skip to content

feat: add managed Android Appium setup - #4913

Merged
MohabMohie merged 28 commits into
mainfrom
ChaosEngine/setup-appium-android-4898
Aug 14, 2026
Merged

feat: add managed Android Appium setup#4913
MohabMohie merged 28 commits into
mainfrom
ChaosEngine/setup-appium-android-4898

Conversation

@MohabMohie

@MohabMohie MohabMohie commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a release-pinned, verified Android SDK/Appium/UiAutomator2 setup provider
  • add lease-safe owned emulator and Appium lifecycle with exact health and process identity checks
  • expose typed CLI and SHAFT.Infrastructure adapters
  • migrate MCP Android provisioning and managed engine bootstrap to the shared receipt-bound owner
  • add packaged CLI, omission guards, and gated real emulator/UiAutomator2/aapt2 acceptance

Verification

  • shaft-infrastructure: 101 tests green (2 platform-specific Windows skips)
  • packaged CLI setup: 15/15 green
  • MCP infrastructure/mobile compatibility: 25/25 green
  • engine facade and managed bootstrap: 11/11 green
  • repository boundary/quality/workflow/reactor/docs/agent validators: green
  • validator regression suites: 128/128 green
  • full 19-module reactor package: green
  • all PR checks: green
  • exact-HEAD managed Android acceptance: https://github.com/ShaftHQ/SHAFT_ENGINE/actions/runs/31773936548

Review

The final solo adversarial requirement audit found no blocking issue. Companion documentation will follow in a separate PR before the issue-level completion audit.

Issue: #4898

@codacy-production

codacy-production Bot commented Aug 14, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 7 minor

Results:
7 new issues

Category Results
Documentation 4 minor
CodeStyle 3 minor

View in Codacy

🟢 Metrics 665 complexity · 0 duplication

Metric Results
Complexity 665
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@MohabMohie

Copy link
Copy Markdown
Contributor Author

Solo adversarial requirement audit

Reviewed the final diff against every #4898 acceptance row and the caller/state matrices. No blocking finding remains.

Requirement Evidence on final HEAD da16e83b9d
Exact deterministic plan AndroidSetupPlannerTest pins every host artifact, all six actions, request encoding, licenses, hashes, package lock, and rejects non-canonical metadata/selection drift.
aapt2 included Exact build-tools;36.0.0 revision/tool probes plus real APK badging in managed Android run 31773936548.
Explicit licenses Missing/wrong approval tests reach zero preflight/filesystem/provider mutation; package-scoped SDK consent replaces global license acceptance.
Integrity/extraction/atomicity Official archive bounds and hashes, npm lock verification, traversal/link/case-fold/reserved-name/ratio checks, rollback/quarantine tests, partial receipts, and recoverable AVD pointer publication.
Offline safety Partial/cold offline state fails before process/network/write; complete verified installed state is reusable and receipt-bound.
Concurrency Three JVM waiters and separate-process installers converge under JVM plus OS locks with one publication/receipt.
Exact status Exact Node/Appium/driver/plugin/package revisions, command probes, aapt2, AVD metadata/system image, and acceleration are checked; wrong/partial/linked/stale states degrade.
Emulator/Appium lifecycle Exact ports/serial/boot/package-manager/AVD identity/loopback Appium status; refcounted durable lease; PID/start/command/root identity; shared shutdown deadline; descendant cleanup; bounded lease-log reads; failure cleanup.
Adapter parity CLI plan-authoritative reconstruction and lifecycle commands, typed Java facade, MCP shared-owner delegation/discovery, and receipt-only managed engine bootstrap all have focused tests and boundary guards.
Remote/default/CI safety Explicit remote and EXTERNAL paths perform zero local setup; packaged CLI install/start/stop, omission guards, real UiAutomator2 session, and all PR/security/quality/reactor/docs validators are green.

Final verification:

  • infrastructure 101 tests green (2 platform-specific Windows skips)
  • CLI 15/15, MCP 25/25, engine facade/bootstrap 11/11
  • validator regressions 128/128
  • full 19-module reactor package green
  • all PR checks green, including CodeQL, Codacy, Linux/Windows CLI, installers, infrastructure/MCP/engine suites
  • exact-HEAD managed Android acceptance green: https://github.com/ShaftHQ/SHAFT_ENGINE/actions/runs/31773936548
  • origin/main is an ancestor of the reviewed HEAD; worktree and git diff --check are clean

The issue remains open intentionally until the companion documentation PR is merged and its final issue-level audit is recorded.

@MohabMohie
MohabMohie marked this pull request as ready for review August 14, 2026 05:52
@MohabMohie
MohabMohie merged commit 99804fe into main Aug 14, 2026
49 checks passed
@MohabMohie
MohabMohie deleted the ChaosEngine/setup-appium-android-4898 branch August 14, 2026 05:52
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

MohabMohie added a commit to ShaftHQ/shafthq.github.io that referenced this pull request Aug 14, 2026
## Summary

- document the provider-backed `MOBILE_ANDROID` setup, exact pins,
explicit license approval, platform prerequisites, cache/offline rules,
and owned lifecycle recovery
- document shared MCP ownership and receipt-bound engine bootstrap,
including explicit-remote precedence and child-only environment
- add a mutation-sensitive docs contract for the recurring CLI commands
and public behavior
- restore the canonical social-card RGBA format required by the existing
repository contract after the latest base image optimization changed it
to RGB

Companion documentation for ShaftHQ/SHAFT_ENGINE#4898 and engine PRs
ShaftHQ/SHAFT_ENGINE#4913 and ShaftHQ/SHAFT_ENGINE#4917.

## Verification

- `node tests/android-infrastructure-docs.test.js`
- `yarn test:docs`
- `yarn test`
- `yarn typecheck`
- `yarn build`
- local `yarn test:playwright` reached no assertions because the
required Chromium revision is absent; the PR gate installs Chromium and
provides the rendered browser evidence

Graphify refresh is intentionally skipped under the session's explicit
no-Graphify constraint. The repository's Graphify maintenance contract
still passed as part of `yarn test`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant