Repository navigation
fix(operation): use all apps' operations unless --app or --worker is given - #273
Conversation
There was a problem hiding this comment.
Warning
Changes suggested — 🟡 1 warning
🔍 Full review · 3 files reviewed
Verification
Selector::getSelectionwithselectRemoteContainer: falsestill reads--appintoappName. It just skipsselectRemoteContainer, so the prompt and the non-interactive 'required' error no longer happen without--app/--worker.withRemoteContainerpasses on the selection's app name, so--app otherresolves to theotherapp, and--workerstill goes throughselectWorkerName.isset($serviceOperations[$operationName])matches the old name-equality loop, becausegetRuntimeOperations()returns arrays keyed by operation name.- The helper's
t.Cleanupcalls replace the old deferredClosecalls, so the servers outlive the test's parallel subtests as before.
TestRuntimeOperationRunAmbiguous is new: it covers listing across two apps, the ambiguous-run error with no POST sent, and the --app way out. The existing TestRuntimeOperationRun now uses the shared setup helper. The tests run in the ci.yml integration-test, integration-test-legacy-auth and integration-test-cross jobs. None of them covers workers or interactive mode.
Review details
- Commit: 605febb
- Model: claude-opus-5-5
Review 1 of 10 for this pull request · View the full run
|
📋 PR Summary
Changes
|
…given The operation commands selected an app before reading the operations, so without --app or --worker they failed in non-interactive mode when an environment had several apps, and otherwise asked for an app and ignored the answer. They now select an app only when one of those options is given. operation:run now also reports an operation defined on more than one app when it is given by name, as it does when choosing one interactively, instead of running the last one found. The message's markup is fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A worker's deployment entry can repeat its app's operations. Without --app or --worker, such an operation was reported as defined on more than one app. It now runs on the app, and on the worker with --worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
269117b to
7dd25c4
Compare
operation:listandoperation:runselected an app before reading the operations. Without--appor--worker, on an environment with several apps, they:They now select an app only when
--appor--workeris given (selectRemoteContainer: false, thenSelector::withRemoteContainer()).That made a second bug reachable:
operation:run <name>ran the last match when several apps define the operation. It now reports the conflict, as the interactive chooser already did. The message's markup (<error></error>--app</error>) is fixed.A worker's deployment entry can repeat its app's operations. Such an operation runs on the app, or on the worker with
--worker, rather than being reported as a conflict.The runtime operation test's setup is extracted into a helper, so that a new test can use two apps.
🤖 Generated with Claude Code