Background
PR #103 introduced `maybeWarnProxyEnvMode` in `cmd/app/env.go:22-27` which is called from every `app env` subcommand (`set`/`get`/`list`/`unset`). Each call issues a remote SSH `cat /opt/conoha//.conoha-mode` just to decide whether to print a one-line warning.
For read-only subcommands this doubles the SSH work — `app env list` already issues one `cat` for the env file itself, and now a second for the marker. Scripts that loop over many apps pay this round-trip per call.
Proposal
Either:
- Skip the warning for read-only subcommands (`get`, `list`). The warning is primarily useful when the user is writing values that won't be picked up.
- Cache the marker read in `appContext` — `ReadMarker` once in `connectToApp`, stash the result, and have `maybeWarnProxyEnvMode` consume the cached value.
Option 2 benefits every other command that calls `ResolveMode` after `connectToApp` too.
Acceptance
- `app env list` makes one SSH `cat` round-trip, not two.
- Warning behavior preserved for `set`/`unset` against proxy-mode apps.
Pointer
- `cmd/app/env.go:22-27` — `maybeWarnProxyEnvMode`
- `cmd/app/connect.go` — `appContext` (candidate for cached `Mode` field)
Surfaced by review on PR #103 (item I5).
Background
PR #103 introduced `maybeWarnProxyEnvMode` in `cmd/app/env.go:22-27` which is called from every `app env` subcommand (`set`/`get`/`list`/`unset`). Each call issues a remote SSH `cat /opt/conoha//.conoha-mode` just to decide whether to print a one-line warning.
For read-only subcommands this doubles the SSH work — `app env list` already issues one `cat` for the env file itself, and now a second for the marker. Scripts that loop over many apps pay this round-trip per call.
Proposal
Either:
Option 2 benefits every other command that calls `ResolveMode` after `connectToApp` too.
Acceptance
Pointer
Surfaced by review on PR #103 (item I5).