Skip to content

test(e2e): the agent-device daemon kill leaves the agent's lease in place (#1577) - #1579

Open
V3RON wants to merge 1 commit into
mainfrom
bug/1577
Open

V3RON wants to merge 1 commit into
mainfrom
bug/1577

Conversation

@V3RON

@V3RON V3RON commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1577

Status

Implement: done (test not runnable off the slow lane) Review: round 1, 0 findings Hardware: unavailable twice (19:30: with #1573's session hunk applied, the Android emulator did not boot in warm-up, PROVISION_FAILED after 300 s, twice; the test never ran) Gate: not run
Next: find out why the lane's Android emulator does not boot, merge #1573, then run verify-hardware on this PR and the gate

  • The test at e2e/slow-agent-device.test.ts:489 claims ADR 0071 §1: after an agent-device daemon kill the agent opens the installed Appduct app again, takes a snapshot, and its simlock lease stays on the same device (hunk: the rewritten test body and title).

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 0 blocking, 0 fixed, 1 notes. Claims review: 0 blocking, 0 fixed, 1 notes.
Rounds: 1. Tokens: 1.5M.
Runs: 7. Cost USD: 1.2132. Agent seconds: 699.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The agent-device daemon restart test now reinstalls and opens the fixture app after the restart. It takes a snapshot and checks that exactly one simlock lease remains with the original lease ID and device ID. This replaces assertions that the snapshot fails with “lease ended by simlock” and that the lease is released.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 5c870

This change only updates an end-to-end test to match the intended behavior after an agent-device daemon restart: the app reopens and the lease stays on the same device. It does not touch production code. The test could not be run here because it needs the slow lane and hardware.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: an e2e test is updated so that after an agent-device daemon kill the agent's lease stays in place. The raw summary says the test now expects the lease to remain present wit…
Linked Issues check Passed [#1577] The issue asks that the daemon-kill test match #1466: after the agent-device daemon is killed, the next command succeeds and the simlock lease stays held. The diff in e2e/slow-agent-device.tes…
Out of Scope Changes check Passed The whole-PR diff against the merge base 6db7d04 touches only e2e/slow-agent-device.test.ts, in one test case (+9/-9 lines per the change summary). Every changed line belongs to the daemon-kill test …
Description check Passed The description links issue #1577 and states that the slow-lane test at e2e/slow-agent-device.test.ts was rewritten to expect that, after an agent-device daemon kill, the agent reopens the installed A…
Full details: Title check

Explanation

The title names the change: an e2e test is updated so that after an agent-device daemon kill the agent's lease stays in place. The raw summary says the test now expects the lease to remain present with the same lease ID and device ID, which matches. The title is specific and concise, and it references issue #1577.

Full details: Linked Issues check

Explanation

[#1577] The issue asks that the daemon-kill test match #1466: after the agent-device daemon is killed, the next command succeeds and the simlock lease stays held. The diff in e2e/slow-agent-device.test.ts replaces the old expectations (next snapshot exits non-zero, text contains "lease ended by simlock", lease released within 60s) with: install the Appduct app, record the lease via listLeases before the kill, open target.bundleId after the daemon restarts, run snapshot with FIRST_SNAPSHOT and require success, then assert exactly one lease with the same id and deviceId. The retitled test name matches the new behavior. The change is a test rewrite, so the coding requirement is met in the reviewed code. The test was not executed in this PR. The PR states hardware is unavailable until #1573 merges. This is a verification gap, not a missing requirement. The iOS twin named in the issue is not in this diff and is not required by the issue's Android-focused objective.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base 6db7d04 touches only e2e/slow-agent-device.test.ts, in one test case (+9/-9 lines per the change summary). Every changed line belongs to the daemon-kill test named in #1577: the retitle, the added install and open steps needed for the new expected behavior, and the revised assertions. No unrelated files or hunks are changed. Possible unused imports or helpers after removing failureText usage were not verified and are not a scope issue.

Full details: Description check

Explanation

The description links issue #1577 and states that the slow-lane test at e2e/slow-agent-device.test.ts was rewritten to expect that, after an agent-device daemon kill, the agent reopens the installed Appduct app, takes a snapshot, and keeps its simlock lease on the same device. This matches the changeset summary. It also reports that the test has not run because hardware was unavailable.

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: e1f8a568-4b65-46ae-abea-2393c12a5421
Commits

Reviewing files that changed from the base of the PR and between 6db7d04 and 5c870a7.

Files selected for processing: 1

  • e2e/slow-agent-device.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@V3RON

V3RON commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 5c870a7

Runs: 7. Cost USD: 1.2132. Agent seconds: 699.
Tokens input 104, output 25083, cache read 1266032, cache write 221890.
- build implementer: claude-sonnet-5-5 57 s $0.1477
- audit implementer: claude-sonnet-5-5 26 s $0.0901
- review 1 reviewer: claude-sonnet-5-5 181 s $0.1835
- review 1 spec: claude-sonnet-5-5 14 s $0.0843
- review 1 code tests: claude-opus-5-5 111 s $0.5617
- review 1 claims: claude-sonnet-5-5 17 s $0.0757
- hardware hardware-verifier: claude-sonnet-5-5 293 s $0.0702
Finding outcomes: {}. Classes: {}.
{"findings":[]}

Written by an agent.

@V3RON

V3RON commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • code: e2e/slow-agent-device.test.ts:508 the open after the kill gets a retryable "being restored" reply if re-allocation takes over 10 s (RESTORE_TIMEOUT_MS); it would fail loudly on ok, not pass falsely.
  • spec: the new title, install step and same-id, same-device assertions match the triage's Simplest fix and the maintainer's Option A.
  • claims: the new title is true against ADR 0071, src/agent-device/AGENTS.md and agent-device.mdx:197-203.

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 15, 2026 17:45
@V3RON V3RON added the needs-hardware PR parked: a Done when line needs a real simulator or emulator run. label Nov 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-hardware PR parked: a Done when line needs a real simulator or emulator run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

slow-agent-device: daemon-kill test still expects the next command to fail, but #1466 restores the lease

1 participant