Skip to content

docs(adr): propose 0055, device remove deletes an idle simulator or emulator (#1131) - #1132

Closed
leonardoxr wants to merge 4 commits into
callstackincubator:mainfrom
leonardoxr:feature/1131-adr
Closed

leonardoxr wants to merge 4 commits into
callstackincubator:mainfrom
leonardoxr:feature/1131-adr

Conversation

@leonardoxr

Copy link
Copy Markdown
Contributor

ADR 0055 for #1131, at Proposed. device remove (DELETE /v1/devices/{id}) also deletes an idle simulator or emulator by its dev_… id, through the lifecycle's existing dispose under a new removal claim: shut down when ready, then deleted, with device.shutdown and device.deleted at initiator operator. A leased or busy device gets DEVICE_BUSY. Nothing changes shape, so the protocol does not move. A gateway still refuses it. The console gains a device action list (Remove phone, Delete device) and an Enrol phone… form, offered in worker mode only.

It narrows ADR 0050's rejected "virtual-device delete on device remove", and extends ADR 0022 §2 and ADR 0037 §3.

This PR is the bottom of #1131's stack and merges with the feature's last task.

🤖 Generated with Claude Code

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

@V3RON

V3RON commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Replaced by ADR 0095 (#1903). After an interview, #1131 covers phones only: device remove stays phones-only, and a worker lists the phones it could enrol. Thank you for the first draft.

Written by an agent.

@V3RON V3RON closed this Nov 27, 2026
V3RON added a commit that referenced this pull request Nov 30, 2026
…orker lists the phones it could enrol (#1131) (#1903)

ADR 0095 for #1131, _Accepted — not yet implemented_. It narrows ADR
0037 §3 and ADR 0073 §5.

- A worker lists the phones plugged into it that have no live record: a
new admin read `device.attached` (`GET /v1/attached-phones`, `simlock
device attached`), kept apart from `GET /v1/devices`, which lists
Simlock's own records. A gateway refuses it. Protocol +1.
- The console offers Remove phone (device rows, drawer, ⌘K) and Enrol
phone… (worker page, Fleet row, ⌘K), in worker mode only. The Enrol
dialog picks from that list or takes a typed id.
- `device remove` stays phones-only (ADR 0050 stands). Under ADR 0061
the first draft's virtual delete rarely helps.

It replaces the earlier draft ADR 0055 (#1132). This PR is the bottom of
#1131's stack and merges with the feature's last task.

### Status

Implement: fix done Review: fix-check at fa66f6c, passed Hardware: n/a
Gate: waiting for the stack
Next: finish the PR body, then the stack
Ledger:
- R1, R2, R4, R5, R6 and R7 were fixed in 38bb0b8 and verified in
round 2. R3 is fixed in fa66f6c and verified by spec in this
fix-check. A network-enrolled phone stores `ro.serialno`
(`physical-handler.ts:173-192`), so its USB listing is left out. A
USB-enrolled phone stores no serial, so its Wi-Fi listing gets through
and `add` refuses it (`physical-enrollment.ts:257-281`). R8 is fixed in
fa66f6c and verified by spec. A delete triggers a pass at
`converger.ts:985`. `holdFill` stops a fill for the four conditions the
ADR lists: memory pressure, an unserved waiter, the refill delay and
retry backoff (`policy.ts:730-735`, `:751-752`).
State:
{"issue":1131,"branch":"feature/1131-adr","pr":1903,"stacked":true,"last":"a9b17a68fa89","done":"review","mode":"fix","audited":true,"adr":true,"assessment":"complete","rounds":["1:7751c5329ca35597ef5bd3a8939e005f78c32441","2:38bb0b8a22599d7479153973dd21ec60c566b7b7","fix-check:review:fa66f6ca6d83457eb388fa5d344d318f95a9d6d5"],"round":"fix-check","commit":"fa66f6ca6d83457eb388fa5d344d318f95a9d6d5","checkedBase":"067d669809307c65e44afc9ac9071f222fb8bdf7","reviewBase":"067d669809307c65e44afc9ac9071f222fb8bdf7","lenses":1,"findings":"/private/tmp/claude-501/-Users-szymon-chmal--t3-worktrees-pitlane-t3-efaf43a2-67c220de5d3711f2/c430f604-9f7e-4775-9eaf-1b3f8f5f5ebd/scratchpad/findings-1903.json"}

## Review

Spec review: 8 blocking, 8 fixed, 0 notes. Code review: skipped. Claims
review: skipped.
Rounds: 2. Tokens: 2.8M.
Runs: 9. Cost USD: 3.292. Agent seconds: 737.

Assessment: complete

*Written by an agent.*
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.

2 participants