fix: simplify install-from-source identity resolution#219
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79e297865a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/platforms/install-source.ts
Outdated
| requestSignal?.removeEventListener('abort', onAbort); | ||
| clearTimeout(timeoutHandle); |
There was a problem hiding this comment.
Keep source-download timeout active while streaming body
The timeout/cancel wiring is removed immediately after fetch resolves headers, before the response body is copied to disk. That means install_from_source downloads can still hang indefinitely on slow or stalled body streams (and ignore request cancellation) even when AGENT_DEVICE_SOURCE_DOWNLOAD_TIMEOUT_MS is set, so the new timeout guarantee is not actually enforced for the full download path.
Useful? React with 👍 / 👎.
Summary
Add deterministic install-from-source identity resolution and an explicit retained-materialization contract at the daemon boundary.
packageName/bundleIdpluslaunchTargetfrom install flowsAGENT_DEVICE_SOURCE_DOWNLOAD_TIMEOUT_MSactive through the full download, including body streamingretainPaths: trueforinstall_from_source, returning daemon-managedinstallablePath, optionalarchivePath,materializationId, andmaterializationExpiresAtagent_device.release_materialized_pathsand auto-clean retained paths on session close or TTL expiryValidation
pnpm typechecknode --test src/daemon/__tests__/materialized-path-registry.test.ts src/daemon/handlers/__tests__/session.test.ts src/daemon/handlers/__tests__/session-reinstall.test.tsnode --test src/platforms/android/__tests__/index.test.ts src/platforms/ios/__tests__/index.test.tspnpm test:smokenode --test src/daemon/__tests__/http-server.test.ts(new assertions pass, but this file still does not terminate cleanly in this environment)