Skip to content

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

Draft
Jacksondr5 wants to merge 1 commit into
j5/mainfrom
j5code/mobile-drop-session-cleanup
Draft

Jacksondr5 wants to merge 1 commit into
j5/mainfrom
j5code/mobile-drop-session-cleanup

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Draft until the live install updates. Merge this only once the live J5 Code on openclaw runs a build that contains 067d732 (the v0.1.7 advance, #971). Testers drive devices through that install, and until it updates, its device_close still leaves the session open. The Captain will say when it has updated.

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. Once the live install has updated, a tester's normal run 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, per the note above; it waits on the live install update
  • 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 9, 2026 3:55am 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

This branch was successfully deployed

1 active deployment
Preview — a53a8eff Deployed Nov 9, 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