Skip to content

test(android): await outbox publication in branch fixture - #136335

Merged
steipete merged 1 commit into
mainfrom
codex/android-branch-publication-test
Sep 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/android-branch-publication-test

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where Android branch-coordination CI could fail before exercising its history-replacement scenario, even though the submitted input was durably queued.

Why This Change Was Made

sendMessageAwaitAcceptance confirms durable admission, not completion of the latest outbox presentation refresh. A newer refresh can supersede the send's own publication and still be loading when admission returns. The shared fixture now waits for a nonempty published outbox using its existing bounded awaitBranchProgress helper, then runs the unchanged single-row, Queued-state, text, attachment, branch-ownership, and exact-once-delivery assertions.

User Impact

No application behavior changes. This is a two-line test correction: production +0/-0, tests +2/-0. It does not change timeouts, scheduler pumping, dispatch ownership, database behavior, or the deliberately blocked history/branch scenarios.

Evidence

  • Observed CI failure: Android ThirdParty job 100255509018, at 39824f9ab80eed6e18f1206dcdb4b9f5b03ac568, completed 2,710 tests with one failure. inputAdmittedBeforeExternalFinalHistorySurvivesForExplicitRetry threw NoSuchElementException: List is empty in the shared admit() helper at line 1079, immediately after successful durable admission.
  • Controlled contract proof: one temporary native JUnit diagnostic passed against unchanged production at that commit, using the real Room outbox. Holding two completed reads proved that admission can return true while the original .single() throws, with the same queued row and attachment bytes still in Room. Releasing the newer read published that exact row. The diagnostic passed 1/1 with no failures or skips (4.19 seconds suite time) and was removed from the final patch.
  • Original two-line candidate: complete ChatControllerBranchCoordinationTest and ChatControllerOutboxTest suites passed in both Play and ThirdParty: 45 + 77 tests per flavor, 244 executions, zero failures/errors/skips. Both native test tasks used --rerun; compilation could reuse existing build caches. The recorded 759 source-file hashes stayed unchanged during the run, and the diagnostic was absent.

The complete app ktlintCheck passed without source changes. Independent Codex P0–P2 review found no actionable findings.

The counterexample proves the fixture's synchronous-publication assumption is invalid; it does not establish which competing refresh actually won in hosted CI or identify an introducing commit. These are native JVM/Room tests, not physical-device or provider proof. Exact-head hosted CI for this test-only change remains a separate check.

Current-head verification

The CI-budget parent #136307 is merged. This PR now targets main at 76c145484aa89acd5de2e7c99a19f114a072414d, with only the two reviewed test lines in its diff. All four affected production/test owner files are byte-identical across the mechanical rebase.

The complete branch-coordination and outbox suites were rerun on this exact clean commit: 244 actual executions, zero failures/errors/skips, in 90.757 seconds. Both flavor test tasks used --rerun; all 759 captured source facts and HEAD remained unchanged. A fresh managed Codex P0–P2 review completed both evidence passes with no actionable findings. Exact-head CI attempt 2 passed, including the selected-lane aggregate: 9 successful jobs and 26 intentional skips. This includes the full selected Play/ThirdParty/Wear test and build lanes plus lint and security; carried first-attempt successes are not claimed as fresh executions.

The first attempt's security job failed while Docker pulled the pinned scanner image from GHCR, before scanning began. The remaining lint job was unassigned with no steps; no job was executing when that already-failed attempt was cancelled. The normal failed-job retry reran security and lint on the existing hosted route and both passed. No scanner bypass, dependency change, global runner setting, or test assertion was introduced. The latest ClawSweeper review of this exact commit reports no actionable findings or remaining rank-up work.

@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 size: XS maintainer Maintainer-authored PR labels 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:35 AM ET / 14:35 UTC.

ClawSweeper review

What this changes

The PR makes the Android branch-coordination fixture wait for a published queued outbox item before asserting that item’s contents.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open. The test-only fix remains necessary because current main still has the pre-wait fixture; the introduced wait matches the controller’s durable-admission versus asynchronous-publication contract and introduces no actionable defect.

