Skip to content

refactor(android): consolidate Wear proxy bridge test fixtures - #118559

Merged
steipete merged 1 commit into
mainfrom
codex/goal50k-android-cleanup-wave4-2d45
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal50k-android-cleanup-wave4-2d45

Conversation

@steipete

@steipete steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Wear proxy bridge test suite repeated sender, bridge, response-decoding, and chat-payload fixtures across many cases, making its concurrency and queueing contracts harder to audit and maintain.

Why This Change Was Made

Consolidates those repeated test-only fixtures into canonical helpers while preserving all 32 test cases, their order, flavor coverage, coroutine ownership, and every explicit sequencing boundary. Production code, Android build configuration, dependencies, protocols, and behavior are unchanged.

LOC: +130/-336 (1 test file; net -206)

User Impact

No user-visible behavior changes. Maintainers get a smaller Wear proxy test surface with the same coverage and execution semantics.

Evidence

  • Blacksmith Testbox lease tbx_01kz37aw6t58xdfmf4g23krajr: :app:ktlintCheck passed.
  • WearProxyBridgeTest passed three consecutive times for testPlayDebugUnitTest and three consecutive times for testThirdPartyDebugUnitTest on the same hydrated lease.
  • Testbox hydration/run: https://github.com/openclaw/openclaw/actions/runs/30792649536
  • Exact parity retained: 32 tests/order, 14 runTest cases, 5 owned actor-scope tests, 13 synchronous tests, 11 runCurrent, 9 awaitIdleForTests, and 6 deferred sequencing boundaries.
  • Fresh Codex autoreview using gpt-5.6-sol with xhigh reasoning: clean, no accepted/actionable findings (overall: patch is correct (0.99)).

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: M maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 3:30 AM ET / 07:30 UTC.

ClawSweeper review

What this changes

The PR replaces duplicated Android Wear proxy bridge test setup, encoded-message decoding, and chat-payload construction with private helpers in WearProxyBridgeTest.kt.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Keep this PR open for normal maintainer review. The patch is a focused, test-only consolidation that preserves the 32 named test cases and their coroutine scheduling markers, with no production, dependency, workflow, or protocol change; however, the branch is behind current main, Android CI is still running, and the supplied proof is unit-test-only.

Priority: P3
Reviewed head: ad4604aadeaec0dfdeb59483d9719a2e3486b1ba

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation is a focused, net-negative test refactor with strong source-parity signals, but its proof remains unit-test-only.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports Testbox unit-test and lint runs, which are useful validation but remain test-only evidence rather than after-fix real behavior proof for an external PR; post redacted runtime evidence or obtain a maintainer proof override before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports Testbox unit-test and lint runs, which are useful validation but remain test-only evidence rather than after-fix real behavior proof for an external PR; post redacted runtime evidence or obtain a maintainer proof override before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Test-only scope: The PR changes only private helpers and call sites in the Android Wear bridge test file; the diff contains no production Android source, dependency, build, workflow, protocol, or configuration edits.
Constructor contract preserved: The extracted helpers preserve the WearProxyBridge dependency boundary: scope, sender, peer resolver, optional monotonic clock, and request handler are still injected into the same constructor contract.
Concurrency-test parity: Both the base and PR versions contain 32 tests, 15 runTest usages, 6 actor-scope cases, 11 runCurrent calls, 9 awaitIdleForTests calls, and one undispatched refresh sequence; the named tests remain in the same order.
Findings None None.
Security None None.

How this fits together

The Android Wear proxy bridge accepts watch requests, dispatches them to a request handler, and sends correlated responses or events back through the Wear transport. This test suite verifies the bridge’s peer discovery, queue ordering, cancellation recovery, and chat-stream projection behavior using controlled coroutine scopes and transport doubles.

flowchart LR
  Watch[Wear watch request] --> Bridge[Proxy bridge]
  Bridge --> Handler[Request handler]
  Handler --> Bridge
  Bridge --> Sender[Wear transport sender]
  Sender --> Output[Response or event]
  Fixtures[Test fixtures and scheduler checks] --> Bridge
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports Testbox unit-test and lint runs, which are useful validation but remain test-only evidence rather than after-fix real behavior proof for an external PR; post redacted runtime evidence or obtain a maintainer proof override before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The PR is cleanly mergeable but behind current main; refresh the merge result and require the queued/in-progress Android checks to pass on the exact head before merge.
  • Resolve merge risk (P1) - The supplied evidence is limited to lint and unit-test execution, so the external-PR real-behavior-proof gate is not independently satisfied without a maintainer override or an after-fix runtime exercise.
  • Complete next step (P2) - No discrete repair is needed: the patch is coherent, and the remaining work is exact-head validation and the PR proof/maintainer gate.
Agent review details

Security

None.

PR surface

Other -206. Total -206 across 1 file.

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 1 130 336 -206
Total 1 130 336 -206

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +130/-336 All net-negative churn is confined to one test suite, so the refactor does not expand the shipped Android runtime surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the helpers private to WearProxyBridgeTest.kt, land only after an updated exact-head Android validation pass, and preserve the existing injection points for scheduler, sender, peer resolver, clock, and request handler.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the helpers private to WearProxyBridgeTest.kt, land only after an updated exact-head Android validation pass, and preserve the existing injection points for scheduler, sender, peer resolver, clock, and request handler.

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

Not applicable: this PR does not report a user-facing bug. The relevant check is source-level semantic parity of the existing concurrency and transport tests, which is high-confidence from the named-test and scheduler-marker comparison.

Is this the best way to solve the issue?

Yes. Extracting private helpers in the existing test file is the narrowest maintainable approach because it removes repeated fixture construction while preserving per-test injection of the coroutine scope, sender, peer resolver, clock, and request handler.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a focused test-maintenance cleanup with no claimed user-visible or production behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports Testbox unit-test and lint runs, which are useful validation but remain test-only evidence rather than after-fix real behavior proof for an external PR; post redacted runtime evidence or obtain a maintainer proof override before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a focused test-maintenance cleanup with no claimed user-visible or production behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports Testbox unit-test and lint runs, which are useful validation but remain test-only evidence rather than after-fix real behavior proof for an external PR; post redacted runtime evidence or obtain a maintainer proof override before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the recent commit that introduced the current Wear proxy bridge test surface and is blamed for the current bridge constructor and test setup lines. (role: recent feature owner and area contributor; confidence: high; commits: 133323875fd9, ad4604aadeae; files: apps/android/app/src/test/java/ai/openclaw/app/wear/WearProxyBridgeTest.kt, apps/android/app/src/main/java/ai/openclaw/app/wear/WearProxyBridge.kt)

Rank-up moves

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

  • Post a redacted after-fix Android Wear request/response runtime exercise, or obtain an explicit maintainer proof override for this test-only cleanup.
  • Refresh the branch against current main and wait for the exact-head Android build, ktlint, and test checks to finish green.

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.

@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer proof override for this test-only cleanup: no production or user-visible behavior changes, so there is no meaningful after-fix operator/runtime flow to demonstrate beyond exercising the unchanged bridge contract through its complete focused suite. The source head remains ad4604aadeaec0dfdeb59483d9719a2e3486b1ba.

Exact-head hosted proof is now green:

The focused Blacksmith Testbox proof also ran the full 32-test class three consecutive times under each Play and ThirdParty flavor, plus ktlint. Fresh Sol xhigh autoreview was clean.

Rank-up moves disposition:

  • Real-behavior media: skipped under this explicit maintainer proof override because the patch changes private test fixtures only and has no changed runtime behavior to capture.
  • Rebase: skipped because behind-main drift is advisory, GitHub reports no conflict, the reserved target blob remained unchanged at final publication clearance, and the complete exact-head Android matrix is green. Rebasing would invalidate the immutable reviewed/tested SHA without improving proof.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@steipete
steipete merged commit c49b683 into main Aug 3, 2026
65 of 74 checks passed
@steipete
steipete deleted the codex/goal50k-android-cleanup-wave4-2d45 branch August 3, 2026 07:42
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant