Skip to content

Name the agent-device session of a device-cloud lease - #984

Merged
kblok merged 3 commits into
mainfrom
issue-976-lease-session
Nov 3, 2026
Merged

kblok merged 3 commits into
mainfrom
issue-976-lease-session

Conversation

@kblok

@kblok kblok commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Newer agent-device refuses a provider lease to a client that names no session, so BrowserStack and Limrun leases would fail to allocate or renew. The port's lease requests carried no session at all. Now the lease driver, the lease heartbeat, and the Limrun driver and heartbeat use e2e-lease- plus the first 8 hex digits of the SHA-256 of the daemon's state directory, and the client sends it as session in lease.allocate, lease.heartbeat, and lease.release.

Upstream change ported: e2e-inc/e2e#1513 (383c0bc): leaseSession in mobile/src/lease/session.ts (LeaseSessions.LeaseSession), used by lease/driver.ts (LeaseDriver), lease/heartbeat.ts (LeaseHeartbeat), and limrun/src/driver.ts (LimrunDriver).

Difference from upstream: upstream also puts session in the Limrun binding's client. The port cannot, because session is a reserved key there (DeviceBindings). LimrunHeartbeat derives the session again from the binding's stateDir.

Tests: LeaseDriver, LeaseHeartbeat, and LimrunHeartbeat assertions now check the session. Partial: Partial_Uses_the_requested_app_when_installation_returns_no_identifier (upstream driver.test.ts) checks the session the driver's clients are created with, not the binding's client.session. The second Limrun heartbeat test now gives its binding a stateDir, as the real driver always does.

.NET-only: LimrunDriver.LeaseSession (internal copy of the hash; E2E.Limrun cannot see E2E.Mobile internals, and upstream inlines it there too). No public API change. COMPATIBILITY.md updated. Not checked against a live provider.

Closes #976

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between dd46a07 and 5fd3ae9.

Files selected for processing: 12
  • COMPATIBILITY.md
  • src/E2E.Limrun/LimrunDriver.cs
  • src/E2E.Limrun/LimrunHeartbeat.cs
  • src/E2E.Mobile/AgentDeviceRpcClient.cs
  • src/E2E.Mobile/DeviceCommands.cs
  • src/E2E.Mobile/Lease/LeaseDriver.cs
  • src/E2E.Mobile/Lease/LeaseHeartbeat.cs
  • src/E2E.Mobile/Lease/LeaseSessions.cs
  • tests/E2E.Limrun.Tests/Driver/LimrunDriverTests.cs
  • tests/E2E.Limrun.Tests/Heartbeat/LimrunHeartbeatTests.cs
  • tests/E2E.Mobile.Tests/LeaseDriver/LeaseDriverTests.cs
  • tests/E2E.Mobile.Tests/LeaseHeartbeat/LeaseHeartbeatTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

kblok and others added 2 commits November 3, 2026 10:29
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
@kblok

kblok commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kblok
kblok merged commit 68dd1ff into main Nov 3, 2026
4 checks passed
@kblok
kblok deleted the issue-976-lease-session branch November 3, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upstream: name the agent-device session for device-cloud leases (#1513)

1 participant