Skip to content

refactor(android): simplify durable outbox test scenarios - #117667

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-android-outbox-fixture-wave6-2d45
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-android-outbox-fixture-wave6-2d45

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Android's durable chat-outbox regression suite repeats gateway/storage fixtures, controller wiring, and durable-row setup across 76 named tests, making offline delivery, restart recovery, ownership, and retry behavior harder to audit and maintain.

Why This Change Was Made

Use one private, fresh-per-test scenario fixture that delegates the existing coroutine test scope and centralizes the existing controller and row defaults. Controller construction stays in its original execution position; matrix tests and custom transport cases retain their original isolated setup.

User Impact

No production or user-visible behavior changes. Android offline delivery, durable recovery, claim ownership, cancellation, connection gating, retry/failure handling, history reconciliation, and gateway/session identity retain their complete existing regression coverage.

Evidence

  • Exactly one Android unit-test file changed: +340/-762, net -422 test lines; production delta 0.
  • Ordered Kotlin-token parity against frozen base: 76 named tests / 89 expanded scenarios, 366 / 436 expanded assertions, and 197 / 234 expanded coroutine scheduler operations; assertion arguments, scheduler arguments, and their order are unchanged. Exact event digest: 2ba48be0dbe480f5ea58cf98b3aa6505e9d057ca01b88c054713db7760dcc17b.
  • All 24 seeded durable rows retain identical effective field values, Kotlin constructor defaults, and per-test order; exact row digest: ff256d392bdb3c52d79f835103b8e253c5c866936547d40ae46f3115d21988cf.
  • Independently reviewed using a fresh gpt-5.6-sol xhigh reviewer plus fresh structured xhigh autoreview; no actionable P0–P2 findings.
  • Validated on an isolated Linux Blacksmith Testbox with the repository's pinned Android SDK/toolchain:
    • ./gradlew --no-daemon --build-cache :app:ktlintCheck
    • ./gradlew --no-daemon --build-cache :app:testPlayDebugUnitTest --tests ai.openclaw.app.chat.ChatControllerOutboxTest
    • ./gradlew --no-daemon --build-cache :app:testThirdPartyDebugUnitTest --tests ai.openclaw.app.chat.ChatControllerOutboxTest
    • pnpm check:changed -- apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerOutboxTest.kt
  • Repository Android CI additionally runs the complete Play and third-party unit suites against this exact pull-request head.

AI-assisted; reviewed and verified against production owners and upstream kotlinx-coroutines-test 1.11.0 scheduler/scope contracts.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: XL maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete steipete self-assigned this Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 6:35 PM ET / 22:35 UTC.

ClawSweeper review

What this changes

This PR replaces repeated Android durable-outbox test setup with a private OutboxScenario fixture that centralizes fake gateway, outbox, controller, and seeded-row defaults.

Merge readiness

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

Keep this PR open for normal human review. The source change is confined to a fresh-per-test Android scenario fixture and preserves the 76 test names plus deliberately isolated matrix/custom cases, but the protected maintainer label and missing inspectable after-fix runtime artifact make it unsuitable for automatic disposition.

Priority: P3
Reviewed head: 0269ac1795a74baa92ae1b4b1a6ee9b3c0b6ebdc
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The test refactor appears coherent from source, but the required after-fix evidence is not inspectable in the supplied PR context.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body reports unit, lint, and changed-check commands, but provides no inspectable after-fix terminal output, artifact, or real runtime record; those checks are supplemental proof only. 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 unit, lint, and changed-check commands, but provides no inspectable after-fix terminal output, artifact, or real runtime record; those checks are supplemental proof only. 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 7 items Focused fixture owns repeated test setup: The PR adds one fresh OutboxScenario per runTest, with scenario-local fake gateway and outbox plus controller and seed helpers; no production source is changed.
Test inventory is preserved: A source comparison found 76 named test functions on both the base and PR head, with no test-name diff; the refactor changes setup rather than the declared regression scenarios.
Exceptional test constructions remain explicit: The admission-ack matrix and custom transport/race scenarios retain direct runTest setup rather than being forced through the shared fixture, preserving their intentionally special construction paths.
Findings None None.
Security None None.

How this fits together

Android's chat controller journals outgoing commands in a durable outbox before sending them to the gateway, allowing recovery after offline periods or restarts. The changed unit suite creates fake gateway and storage state, drives controller events, and verifies delivery, retry, ownership, and recovery outcomes.

flowchart LR
  A[Chat action] --> B[Chat controller]
  B --> C[Durable outbox]
  C --> D[Gateway delivery]
  D --> E[Recovery and acknowledgement]
  F[Android scenario tests] --> B
  F --> C
Loading

Decision needed

Question Recommendation
Should this protected Android test-only refactor be accepted after the exact-head focused Android results and an inspectable after-fix validation artifact are available? Review exact-head Android proof: Recommended: inspect the focused Play and third-party unit results and a redacted terminal or CI artifact, then land if they confirm the preserved scenarios.

Why: The implementation appears coherent, but the protected label prevents automated cleanup and the available PR body does not provide independently inspectable proof for the claimed Testbox run.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports unit, lint, and changed-check commands, but provides no inspectable after-fix terminal output, artifact, or real runtime record; those checks are supplemental proof only. 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 supplied PR body lists focused Gradle validation, but it contains no inspectable after-fix terminal output, linked artifact, or runtime record; unit-test and CI claims alone do not satisfy the real-behavior-proof gate.
  • Resolve merge risk (P1) - The Android Play and third-party test jobs in the supplied check state were still queued or running, so their exact-head result remains unresolved.
  • Resolve merge risk (P1) - The protected maintainer label requires explicit human handling even though source inspection found no discrete patch defect.
  • Complete next step (P2) - A protected maintainer label and missing inspectable proof require normal human review; there is no concrete mechanical repair for an automation lane.
Agent review details

Security

None.

PR surface

Other -422. Total -422 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 340 762 -422
Total 1 340 762 -422

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain one canonical fresh scenario fixture, while preserving the explicitly separate matrix and custom-transport cases, then have a maintainer confirm the exact-head Android results and attach redacted terminal or CI evidence for the focused suite.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain one canonical fresh scenario fixture, while preserving the explicitly separate matrix and custom-transport cases, then have a maintainer confirm the exact-head Android results and attach redacted terminal or CI evidence for the focused suite.

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

Not applicable: this PR reorganizes regression-test setup rather than reporting a production failure. The relevant verification path is the focused Android durable-outbox test suite on the PR head.

Is this the best way to solve the issue?

Yes, conditionally: a per-test scenario fixture follows existing Android TestScope helper patterns and keeps special matrix and transport cases isolated; final acceptance needs exact-head Android validation evidence.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a test-only maintainability refactor with no production or user-visible behavior delta.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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 unit, lint, and changed-check commands, but provides no inspectable after-fix terminal output, artifact, or real runtime record; those checks are supplemental proof only. 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 test-only maintainability refactor with no production or user-visible behavior delta.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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 unit, lint, and changed-check commands, but provides no inspectable after-fix terminal output, artifact, or real runtime record; those checks are supplemental proof only. 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: The current refactor is authored by this contributor, and available file history credits Peter Steinberger with seven commits on the durable-outbox test file. (role: recent and repeat test-suite contributor; confidence: medium; commits: 0269ac1795a7; files: apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerOutboxTest.kt)
  • wangmiao0668000666: Current-main blame attributes the retained direct controller helper to this contributor's earlier file boundary, making them a relevant source-history contact for the test setup shape. (role: earlier helper contributor; confidence: medium; commits: ebb301c32d9e; files: apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerOutboxTest.kt)

Rank-up moves

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

  • Attach redacted terminal output or a linked CI/Testbox artifact for the exact PR head, including the focused Play and third-party durable-outbox tests.
  • Have a maintainer review the protected Android refactor after the queued Android jobs complete.

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 merged commit e49c833 into main Aug 1, 2026
63 of 69 checks passed
@steipete
steipete deleted the codex/goal100k-android-outbox-fixture-wave6-2d45 branch August 1, 2026 22:45
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL 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