Repository navigation
fix(device): install --wait waits for the install itself - #242
Merged
Merged
Conversation
install --wait returned as soon as the session was usable, but a session stays ready while a new build installs, so it came back before the app was there. It now also polls the session block's install.status (dcd #1748) until the build is installed or failed. A failed install exits 2 with the reason and says the session is still open; start --app --wait does the same. An API without install status returns as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018tQfgpTsA9UhcopKoDezUA
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Needs devicecloud-dev/dcd#1748, which adds
installto the session block. Without it, the behaviour is as before.Bug
Found re-testing on dev.
dcd device install <id> --app-binary-id … --waitreturned straight away when the session was already usable. A session staysreadywhile a new build installs, and--waitonly waited on the state, so it came back before the app was there. Alaunchright after could find the old build or none.Fix
install --waitnow, once the session is usable, pollssession.installuntil the build is no longerinstalling:installed: exit 0, "Installed com.example".failed: exit 2, with the reason and "Session … is still open". In--json, the reason is inerror.install: returns at once, as before.start --app … --waitdoes the same after the device is ready, so a build that can't be installed exits 2 instead of looking like a success.DeviceSessiongains the optionalinstallfield.Tests
Three new tests in
device-command.test.ts: waits throughinstallinguntilinstalled, exits 2 onfailedwith the reason, and doesn't hang on an API without the field.pnpm lint,pnpm typecheck,pnpm test:unitandpnpm buildpass.🤖 Generated with Claude Code
https://claude.ai/code/session_018tQfgpTsA9UhcopKoDezUA