Skip to content

fix(j5): the mobile rig leaves agent-device sessions to device_close - #973

Merged
Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-drop-session-cleanup
Nov 14, 2026
Merged

Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/mobile-drop-session-cleanup

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Merge gate met. It merges only once the live J5 Code on openclaw runs a build containing 067d732 (the v0.1.7 advance, #971). The Captain confirmed on 2026-11-14 that it now runs v0.0.52-nightly.20261111.17, which contains it.

Problem

#872 made the rig's stop and setup close agent-device sessions themselves, because device_close left them open. That was an interim exception, approved until upstream's release on close (pingdotgg#21478) reached J5. The v0.1.7 advance (#971) brought it in: DeviceService now releases the agent-device session when a device is closed (releaseAgentSession → releaseAgentDeviceSession in apps/server/src/device/AgentDeviceTarget.ts). Once the live install has that build, the rig's own cleanup, and its calls into the live install's agent-device, are no longer needed.

What changed

In scripts/j5/live-test-mobile.ts:

  • Removed closeAgentDeviceSessions, finishSessionCleanup, sessionsOnDevice, and the sessionCleanupPending marker that a fresh claim wrote into mobile.json. stop and setup no longer call agent-device.
  • The setup output's teardown line now reads "device_close (it ends your agent-device session too), then stop", without the manual agent-device close step.
  • Kept serialRunningAvd, the lookup by AVD name that stop also uses to find the slot's emulator, and its test.

A mobile.json written by #872's build may still carry sessionCleanupPending. Nothing reads it now, so it's harmless.

Testing

  • vp run check:changed passes. The two removed test blocks covered only the removed functions.
  • No device run, by design: builders don't touch rig devices. A tester's next normal run on the updated install checks this: device_close, then stop, then the next setup on that slot gets no DEVICE_IN_USE.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: removal only; the remaining tests pass
  • UI changes: none
  • Live testing: not run by the builder (no device commands). A tester's next normal run covers it.
  • Upstream-owned files: none
  • Upstream product: no change. This ends J5's interim exception now that upstream's fix is in.
  • Surfaces: the test rig's stop and setup
  • Docs: none in the repo. Testers' how-to is a project artifact; I'll update it when this merges.

Built by Claude Opus 5.5 in Claude Code (J5 Code crew seat).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 14, 2026 6:40am UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 9, 2026
@github-actions github-actions Bot added the size:M 30-99 effective changed lines (test files excluded in mixed PRs). label Nov 9, 2026
@Jacksondr5
Jacksondr5 marked this pull request as ready for review November 14, 2026 06:40
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 49 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 50 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1790b33 and da4a8b0.

Files selected for processing: 2

  • scripts/j5/live-test-mobile.test.ts
  • scripts/j5/live-test-mobile.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Jacksondr5
Jacksondr5 merged commit f43e39d into j5/main Nov 14, 2026
34 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/mobile-drop-session-cleanup branch November 14, 2026 07:06

This branch was successfully deployed

1 active deployment
Preview — da4a8b03 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant