Skip to content

fix(core): nuke --delete-devices deletes quarantined virtual devices - #1520

Merged
V3RON merged 5 commits into
mainfrom
bug/1517
Nov 12, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/1517

Conversation

@V3RON

@V3RON V3RON commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1517

Status

Implement: done (R3 fix at a6b8641) Review: round 1, round 2, fix-check x2; 0 open Hardware: n/a Gate: running
Next: gate

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 2 fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 3.7M.
Runs: 15. Cost USD: 4.3085. Agent seconds: 1771.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Deletion paths now accept quarantined devices. When a virtual or physical device transitions to deleted, the transition removes its quarantine retry and timestamp fields. Nuke coverage checks devices with pending retries and devices stranded after three attempts. Physical-enrollment coverage checks the deleted record’s state and quarantine fields.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to a6b86

The change makes the delete-devices option also remove quarantined simulators and emulators and clears their stale retry state. No actionable merge risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: nuke with --delete-devices now deletes quarantined virtual devices. The raw summary shows changes to nuke-service, managed-device-lifecycle, and the quarantine-field c…
Description check Passed The description links the PR to issue #1517 and gives review and implementation status. It does not explain the code change itself, but it relates to the changeset and does not go off-topic. The check…
Linked Issues check Passed Issue #1517 requires that --delete-devices destroy quarantined virtual devices, including a device stranded by device.quarantine-stranded. The reviewed head covers this path. In `src/core/nuke-ser…
Out of Scope Changes check Passed The out-of-scope check finds no unrelated change. The additional changes support deletion of quarantined devices. In src/core/domain.ts, the deleted transition clears quarantineAttempts, `quaran…
Full details: Title check

Explanation

The title names the main change: nuke with --delete-devices now deletes quarantined virtual devices. The raw summary shows changes to nuke-service, managed-device-lifecycle, and the quarantine-field cleanup that support this. The title is specific and matches the linked issue #1517.

Full details: Description check

Explanation

The description links the PR to issue #1517 and gives review and implementation status. It does not explain the code change itself, but it relates to the changeset and does not go off-topic. The check is lenient, so it passes.

Full details: Linked Issues check

Explanation

Issue #1517 requires that --delete-devices destroy quarantined virtual devices, including a device stranded by device.quarantine-stranded. The reviewed head covers this path. In src/core/nuke-service.ts, #currentDestroyable now accepts quarantined devices and passes them to the existing ownership and lease checks. #canOperate accepts "quarantined" as an expected state. In src/core/managed-device-lifecycle.ts, destroy now claims and commits deletion for provisioning, shutdown, and quarantined, so the lifecycle no longer rejects quarantined devices. src/core/nuke.test.ts adds coverage for a device awaiting retry and a device stranded after three attempts. The test checks state deleted, cleared quarantine fields, and driver destroy calls. I did not read the body of resetDevice directly. The conclusion relies on the diff to the gate that resetDevice uses, plus the summary of that path. The issue asks for no non-coding work.

Full details: Out of Scope Changes check

Explanation

The out-of-scope check finds no unrelated change. The additional changes support deletion of quarantined devices. In src/core/domain.ts, the deleted transition clears quarantineAttempts, quarantineNextRetryAt, and quarantinedAt for virtual and physical devices, so a deleted row keeps no stale retry state. In src/core/registry.ts, deleteQuarantined keeps the full transitioned record. The unused-member suppression comment on strandQuarantine is removed. src/core/physical-enrollment.test.ts checks the physical quarantined-delete path. These changes match the review findings listed in the PR description, and they relate to the quarantine lifecycle of deleted devices. The issue does not name them, but it does not forbid them either. The summary does not show any change to unrelated devices or features.

  • 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: a3d46922-1658-4e8c-ae68-1fbf8919068d
Commits

Reviewing files that changed from the base of the PR and between faa2b2b and a6b8641.

Files selected for processing: 6

  • src/core/domain.ts
  • src/core/managed-device-lifecycle.ts
  • src/core/nuke-service.ts
  • src/core/nuke.test.ts
  • src/core/physical-enrollment.test.ts
  • src/core/registry.ts

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

@V3RON

V3RON commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 4edbb7c
Round 2: 3abd48d
Round fix-check: 3abd48d
Round fix-check: a6b8641

Runs: 15. Cost USD: 4.3085. Agent seconds: 1771.
Tokens input 341, output 81872, cache read 7186003, cache write 656959.
- build implementer: claude-sonnet-5-5 75 s $0.1405
- audit implementer: claude-sonnet-5-5 38 s $0.1452
- review 1 reviewer: claude-sonnet-5-5 328 s $0.2379
- review 1 spec: claude-sonnet-5-5 11 s $0.0914
- review 1 code both: claude-opus-5-5 251 s $0.9965
- review 1 claims: claude-sonnet-5-5 21 s $0.1285
- fix 1 implementer: claude-sonnet-5-5 94 s $0.2133
- fix 1 implementer: claude-sonnet-5-5 90 s $0.1656
- review 2 reviewer: claude-sonnet-5-5 46 s $0.166
- review fix-check reviewer: claude-sonnet-5-5 334 s $0.2671
- review fix-check code behaviour: claude-opus-5-5 165 s $0.8779
- fix fix-check implementer: claude-sonnet-5-5 76 s $0.1867
- review fix-check reviewer: claude-sonnet-5-5 148 s $0.2127
- review fix-check code behaviour: claude-opus-5-5 72 s $0.3823
- review fix-check claims: claude-sonnet-5-5 22 s $0.0969
Finding outcomes: {"fixed":3}. Classes: {"architecture 10":1,"deleted row keeps quarantine retry fields":1,"documentation 7":1}.
{"findings":[{"id":"R1","role":"code","class":"architecture 10","outcome":"fixed","path":"src/core/domain.ts","round":"1","fix":"17d876dc1"},{"id":"R2","role":"claims","class":"documentation 7","outcome":"fixed","path":"src/core/AGENTS.md","round":"1","fix":"17d876dc1"},{"id":"R3","role":"code","class":"deleted row keeps quarantine retry fields","outcome":"fixed","path":"src/core/registry.ts","round":"fix-check","fix":"a6b864130"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 12, 2026 10:07
@V3RON
V3RON merged commit e2fe08c into main Nov 12, 2026
66 checks passed
@V3RON
V3RON deleted the bug/1517 branch November 12, 2026 10:11
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.

nuke --delete-devices skips a quarantined device, so a stranded one keeps its capacity slot

1 participant