feat(codex): add Android runner with managed ChatGPT sign-in - #39
wellorbetter wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Expanded regression validationRetested
Formatting, changed-file Ruff, quality ratchet, protected-core Pyright, and Live validation (Codex CLI 0.153.4, existing ChatGPT session, Android 16): These are sanitized log excerpts; private screenshots, account details, device serial, and raw device traces remain local. Cancellation was exercised through the async task API, not a physical Ctrl+C keystroke. A Samsung wake-lock inspection warning ( |
Summary
ARTEMIS autonomous tasks currently require separately configured model API credentials even when the user is signed into Codex with ChatGPT. This adds an experimental CLI runner that reuses Codex-managed ChatGPT authentication to operate an explicitly selected Android device.
Closes #38.
uv run artemis codex login uv run artemis codex status uv run artemis codex run "Open Settings and read the battery percentage" --serial YOUR_DEVICE_SERIALImplementation
docs/codex.md.Validation
Tested on Windows with Python 3.12.14 and Codex CLI 0.153.4. Latest PR head:
ca3848b.Tests cover real subprocess framing, API-key environment exclusion, account redaction, login success/failure event handling, device argument validation, observation invalidation, action budgets, unsupported requests, timeouts, cancellation, and cleanup.
Live Android validation reused an existing ChatGPT login, completed a Settings/battery task, and matched the result against its screenshot. A deliberate one-second timeout was followed by a successful observation-only task. Cancelling a live async task recorded a terminal trace status and allowed immediate device-lock reacquisition.
Formatting, changed-file Ruff, quality ratchet, protected-core Pyright, and new-module type checks passed. Repository-wide Ruff retains 11 pre-existing playground errors; the full repository suite is not green. Independent test-isolation fixes are in #42.
Scope and remaining validation
This is a separate CLI path; Flash/Pro, Web UI, daemon scheduling, and
mobile_run_taskretain their existing execution paths. It does not include recording, arbitrary ADB shell, or Pro checkpoint verification. Success is the model's assessment plus a required final observation, not an independent Checker verdict.Dynamic tools are experimental. Fresh interactive browser/device-code sign-in, physical cable disconnection, other Codex versions, and broader device compatibility remain untested; login protocol paths have offline coverage. Cancellation was tested through the async API rather than a physical Ctrl+C keystroke. The PR remains a draft for these validation limits and maintainer feedback.
Private screenshots, UI XML, and raw device traces remain local. Only sanitized textual test evidence is shared.