Skip to content

refactor(android): reuse the shared Composer runtime fixture - #148104

Closed
vincentkoc wants to merge 1 commit into
mainfrom
refactor/test-audit-composer-runtime-fixture-20260914
Closed

vincentkoc wants to merge 1 commit into
mainfrom
refactor/test-audit-composer-runtime-fixture-20260914

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The Composer layout suite duplicates the shared Android runtime fixture binding used by the neighboring CompletedWork suite.

User Impact

No user-visible or production behavior changes. All existing tests and assertions remain.

Why This Change Was Made

Use the shared fixture binder at the same three setup, restoration, and branch-rebind points, removing the identical private helper. Runtime cleanup order and the existing Main-thread readiness barrier are unchanged.

Evidence

  • Normal Node Gradle wrapper: Composer 102 and CompletedWork 2 tests passed before and after, on both Play and ThirdParty, with zero failures, errors, or skips.
  • Canonical four-module Android lint passed, including the changed app test-source ktlint task.
  • All 12 selected non-platform checks passed; fresh P2 review found no actionable findings.
  • One file, six net test-support lines removed; no cases or production code removed.
  • JVM fixture proof only, not device, rendering, or live Gateway proof. Exact-head hosted CI is pending.

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 08:43
@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

The Android Composer layout tests reuse the existing runtime fixture binder for setup, restoration, and branch switching, removing their identical private helper.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a behavior-preserving cleanup that remains applicable on current main, with no actionable findings. The member-authored, maintainer-labeled PR is also protected from automatic closure.

Priority: P3
Reviewed head: b5cb28ec262364978a14213f7ec05cb4e590ca9a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, equivalent consolidation with preserved assertions and appropriate reported JVM validation.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR changes only JVM test fixture binding; its reported Composer and CompletedWork runs cover that scope, and no production or user-visible behavior requires live proof.
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 changes only JVM test fixture binding; its reported Composer and CompletedWork runs cover that scope, and no production or user-visible behavior requires live proof.
Evidence reviewed 6 items Introduced change: The complete pinned delta replaces three calls with the shared binder and removes the identical reflection helper; test cases, assertions, readiness barriers, and cleanup ordering are unchanged.
Equivalent shared implementation: The existing binder accepts a nullable runtime and performs the same NodeApp runtimeInstance reflection assignment as the deleted helper. It adds no initialization, waiting, or cleanup side effects.
Still applicable on main: Fetched main retains all three private-helper calls and the helper definition, so the proposed consolidation is not already present.
Findings None None.
Security None None.

How this fits together

Android layout tests install a test runtime into the application so chat screens and view models share controlled fixture state. The shared binder installs or restores that runtime while existing cleanup releases its resources.

flowchart LR
  A[Composer test setup] --> B[Shared fixture binder]
  C[Test runtime or previous runtime] --> B
  B --> D[Application runtime slot]
  D --> E[Chat view model and layout assertions]
  E --> F[Restore runtime and clean up]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -6. Total -6 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 10 -6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 10 -6

Review metrics

None.

Technical review

Best possible solution:

Use the existing shared binder while preserving the suite's runtime restoration, cleanup order, and readiness checks.

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

Not applicable: this PR reports duplicated test setup rather than a product defect; source inspection confirms the two implementations are equivalent.

Is this the best way to solve the issue?

Yes: replacing the duplicate helper with the existing shared implementation is the narrowest consolidation and introduces no production seam.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5c12872ea0f0.

Labels

Label changes:

  • add P3: This consolidates test support without changing production behavior or test assertions.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR changes only JVM test fixture binding; its reported Composer and CompletedWork runs cover that scope, and no production or user-visible behavior requires live proof.

Label justifications:

  • P3: This consolidates test support without changing production behavior or test assertions.
  • 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 changes only JVM test fixture binding; its reported Composer and CompletedWork runs cover that scope, and no production or user-visible behavior requires live proof.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer decision: closing this standalone test-fixture cleanup without merge.

The shared binder and deleted private helper are equivalent, and the patch preserves the three setup/restoration call sites. But it fixes no product or test failure, removes only six net test-support lines, and unlocks no active Android deliverable. The branch is now 642 main commits behind and its exact-head Android lane did not complete successfully.

Keep the shared helper available for new or actively modified tests. Fold this consolidation into the next concrete Composer/runtime-fixture repair if that owner is touched again; it does not justify a separate refresh, review, and landing cycle.

@vincentkoc vincentkoc closed this Sep 15, 2026
@RomneyDa
RomneyDa deleted the refactor/test-audit-composer-runtime-fixture-20260914 branch October 22, 2026 00:25
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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