Priority: P2
Reviewed head: 76c145484aa89acd5de2e7c99a19f114a072414d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrowly scoped test repair that aligns the assertion with the existing durable-admission and publication boundary.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored, test-only PR is outside the external-contributor real-behavior-proof gate; the supplied native Room suite results are relevant supplemental validation.
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, test-only PR is outside the external-contributor real-behavior-proof gate; the supplied native Room suite results are relevant supplemental validation.
Evidence reviewed 5 items Introduced fixture repair: The verified PR-introduced hunk adds one bounded wait for a nonempty published outbox before the existing single-item assertions.
Admission and publication boundary: The controller documents acceptance as durable admission, enqueues the row, then calls publication; publication separately reads the outbox and only applies the newest revision. The fixture must therefore wait for the observable snapshot rather than treat admission as synchronous publication.
Current-main necessity: The PR base and fetched current main resolve this test file to the same pre-change blob, so current main does not already contain the wait.
Findings None None.
Security None None.

How this fits together

Android chat tests submit a message to the controller, which durably records it in the outbox and later publishes a snapshot for UI and test assertions. This fixture then exercises branch-history replacement and exact-once delivery.

flowchart LR
  A[Branch coordination test] --> B[Chat controller]
  B --> C[Durable outbox admission]
  C --> D[Outbox snapshot publication]
  D --> E[Fixture assertion]
  E --> F[Branch history scenario]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +2. Total +2 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +2/-0 The patch changes only the test fixture’s observation boundary and adds no runtime behavior.

Technical review

Best possible solution:

Keep the production controller unchanged and land the bounded fixture wait so the branch-history assertions observe the published outbox state they require.

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

Yes. The existing Room-backed fixture can admit a durable row while publication remains asynchronous; the pre-change direct snapshot assertion therefore has a concrete race, corroborated by the supplied hosted CI failure.

Is this the best way to solve the issue?

Yes. Waiting through the existing bounded helper at the fixture’s observable-state boundary is narrower and more maintainable than changing the production admission contract or adding timing delays.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs intermittent Android test reliability without changing shipped application behavior.
  • 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, test-only PR is outside the external-contributor real-behavior-proof gate; the supplied native Room suite results are relevant supplemental validation.

Evidence

What I checked:

Likely related people:

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

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 (2 earlier review cycles)
  • reviewed 2026-09-02T13:47:50.776Z sha 96cbc0a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T14:16:44.195Z sha 96cbc0a :: needs maintainer review before merge. :: none

Base automatically changed from codex/ci-android-hosted-build-budget to main September 2, 2026 14:08
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S and removed size: XS labels Sep 2, 2026
@steipete
steipete force-pushed the codex/android-branch-publication-test branch from 96cbc0a to 76c1454 Compare September 2, 2026 14:20
@steipete
steipete merged commit 65e5b2e into main Sep 2, 2026
103 of 107 checks passed
@steipete
steipete deleted the codex/android-branch-publication-test branch September 2, 2026 15:06
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 2, 2026
Apply the canonical complete CLI stdout and bounded diagnostic capture from
main commit a8fe1a5 (#136434), preserving
this branch's Windows failure diagnostics. Keep command overflow explicit
instead of returning successful but truncated plugin-list JSON.

Adopt the Android admission/publication fixture correction from main commit
65e5b2e (#136335), reusing its bounded
published-outbox condition without changing durability or deadlines.

Proof: the unchanged built-CLI SQLite lifecycle fails before the capture
repair and passes afterward; all 40 helper tests and changed gates pass.
Android branch/outbox suites pass 244 cases across both variants. Fresh
isolated P0 review has no actionable findings. Runtime and dependency graph
are unchanged; exact-head CI and separate live-proof gates still apply.

Co-authored-by: Masato Hoshino <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android docs Improvements or additions to documentation 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