Repository navigation
fix(timeouts): prove install request envelope - #3814
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
The install timeout ledger does not yet prove the 330s and 420s envelopes at d0afa30. Android install, reinstall and install_source on a shutdown emulator can still be cut off by the client before the daemon returns its typed timeout, which is the failure #3327 asks the ledger to rule out. The Android scenarios in install-timeout-ledger.test.ts use
This PR adds new bounds on device-facing routes: adb install 120s, bundletool 120s, adb uninstall 15s, simctl install 120s, and simctl and devicectl uninstall 20s. Before this change, adb install and simctl install had no subprocess bound and ran inside the 180s client envelope. An install that took 120 to 180s used to succeed and would now fail. Nothing in the PR shows that ordinary installs still succeed. Please run install, reinstall and install_source (path and URL) on an Android emulator (an APK, and an AAB through the bundletool fallback) and on an iOS simulator. Each command must succeed, and the request log must show the adb install, bundletool and simctl install calls with their All 16 checks pass at d0afa30, but the CI device lanes do not run an unbooted-emulator AAB install, so green CI does not cover the first point. There are no conflicts. I did not run the ledger test; the numbers above come from adding up the constants at this commit. Two gaps remain outside this diff: cloud providers that implement |
|
Thanks, agreed. I don’t have the Android emulator and iOS simulator validation environment available in my current setup, so I’ll pause this PR rather than push a partial ledger-only update. I’ll resume once I can run the live install, reinstall, and install_source matrix for Android and iOS and include the request log evidence with the timeout values. |
d0afa30 to
07e4342
Compare
|
@thymikee is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the update. The timeout and ledger work now looks right, and the new head (07e4342) fixes the install-family bounds from the earlier review (#3814 (comment)). Two things remain before merge. Android The new shutdown-AVD route has no live evidence. The daemon now calls Could the readiness rule live in one place? For example, Not blocking, and you can take or leave these: uninstall ( The Smoke Tests failure looks unrelated: the iOS phase failed in |
There was a problem hiding this comment.
All reported issues were addressed across 27 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for the update. The ledger and mutation evidence are in good shape, but two things still need work at c5a626e. This follows the earlier 07e4342 review. Android push still has no adb bound. The new shut-down AVD route has only fake coverage. The PR now readies a stopped local AVD and rebinds the new serial before I did not run the ledger suite or the mutations at c5a626e. The tests now use Open review threads: the same-id rebind P1 and the ledger 330s/420s wording P2 still apply, as does the unbounded push broadcast P2 covered above. The aapt timeout thread does not apply, because aapt was unbounded on main and a 15 s typed COMMAND_FAILED is the bound #3327 asks for. The iOS uninstall timeout thread does not apply either, because a hung uninstall never produces the missing-app output the tolerance matches, and the live reinstall shows the 20 s bound succeeding. Please resolve those two. The only check that is not passing is Vercel, which shows a team authorization link for a fork PR. It looks unrelated to the code, but it means the docs change in |
|
Addressed the review at
Passed with |
|
I found no code defects at 84e5cce, and the earlier findings from c5a626e (#3814 (comment)) are fixed. The change still lacks live evidence at this exact commit, so I consider it evidence-pending. The stopped-AVD live run and the iOS simulator install were done at 49ba34b. The diff from there to 84e5cce only touches ledger text, one import order and one test expectation, so I judge that run still covers head, but I did not rerun it. No physical iOS device run exists. I did not run the ledger suite, the unit tests or the mutation experiments at head, so the 23-pass / 11-fail counts and the run-OLvTHD receipt are the author's. Simplicity question: the descriptor field now owns the stopped-AVD scope, but boot and shutdown (https://github.com/callstack/agent-device/blob/84e5cce/src/daemon/session-device-resolution.ts#L88 and #L103) and capabilities and apps (https://github.com/callstack/agent-device/blob/84e5cce/src/daemon/sessions/session-lifecycle/internal/inventory.ts#L278 and #L352) still hard-code the same policy. Because of that split, the advisory device lock for boot and shutdown (https://github.com/callstack/agent-device/blob/84e5cce/src/daemon/request-binding.ts#L151) still resolves running-only while their handlers include stopped AVDs. Could boot, shutdown, capabilities and apps declare The five inline threads no longer apply and are already resolved: the same-id rebind (#3814 (comment)) and the 330s/420s ledger label (#3814 (comment)) are fixed at head, and so is the required adb timeout in native.ts (#3814 (comment)). The 15 s aapt bound (#3814 (comment)) and the 20 s uninstall bound (#3814 (comment)) are intended: the first replaces an unbounded call with the finite typed failure #3327 asks for, and the second cannot hide the missing-app output, and the live reinstall succeeded within it. The only check not passing is Vercel, and it fails on a team authorization link for this fork PR, so no deploy build ran. The two-line change in website/docs/docs/commands.md is checked only by the author's local docs-links gate. No code job fails at head. There are no conflicts. |
|
Addressed the remaining policy consolidation from #3814 (comment) at
All live requests below ran against a fresh daemon built from this exact commit, exited 0, and returned success. Android commands used
Both fixtures were uninstalled. The isolated daemon, fixture server, and tunnel are stopped. No physical iOS device was available.
|
There was a problem hiding this comment.
1 issue found across 9 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/daemon/src/server/__tests__/request-router-selection.test.ts">
<violation number="1" location="packages/daemon/src/server/__tests__/request-router-selection.test.ts:89">
P3: This fixture aliases the Android serial to the display name, so the new cases no longer exercise name selection with distinct device identity fields. Keep the original serial to preserve coverage for accidental `--device`/serial confusion.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
View guided diff | Re-trigger cubic
| '%s keeps stopped-AVD selection consistent through request admission', | ||
| async (command) => { | ||
| const inventoryRequests: Array<{ platform?: string; androidAvdSelection?: string }> = []; | ||
| const stopped = { ...android, id: android.name, booted: false }; |
There was a problem hiding this comment.
P3: This fixture aliases the Android serial to the display name, so the new cases no longer exercise name selection with distinct device identity fields. Keep the original serial to preserve coverage for accidental --device/serial confusion.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/daemon/src/server/__tests__/request-router-selection.test.ts, line 89:
<comment>This fixture aliases the Android serial to the display name, so the new cases no longer exercise name selection with distinct device identity fields. Keep the original serial to preserve coverage for accidental `--device`/serial confusion.</comment>
<file context>
@@ -80,33 +82,37 @@ test('fresh no-app foreground open selects iOS from mixed Android and iOS invent
+ '%s keeps stopped-AVD selection consistent through request admission',
+ async (command) => {
+ const inventoryRequests: Array<{ platform?: string; androidAvdSelection?: string }> = [];
+ const stopped = { ...android, id: android.name, booted: false };
+ const { handler, inspectFacts } = selectionHandler([stopped], inventoryRequests);
+ const selected = await handler({
</file context>
| const stopped = { ...android, id: android.name, booted: false }; | |
| const stopped = { ...android, booted: false }; |
|
I found no code problems at d9d7539, and the issues from the earlier review (84e5cce) are fixed. I did not run the router, unit, ledger or integration suites, or check:affected, at this head. The pass counts, the 3-fail/2-pass mutation result and receipt run-Hmcb5Q are author-reported. I also had no logs to cross-check the live matrix at d9d7539 (request ids in comment 6527356260). No physical iOS device run exists, so the iOS install evidence is simulator-only. Only Vercel fails. It fails on the team authorization link for this fork PR, so no deploy build ran. This update touches only command-registry and daemon sources and tests, not website/, so I read the failure as unrelated to the code. There are no conflicts. The Cubic P3 thread on the stopped-AVD fixture does not apply. Stopped AVDs have id equal to the AVD name ( |
|
Main moved after my review at d9d7539, and this branch now has merge conflicts, so I removed |
d9d7539 to
6bce433
Compare
Summary
Fixes #3327. Install/reinstall/uninstall allow 480s; source installs allow 600s. Native installs have a 120s bound. The ledger covers readiness, metadata, uninstall, install, bundletool, and download with 30s for the daemon result.
This 41-file change also fixes stale readiness bindings and stopped-AVD admission. Command declarations own stopped-AVD scope across request phases. Provider deployment contracts remain intact. Help and release notes document the bounds.
Validation
Rebased onto
dc643f00ca; tested head6bce433f24641a27fe51d19738e0b2b3462be5a4.pnpm check:affected --run --head 6bce433f24641a27fe51d19738e0b2b3462be5a4passed withexactCommit=true; receiptrun-ed4WxZ. Format, lint, types, layering, Fallow, build, related integration, unit, and documentation checks passed.git range-diffretains all 18 patches. The sole conflict preserves main’s shared XML visitor and this PR’s plist timeout. Independent rebase review found no issues.d9d7539passedcheck:affected(run-Hmcb5Q). After rebase: the same command passes at the head above.d9d7539; these were not rerun after rebasing.