refactor(runner): unify CLI + webui executor option builder, fix WithRegistry drop#1570
Merged
Conversation
…ground Add runner.BuildExecutorOptions as the single source of truth for assembling pipeline.ExecutorOption lists, and runner.LaunchForeground for CLI-shaped synchronous runs. Both LaunchInProcess (webui) and the CLI's runOnce now funnel through these primitives so option drift between the two paths is no longer possible. Fixes a latent bug where webui's LaunchInProcess never called pipeline.WithRegistry, so manifest-declared adapter binaries (e.g. forks named "opencode-patched") were silently dropped on dashboard-launched runs. BuildExecutorOptions always seeds an adapter.Registry from the manifest's Adapters[*].Binary entries. LaunchForeground also pulls the running/heartbeat/terminal status transitions out of cmd/wave/commands/run_stages.go runOnce so that the cancelled/rejected/failed/completed dispatch lives in one package — both launch shapes share the contract-rejection handling that used to be CLI-only. Closes #1566.
Address review feedback on PR #1570: - SkipStatusUpdates docstring incorrectly implied the CLI sets it true. Both CLI and webui leave it false (default) — LaunchForeground owns status transitions. Comment now reflects this. - Add coverage for MockOverride=true: confirms manifest-declared adapters are rerouted through the supplied runner so pipelines pinning a non-mock adapter still hit the mock under --mock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1566. First Phase 0 child of Epic #1565.
What
runner.BuildExecutorOptions— single source of truth for assemblingpipeline.ExecutorOptionlists. BothLaunchInProcess(webui) and CLI'srunOnceuse it.runner.LaunchForeground— synchronous-run primitive for the CLI. Owns running/heartbeat/terminal status transitions (running → cancelled/rejected/failed/completed) so the dispatch logic lives in one package.runOncebecomes a thin wrapper aroundLaunchForeground. Thepipeline.NewDefaultPipelineExecutorcall no longer happens incmd/wave/commands/.Bug fix
runner.LaunchInProcesspreviously skippedpipeline.WithRegistry, silently dropping manifest-declared adapter binaries (e.g. forks likeopencode-patched) on every dashboard-launched in-process run.BuildExecutorOptionsalways seeds anadapter.Registryfromcfg.Manifest.Adapters[*].Binary.Diff
+615 / -172across 6 files (3 new, 3 modified)Tests
go test ./...passes.internal/runner/options_test.gocovers: registry-from-manifest (the bug fix), nil-manifest fallback, runtime override permutations (model/force-model/adapter/preserve/auto-approve), step filter parsing.Acceptance vs #1566
runner.LaunchForeground), no direct executor access fromcmd/runner.LaunchInProcess(viaserver_launcher.launchInProcess); registry bug fixedgo vet ./...clean)