fix: propagate remote config through remote flows#422
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 778d1868a6
ℹ️ 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".
| remoteConfig: options.remoteConfig, | ||
| cwd: process.cwd(), | ||
| env: process.env, | ||
| allowActiveFallback: !options.explicitFlagKeys.has('session'), |
There was a problem hiding this comment.
Honor profile session for explicit --remote-config commands
resolveActiveConnectionDefaults now resolves connection defaults even when --remote-config is explicitly provided, but it still enables allowActiveFallback whenever --session was not typed on the CLI. In snapshot/open/... --remote-config <path> flows, this can silently switch from the profile’s session to an unrelated active session (same profile path, different session) if no state file exists for the profile session, so a “self-contained” command can run against the wrong remote run/lease context. Consider disabling active-session fallback when remoteConfig is set (or when the profile supplies session) so the profile scope is deterministic.
Useful? React with 👍 / 👎.
Summary
--remote-configthrough normal commands and reuses/persists remote lease/runtime state, with a warning when explicit remote flags bypass saved runtime hints.disconnectstill permits active fallback for cleanup.is/waitchecks.install-from-source --remote-configwriting and reusing the same lease state.--remote-configto install/open/snapshot/disconnect instead of adding a one-shot command.Touched-file count: 13 files. Scope expanded from the remote connection CLI flow into selector smoke diagnostics to cover Android permission prompt reliability.
Validation
pnpm formatpnpm vitest run src/__tests__/cli-client-commands.test.ts src/__tests__/cli-config.test.ts src/__tests__/remote-connection.test.ts src/utils/__tests__/args.test.ts src/core/__tests__/capabilities.test.tspnpm check:quickpnpm check:unit