Skip to content

fix(agent-device): release the simlock lease when a command reports endedLeases - #608

Merged
V3RON merged 5 commits into
mainfrom
bug/607
Oct 15, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/607

Conversation

@V3RON

@V3RON V3RON commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #607

Status

Implement: done (edge.test.ts 213 passed) Review: round 2 passed Hardware: pass for the iOS close (3 lane runs); other lane failures are #609 and a CoreSimulator crash Gate: not run
Next: gate

Done when

  • The front reads endedLeases from data, error.details and a batch's data, and releases the simlock lease it holds for this token (marked ended by the agent). Checked by the three endedLeases cases in src/agent-device/edge.test.ts, plus a streamed-reply case added in review. On the slow lane, "close releases the simlock lease before the CLI exits, and a following open works" passed in all three runs on 40ca176.
  • pnpm exec vitest run --project unit src/agent-device/edge.test.ts -t endedLeases passes. Checked by the green and fix runs and CI.

Assumptions

  • Assumption: the existing release-after-close test — a close now frees the simlock lease before the release, so the test waits for that and expects no lease held at the daemon release.
  • Assumption: error.details — the fake and the JSON-RPC error carry it as error.data.details, so only that form is read; a bare error.details is untested and was dropped.

Review

Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 16.2M.

Written by an agent.

@V3RON

V3RON commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

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

  • spec: src/agent-device/front/ended.ts:41 the simlock lease is freed after the body ends and is not awaited, so a CLI that acquires again at once could hit the per-requester limit

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 15, 2026 16:41
@V3RON
V3RON merged commit 6d75ee0 into main Oct 15, 2026
43 checks passed
@V3RON
V3RON deleted the bug/607 branch October 15, 2026 16:41
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.

agent-device front ignores endedLeases, so close no longer frees the device

1 participant