Repository navigation
test(android): await outbox publication in branch fixture - #136335
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 10:35 AM ET / 14:35 UTC. ClawSweeper reviewWhat this changesThe PR makes the Android branch-coordination fixture wait for a published queued outbox item before asserting that item’s contents. Regression provenancePossible 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 Review scores
Verification
How this fits togetherAndroid 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +2. Total +2 across 1 file. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
96cbc0a to
76c1454
Compare
|
Merged via squash.
|
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]>
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
sendMessageAwaitAcceptanceconfirms 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 boundedawaitBranchProgresshelper, 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
39824f9ab80eed6e18f1206dcdb4b9f5b03ac568, completed 2,710 tests with one failure.inputAdmittedBeforeExternalFinalHistorySurvivesForExplicitRetrythrewNoSuchElementException: List is emptyin the sharedadmit()helper at line 1079, immediately after successful durable admission..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.ChatControllerBranchCoordinationTestandChatControllerOutboxTestsuites 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
ktlintCheckpassed 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
mainat76c145484aa89acd5de2e7c99a19f114a072414d, 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.