fix(worker): resolve omitted commands from requested provider - #499
Open
HsienW wants to merge 1 commit into
Open
fix(worker): resolve omitted commands from requested provider#499HsienW wants to merge 1 commit into
HsienW wants to merge 1 commit into
Conversation
- derive omitted worker commands from explicit provider presets - preserve explicit command precedence and custom-provider fallbacks - document provider and command precedence in the generated hive protocol - add regressions for provider-only, custom, and invalid-provider launches
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.
What & why
Provider only spawn requests could resolve the requested provider correctly while still launching the configured default command. For example, a Codex request with no explicit command could launch
claudewith Codex specific arguments.This change derives an omitted command from the explicit provider preset while preserving explicit command precedence and custom provider fallbacks. It also documents the same precedence in the generated hive protocol.
Fixes #462.
This also addresses the provider without command root cause in the spawn request reproduction from #280. The broader startup failure reporting, session readiness, and UI spawn concerns in #280 remain out of scope.
Type of change
Evidence
Before
On
main, the same provider only launch probe falls back to the configuredclaudecommand even though the requested provider is Codex or OpenCode.For Codex, this produces the mismatched launch shape:
After
With this change applied, the same probe derives the executable from the requested provider when no explicit command is supplied.
Explicit commands still take precedence, and custom providers continue to use the configured fallback rather than being mapped to a built in provider command.
How I tested it
buildWorkerLaunch()PowerShell probe before and after the change to verify provider only command resolution.Validation:
npm run typecheck: passes.npm run build: passes.git diff --check: passes.npm run test:focused: not fully green on Windows. The remaining failures are limited to existing Windows specific cases around symlink permissions, HOME/Temp overrides, and CRLF sensitive source regex assertions. None of those failures exercise the three files changed by this PR, and the issue focused coverage for provider command resolution is fully passing.I also reviewed the failing test names against this diff and did not find overlap with the worker launch, generated hive protocol, or related regression changes.
Checklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.DESIGN.md/tokens.tswith no ad hoc colors, spacing, or fonts. No UI was added in this PR.ATTRIBUTION.md. No art was added in this PR.