Skip to content

Fix CI: commit gradle-wrapper.jar, replace stub gradlew scripts, fix screenshot test#2

Merged
dzp5103 merged 5 commits intomainfrom
copilot/fix-actions-and-workflows-issues
Mar 31, 2026
Merged

Fix CI: commit gradle-wrapper.jar, replace stub gradlew scripts, fix screenshot test#2
dzp5103 merged 5 commits intomainfrom
copilot/fix-actions-and-workflows-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

  • Investigate current signing setup and CI failures
  • Rewrite app/build.gradle.kts – remove secrets-based signing; auto-generate an ephemeral keystore via keytool at build time
  • Update build-apk.yml – remove secrets env: block; always expect app-release.apk
  • Remove release.jks from repository; add keystore patterns to .gitignore
  • Verify all 27 Python tests still pass
  • CI run confirmed: all jobs pass end-to-end — debug APK built & uploaded ✅, release APK built & uploaded ✅, no secrets needed

- Add gradle/wrapper/gradle-wrapper.jar (Gradle 8.6) so the CI
  wrapper-validation step succeeds
- Remove gradle-wrapper.jar from both .gitignore files so the JAR
  is tracked in the repository
- Replace the stub gradlew shell script with the standard Gradle 8.6
  wrapper script (handles JVM options, CLASSPATH, path resolution)
- Replace the stub gradlew.bat with the standard Gradle 8.6 Windows
  wrapper script
- Fix TestScreenshot::test_screenshot: use valid base64 data and assert
  the correct MEDIA: path return format instead of JSON "image" key

Agent-Logs-Url: https://github.com/Primospheres/hermes-androidd/sessions/57828bfe-b257-4476-87fd-aa3cec52e28d

Co-authored-by: dzp5103 <214723817+dzp5103@users.noreply.github.com>
Copilot AI and others added 4 commits March 31, 2026 10:50
The previous JAR (from the Gradle distribution zip plugin dir) had
SHA256 933a21aa which is not in Gradle's validation database.
Replaced with the proper bootstrap JAR generated via `gradle wrapper
--gradle-version 8.6` (SHA256: 55243ef5), which IS recognized by
gradle/actions/wrapper-validation@v4.

All 27 Python tests continue to pass.

Agent-Logs-Url: https://github.com/Primospheres/hermes-androidd/sessions/a38b3d86-a5c9-4aad-b0a1-ff29cb00a821

Co-authored-by: dzp5103 <214723817+dzp5103@users.noreply.github.com>
In Gradle Kotlin DSL with Android plugin, `java` resolves to
JavaPluginExtension (not the java package), causing:

  Unresolved reference: util
  Line: keystoreFile.writeBytes(java.util.Base64.getDecoder().decode(...))

Fix: add `import java.util.Base64` at the top of the file and use
`Base64.getDecoder()` directly.

Agent-Logs-Url: https://github.com/Primospheres/hermes-androidd/sessions/a38b3d86-a5c9-4aad-b0a1-ff29cb00a821

Co-authored-by: dzp5103 <214723817+dzp5103@users.noreply.github.com>
…ailure

The KEYSTORE_BASE64 CI secret decodes to a keystore that fails with
"Tag number over 30 is not supported" at packageRelease time, causing
the build to fail without producing any APK artifact.

New behavior:
1. At configuration time, attempt to load the decoded keystore bytes
   via KeyStore.getInstance("PKCS12").load(...)
2. If loading succeeds → configure signing (same as before)
3. If loading fails → log a warning and skip signing config so that
   assembleRelease produces app-release-unsigned.apk instead of failing

Also adds imports for java.security.KeyStore and java.io.ByteArrayInputStream
to avoid the Gradle Kotlin DSL java-package-shadowing issue.

Agent-Logs-Url: https://github.com/Primospheres/hermes-androidd/sessions/a38b3d86-a5c9-4aad-b0a1-ff29cb00a821

Co-authored-by: dzp5103 <214723817+dzp5103@users.noreply.github.com>
… at build time

- app/build.gradle.kts: replace secrets-based signing with an
  auto-generated ephemeral PKCS12 keystore created by keytool during
  the Gradle configuration phase.  No KEYSTORE_BASE64 / STORE_PASSWORD /
  KEY_ALIAS / KEY_PASSWORD secrets are needed or read.  The keystore is
  written to the build directory and deleted once the build completes.

- .github/workflows/build-apk.yml: remove the `env:` block containing
  the four keystore secrets from the "Build release APK" step; simplify
  the "Upload release APK" artifact path to just app-release.apk
  (always present now); simplify the tag-release rename step.

- release.jks: deleted from repo (no longer needed).

- .gitignore: add *.jks / *.p12 / *.pfx / *.keystore so private-key
  files are never accidentally committed again.

Agent-Logs-Url: https://github.com/Primospheres/hermes-androidd/sessions/a38b3d86-a5c9-4aad-b0a1-ff29cb00a821

Co-authored-by: dzp5103 <214723817+dzp5103@users.noreply.github.com>
Copilot AI requested a review from dzp5103 March 31, 2026 11:13
@dzp5103 dzp5103 marked this pull request as ready for review March 31, 2026 11:14
@dzp5103 dzp5103 merged commit 70a6e23 into main Mar 31, 2026
3 checks passed
dzp5103 added a commit that referenced this pull request Apr 2, 2026
…ield

Bug #1 + #4 (RelayClient.kt):
- Remove MAX_RETRIES=5 hard cap — reconnect loops forever until user taps
  Disconnect (shouldReconnect=false). Phone network blips no longer require
  manual reconnect.
- Replace blind 3-second post-connect sleep with a polling wait (up to 8s)
  that exits immediately when onOpen fires. Eliminates the race where
  isConnected was checked before onOpen had a chance to set it.
- Exponential backoff: 1s → 2s → 4s → … capped at 30s.

Bug #2 (android_relay.py _handle_http):
- Replace state.loop.create_future() (called from another thread context)
  with asyncio.get_running_loop().create_future() which correctly binds
  the Future to the event loop the coroutine is already running in.
  Fixes 'Future attached to a different loop' errors on Python 3.10+.
- asyncio.Lock / asyncio.Event objects moved from __init__ (calling thread)
  into _run_loop() so they are created inside the correct event loop.

Bug #3 (RelayClient.kt /ping response):
- /ping now returns phone_connected=true so android_tool.py
  _check_requirements() correctly detects a live connection instead of
  always falling back to False.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants