Skip to content

fix(android): stop release signing from blocking Debug test filters - #136273

Merged
steipete merged 1 commit into
mainfrom
codex/android-release-task-validation
Sep 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/android-release-task-validation

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where developers running a Debug test whose filter contains “Release” were asked for release-signing credentials before any test could run. It also ensures indirectly selected release builds cannot miss the signing guard.

Why This Change Was Made

Gradle's requested task names also include task arguments. The old substring/aggregate-name heuristic therefore confused test filters with release tasks. Validation now belongs to the selected AGP release variant's pre-build lifecycle, including task dependencies and abbreviations. Both phone flavors retain explicit build-metadata validation; standalone Wear retains its existing signing-only policy and shared phone signing configuration.

Strict configuration-cache validation exposed a nearby existing failure: the license validation action captured the build-script object. It now captures only the directory and diagnostic path during configuration; its inputs, checks, messages, and dependency remain unchanged. The new signing/metadata actions likewise capture task-local values.

User Impact

Debug tests no longer need unrelated release credentials. Real Play, ThirdParty, and Wear release graphs still reject missing signing properties; phone release graphs still reject missing build metadata. No new settings, credentials, dependencies, or release artifacts are introduced.

Current-head Verification

Current commit: d01147edb246cb0db3b89b6c9ff7495d8ccc69fa, mechanically rebased onto e29d55a6c058f48310abeb2509f903ed0b090401 after the separate CI-budget fix #136307 landed. The upstream Compose dependency removal is preserved. Gradle remains 9.7.1 and AGP remains 9.4.0; there is no dependency upgrade in this PR.

The exact clean commit repeated the original ordered 20-case native Gradle matrix: nine successful exits and eleven intentional release-guard rejections, with five fresh JUnit executions and no failures/errors/skips. Summed Gradle runtime was 307.045 seconds, including fresh flavor compilation. All 759 captured source facts, HEAD, original driver and alias fixtures remained unchanged. Strict cache storage/reuse and signing/metadata invalidation passed; release APK/AAB outputs did not change.

The initially absent dependency graph was provisioned once through the documented native-PR workflow using frozen repository-pinned pnpm 12.1; all 766 captured source/manifest facts and the lockfile remained unchanged. The fresh matrix used separate cache roots. The task-local Debug key was removed after verifying its exact recorded identity, without reading its contents or touching operator/release keys.

Direct inspection covered both complete build scripts and the pinned AGP lifecycle implementation/callers. The published AGP 9.4.0 API sources define LifecycleTasks.registerPreBuild; the matching implementation sources store those dependencies and attach them to the actual variant pre-build task. Publisher checksums matched both downloaded archives. This directly addresses the dependency-contract gap in the latest ClawSweeper review. Fresh managed Codex P0–P2 review found no actionable findings.

Exact-head CI, attempt 2 succeeded: nine successful jobs and 26 intentionally skipped jobs, including the required gate, both phone test flavors, Wear tests, phone/Wear builds, lint, and security-fast. Six successful jobs executed on the retry; three successes were retained from attempt 1. The hosted Play build completed in 18m46s. The previous candidate's hosted build timeout remains historical evidence, not a passing result; the separately landed budget fix is now in this branch.

The retained first-attempt security-fast failure occurred while pre-commit bootstrapped its public hook repository: git fetch exited 128 before the private-key hook executed. It was not a detected committed key. After confirming there was no useful work executing, only failed/cancelled unfinished lanes were recovered. The current security job and all selected Android checks passed, satisfying the latest review's CI rank-up request. No validation, test, or scanner was disabled.

Retained Before/After Evidence

Source: eb4b3b201e18cb9146da68c6e1389afdcf892b7f. The native runs used the byte-identical candidate before commit; all 759 captured inputs remained unchanged during every run. Managed Codex P0 review found no actionable findings, with direct owner/caller/sibling and pinned dependency-source inspection.

The original Debug selection :app:testPlayDebugUnitTest --tests ai.openclaw.app.chat.ChatControllerOutboxTest.healthFlushRequestDuringActiveFlushIsDrainedAfterRelease failed at configuration with missing signing properties and zero executed tests. The fixed Play and ThirdParty selections each executed the existing JUnit test successfully.

The final native Gradle matrix matched 20/20 expected outcomes: nine successful runs and eleven intentional signing/metadata rejections. This is twenty real Gradle executions, not twenty unit tests. Five fresh JUnit executions passed without failures or skips. Coverage includes all three direct release graphs, aggregate app assembly, three root aliases (including the abbreviated :phonePlP), both phone metadata guards, unchanged standalone-Wear metadata policy, strict Debug cache storage/reuse, guard cache storage/reuse, and invalidation when signing or metadata inputs change.

The license-task cache failure was first observed on the initial candidate and then reproduced on unchanged baseline code using the existing deleteRemovesQueuedRow test. That JUnit test passed, but Gradle rejected configuration-cache storage. The final candidate stores and reuses the strict cache without suppressions. No release APK/AAB output changed. Aggregate assembly may build Debug outputs; any generated Debug signing material was confined to task-local Android preferences. No release keystore was read, release signing/upload/install performed, task action replaced, or validation skipped. Aggregate Debug prerequisites use only task-local generated Debug signing material, not release credentials.

The contract checks used the pinned AGP 9.4 lifecycle implementation and Gradle's task-name API. The task-local capture fix follows Gradle's configuration-cache requirements.

Production +32/-31 (net +1); no test-source growth. Existing JUnit coverage plus real task-graph/cache runs provide the regression proof without adding source-text assertions. The two local license captures are required to detach the action from the nonserializable script owner; the obsolete task-name policy is deleted.

Follow-up boundary: this does not establish full release-artifact configuration-cache compatibility. The existing release-only DNS stripping action still uses Project-backed file operations and needs its own full release-cache audit. No claim is made that a complete signed release was built.

Release note: Android Debug test filters no longer trigger release signing checks; signing and metadata validation follow the actual selected release variants.

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android app: wearos App: wearos size: S maintainer Maintainer-authored PR labels Sep 2, 2026
@steipete steipete self-assigned this Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 10:45 AM ET / 14:45 UTC.

ClawSweeper review

What this changes

The PR moves Android signing and release-metadata validation from requested task-name parsing to selected release-variant pre-build hooks, including Wear, and avoids capturing the build-script object in license validation.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The PR remains necessary: current main still uses the task-name heuristic that can inspect Debug test filters. The selected-release-variant wiring is structurally the right repair and has no discrete code finding, but this maintainer-owned PR must resolve the current exact-head security check failure and complete its Android checks before merge.

Priority: P2
Reviewed head: d01147edb246cb0db3b89b6c9ff7495d8ccc69fa

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-bound repair with claimed native coverage and no source finding; exact-head CI still blocks merge readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its body reports a native Gradle before/after matrix, but that claimed run was not independently executable in this read-only review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its body reports a native Gradle before/after matrix, but that claimed run was not independently executable in this read-only review.
Evidence reviewed 7 items Current-main behavior: Current main still contains the configuration-time heuristic that treats any requested task name containing “Release” as a release build and immediately rejects absent signing properties; this PR is therefore not obsolete.
Release-graph owner boundary: The branch creates task-local signing and metadata validators, then registers both on every phone release variant pre-build lifecycle rather than examining invocation arguments.
Wear sibling coverage: Wear already derives its release signing configuration from the phone project and the branch registers the phone signing validator on Wear release variants, preserving the shared-certificate boundary.
Findings None None.
Security None None.

How this fits together

Android Gradle configuration creates phone and Wear build variants before their task graphs run. The changed hooks decide when signed release graphs must validate credentials and reproducible build metadata, while Debug unit-test graphs proceed normally.

flowchart LR
  A[Gradle invocation] --> B[Android variant selection]
  B --> C{Release variant selected?}
  C -->|Yes| D[Signing and metadata checks]
  C -->|No| E[Debug test task]
  D --> F[Release build graph]
  E --> G[JUnit execution]
Loading

Before merge

  • Resolve merge risk (P1) - The production diff is net +1 line for a bug fix; the added task is justified by moving a deleted configuration-time signing check onto the release lifecycle.
  • Resolve merge risk (P1) - The Android Gradle Plugin 9.4 lifecycle overload could not be independently inspected from this environment, and the exact-head security-fast failure has no available log attribution.
  • Complete next step (P2) - Resolve or document the current exact-head security-fast failure and wait for the Android checks to pass before merging.
Agent review details

Security

None.

PR surface

Other +1. Total +1 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 32 31 +1
Total 2 32 31 +1

Review metrics

Metric Value Why it matters
Production versus test delta production +32/-31 (net +1); tests unchanged The small added validator is the owner-bound replacement for the deleted global task-name heuristic.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the variant-lifecycle repair only after the exact head demonstrates the existing Debug-filter reproduction, all direct phone/Wear release guards, and a resolved or documented security-fast result.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the variant-lifecycle repair only after the exact head demonstrates the existing Debug-filter reproduction, all direct phone/Wear release guards, and a resolved or documented security-fast result.

Do we have a high-confidence way to reproduce the issue?

No independent high-confidence reproduction was run in this read-only checkout; the source shows the prior configuration-time heuristic, and the PR body supplies a claimed native before/after matrix.

Is this the best way to solve the issue?

Unclear: attaching checks to selected release variants is the maintainable owner boundary and covers phone and Wear in source, but the pinned AGP lifecycle implementation could not be independently inspected here.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bf898e2fce7c.

Labels

Label justifications:

  • P2: This repairs a bounded Android developer workflow without evidence of a current release-blocking outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its body reports a native Gradle before/after matrix, but that claimed run was not independently executable in this read-only review.

Evidence

What I checked:

  • Current-main behavior: Current main still contains the configuration-time heuristic that treats any requested task name containing “Release” as a release build and immediately rejects absent signing properties; this PR is therefore not obsolete. (apps/android/app/build.gradle.kts:101, bf898e2fce7c)
  • Release-graph owner boundary: The branch creates task-local signing and metadata validators, then registers both on every phone release variant pre-build lifecycle rather than examining invocation arguments. (apps/android/app/build.gradle.kts:399, d01147edb246)
  • Wear sibling coverage: Wear already derives its release signing configuration from the phone project and the branch registers the phone signing validator on Wear release variants, preserving the shared-certificate boundary. (apps/android/wear/build.gradle.kts:31, d01147edb246)
  • Release contract: Android documentation states that release tasks require explicit build commit and timestamp properties, and gives direct phone, Wear, and third-party release commands. (apps/android/README.md:74, d01147edb246)
  • Introduction provenance: The branch commit has parent e29d55a and introduces the two reviewed build-script changes. (apps/android/app/build.gradle.kts:475, d01147edb246)
  • Exact-head gate state: The supplied exact-head check state records security-fast as failed and the Android build/test checks as queued or in progress; no failure is attributed to an introduced hunk without logs. (d01147edb246)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or document the exact-head security-fast failure and let the queued Android checks complete successfully.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-02T11:57:40.663Z sha eb4b3b2 :: needs maintainer review before merge. :: none

Attach signing and build metadata validation to release variants instead of parsing task arguments. Keep the existing license validation action independent of the build script for strict configuration caching.
@steipete
steipete force-pushed the codex/android-release-task-validation branch from eb4b3b2 to d01147e Compare September 2, 2026 14:33
@steipete
steipete merged commit 450cc01 into main Sep 2, 2026
101 of 107 checks passed
@steipete
steipete deleted the codex/android-release-task-validation branch September 2, 2026 15:32
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
Attach signing and build metadata validation to release variants instead of parsing task arguments. Keep the existing license validation action independent of the build script for strict configuration caching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: wearos App: wearos maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant