Repository navigation
Reserve a device for one kind of work (growth phone guard) - #106
Merged
Merged
Conversation
Release v0.6.1
Release v0.6.2
Release 0.7.0
Release 0.7.1
Release 0.7.2
Bumps and [fast-uri](https://github.com/fastify/fast-uri). These dependencies needed to be updated together. Updates `fast-uri` from 3.1.7 to 3.1.8 - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.7...v3.1.8) Updates `fast-uri` from 4.1.4 to 4.2.1 - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.7...v3.1.8) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.8 dependency-type: indirect - dependency-name: fast-uri dependency-version: 4.2.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [fastify](https://github.com/fastify/fastify) from 5.12.1 to 5.12.5. - [Release notes](https://github.com/fastify/fastify/releases) - [Commits](fastify/fastify@v5.12.1...v5.12.5) --- updated-dependencies: - dependency-name: fastify dependency-version: 5.12.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/7rulnik/source-map-js/releases) - [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md) - [Commits](7rulnik/source-map-js@v1.2.1...v1.2.2) --- updated-dependencies: - dependency-name: source-map-js dependency-version: 1.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Release 0.8.0
Installers copy skills/ from the release
Release v0.9.0
Release v0.9.1
A device reserved with `fleet device reserve <id> <label>` is offered only
to a job whose new `reservation` field is that label and that pins the
device by id (targets.device_id, or a targets.match such as
device_id == '<id>'). Fan-out, pools, unpinned matches, the composer's
preview, device-executor claims and host-executor routing pass it by, and
the host executor applies the same rule to the devices it can see, from the
`reserved_devices` map its claim now carries. A job that pins a reserved
device without the label is refused with device_reserved.
For the growth pilot's signed-in Instagram phone on ultra, which would
otherwise be open to any os ~ 'android' job, a fan-out or the explore night.
Reservations are a table in the brain's database (device_reservations), so a
phone can be reserved before it is cabled up and survives the registry
forgetting it. POST /api/v1/devices/{id}/reserve and /unreserve (admin);
reserved_for on /api/v1/devices, `fleet devices` and fleet_devices;
`fleet run --reservation`.
Also fixes the executor describing an Android target without device_id, so a
host job pinned by targets.match "device_id == '<serial>'" was routed to the
right executor and then matched nothing there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Galaxy S8+ (
988a1b3541354f565a) is about to be cabled to ultra and kept for one job: driving the Instagram app for the growth pilot (taylab-launch-kit#229,ui-testjobs pinned withtargets.matchto that id,targets.executor: ultra-phone,max_attempts: 1). Once ultra runs an executor, any other Android host job could claim that signed-in phone and open other apps on it: an ad hocos ~ 'android', a fan-out, the explore night, or a schedule without a pin. Pools and matches can't stop that, because they describe what a job wants. A reservation describes what the device accepts.What
fleet device reserve <id> <label> [--note T]/fleet device unreserve <id>, backed byPOST /api/v1/devices/{id}/reserveand/unreserve(admin scope). Reservations go in a newdevice_reservationstable, not on the device row. That way a phone can be reserved before it is cabled up, and the reservation survives the registry forgetting the device.collector/src/reserved.ts, pure). A reserved device goes only to a job that has both:"reservation": "<label>", a new top-level job fieldtargets.device_id, or atargets.matchthat pins its id. "Pins" is tested by behaviour: the expression must match the device and must stop matching when its id (and aserialequal to it) is swapped for another.device_id == 'X' && …pins;device_id == 'X' || os ~ 'android'does not.matchingDevices: fan-out and the composer previewspecEligibleFor: device-executor claims and preemptionexecutorsHolding: host routing, so an unpinned Android job no longer routes to ultra just because the reserved phone is attached thereselectTargets, which gets every reservation asreserved_devicesin the/executor/next-jobanswer. This is a new optional protocol field, not stored on the job.web-shotsAndroid-Chrome profiledevice_reserved(409). Validate warnsleft out as reserved for other work: <id> (<label>), and fan-out'sno_matching_devicesnames the reserved devices it left out.reserved_foron/api/v1/devices, aRESERVEDcolumn infleet devices,reserved_forinfleet_devices, andfleet run --reservation LABEL. The skill tells agents to leave reserved devices alone.device_id. So the kit'sdevice_id == '<serial>'pin was routed to the right executor and then matched nothing there (skip, "no targets"). The executor's descriptor now includesdevice_id.For the growth phone (kit #229)
fleet device reserve 988a1b3541354f565a growth-instagram --note "Instagram growth pilot, signed in"and each job spec adds one top-level field:
{ "reservation": "growth-instagram", "targets": { "executor": "ultra-phone", "match": "device_id == '988a1b3541354f565a'", "exclusive": true }, "lease": { "max_attempts": 1 } }Tests
cd collector && npm test: ALL PASS. The dashboard build ran too. New smoke section 41 covers reserve-before-register, conflicts, the shelf listing, fan-out with and without the label, validate warnings,device_reservedon both enqueue routes, host routing (the phone's executor skips the unpinned job and takes the growth job; the claim carriesreserved_devices), a reserved device-executor agent, and unreserve. Newsrc/reserved.test.tscovers the rule and the executor'sselectTargets, including thedevice_idmatch fix.cd fleet && npm test: 82 pass, 2 skipped (pre-existing). New CLI test for reserve, list, conflict, the refused pin, a run with--reservation, and unreserve; the MCPfleet_devicestest now checksreserved_for.mkdocs build --strict: clean.Notes
mainand opened againstmainas asked. CONTRIBUTING says feature branches come fromdevelop, anddevelopis ahead (Explore: survive a dropped model, judge only missions that drove the app, fail fast on Xcode's first launch #101, Move the lab's brain to ultra #105). This branch doesn't touch those files apart fromCHANGELOG.md's[Unreleased]section.reserved_devices, so the guard is only complete once ultra's brain and executors run this code.🤖 Generated with Claude Code