Skip to content

feat(leasing): a worker serves only enrolled devices on a platform whose virtualDevices is false - #1623

Draft
V3RON wants to merge 23 commits into
feature/1588-adrfrom
task/1598
Draft

V3RON wants to merge 23 commits into
feature/1588-adrfrom
task/1598

Conversation

@V3RON

@V3RON V3RON commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1598

Status

Implement: done (9/9 green) Review: round 2 passed (R1, R2 fixed) Hardware: n/a Gate: waiting for the stack
Next: CI on the head; then ready, in stack #1592 → #1623

  • pnpm test:changed passes, with every Tests line above as a test. B1 config-platform-and-driver-settings.test.ts; B2, B3, B6 (catalog.get) and B7 dispatcher-virtual-devices-off.test.ts; B6 (CLI) index-catalog-components.test.ts; B5 create-leasing-virtual-devices-off-startup.test.ts; B4 create-leasing-warm-pool-virtual-devices-off.test.ts; B10 doctor-warm-pool-targets.test.ts.
  • pnpm check passes, the protocol-bump check included: protocol max is 92 (src/contract/protocol.ts); the pre-push hooks passed.
  • The website build passes: 92 pages built, check-openapi: 45 operations, 12 tags: ok.
  • docs/internal/EVENTS.md and reference/events.mdx list virtual-devices-off as an initiator of device.shutdown and device.deleted.

Assumptions

  • Assumption: the doctor's config slice — DoctorConfig is narrowed with Pick to the two virtualDevices flags it reads, the smallest change.
  • Assumption: the startup delete's operation name — it logs as a cleanup ("Could not delete an idle device at start"), matching the existing startup steps.
  • Assumption: where the reserve is zeroed — in the warm-pool converger and in doctor through reserveOnVirtualPlatforms, not inside the policy view, so the policy stays pure.
  • Assumption: B6 is proved at two seams — catalog.get through the dispatcher and the CLI print through the CLI test, because the Tests line names both.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 6.1M.
Runs: 10. Cost USD: 8.0086. Agent seconds: 2373.
Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 16, 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

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

V3RON added 16 commits November 16, 2026 21:10
@V3RON
V3RON added this pull request to stack #1625 November 16, 2026 20:22
@V3RON

V3RON commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: ab4578b
Round 2: 2638b45

Runs: 10. Cost USD: 8.0086. Agent seconds: 2373.
Tokens input 541, output 142177, cache read 32535377, cache write 887860.
- build implementer: claude-sonnet-5-5 1033 s $4.0054
- audit implementer: claude-sonnet-5-5 231 s $0.5033
- review 1 reviewer: claude-sonnet-5-5 432 s $0.3152
- review 1 spec: claude-sonnet-5-5 39 s $0.2932
- review 1 code both: claude-opus-5-5 355 s $1.9555
- review 1 claims: claude-sonnet-5-5 46 s $0.2578
- fix 1 implementer: claude-sonnet-5-5 41 s $0.1193
- review 2 reviewer: claude-sonnet-5-5 128 s $0.2051
- review 2 code tests: claude-opus-5-5 53 s $0.2696
- review 2 claims: claude-sonnet-5-5 15 s $0.0842
Finding outcomes: {"fixed":2}. Classes: {"comment false: failed destroy leaves shutdown":1,"testing 10 title promises unproven other-platform grant":1}.
{"findings":[{"id":"R1","role":"code","class":"testing 10 title promises unproven other-platform grant","outcome":"fixed","path":"src/daemon/dispatcher-virtual-devices-off.test.ts","round":"1","fix":"2638b4546acc8f3f2cfdcd856a80bd9cdda817c6"},{"id":"R2","role":"claims","class":"comment false: failed destroy leaves shutdown","outcome":"fixed","path":"src/core/create-core.ts","round":"1","fix":"2638b4546acc8f3f2cfdcd856a80bd9cdda817c6"}]}

Written by an agent.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A worker serves only enrolled devices on a platform whose virtualDevices is false

1 participant