Repository navigation
fix(agent-device): accept the leased device's own model as --device - #1807
Conversation
An enrolled phone's model is whatever the phone reports, and it need not appear in the worker's virtual-device catalog. The front checks a `--device` selector on a leased session against the leased device's name or address, then against that catalog, so a client that opens a physical lease by its model was granted the lease and then refused the very next command with `refused: simlock picks the device`. The selector now also matches the leased device's own model, ignoring case, before the catalog lookup. The lease already fixes which device the session uses, so naming its own model cannot move the session to another device; any other model is still refused.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
agent-device open --physical --device <model>leases an enrolled phone, then the next command on that lease is refused withrefused: simlock picks the device.ruleDeviceaccepts--deviceonly when it matches the leased device's name or address, or a catalog model or alias of it. An enrolled phone's model comes from the phone, so the virtual catalog often lacks it.Change
namesLeasedModelaccepts the leased device's own model, ignoring case, before the catalog lookup. The selector is rewritten to the leased address, so it cannot reach another device. Other models are still refused.agent-device.mdx: the selector bullet and the troubleshooting row say what--deviceaccepts, and thattest --devicetakes names and ids only.Verification
edge-request-rules.test.ts: a phone enrolled asSM-S911U, absent from the catalog, getssnapshot --device sm-s911uasserialwith nodevice;SM-S918Uis refused. It fails onmain.toolchain.md, the pre-commit jobs and the website build pass.Workflow: not applicable; one selector check on the existing path.
Review
Spec review: skipped. Code review: 2 blocking, 2 fixed, 0 notes. Claims review: skipped.
Rounds: 3. Tokens: n/a.
One independent model review of the full diff, outside this repo's
reviewerpipeline. Round 1: the website guide did not describe the accepted selector (fixed). Round 2: the guide impliedtest --devicetakes a model (fixed). Round 3: approved.Written by an agent.