fix(cli): wire --terminal-reviewer-provider/acp-command through to config#26
Open
stephanbrez wants to merge 1 commit into
Open
Conversation
…nfig The --terminal-reviewer-provider and --terminal-reviewer-acp-command flags were accepted by click but silently dropped in _resolve_selection: ProviderSelection had no terminal_reviewer fields, so the values never reached env() and were never written to .mcp.json or .codex/config.toml. HarnessConfig already reads ZENITH_TERMINAL_REVIEWER_PROVIDER and ZENITH_TERMINAL_REVIEWER_ACP_COMMAND with a full terminal_reviewer -> validator -> worker cascade — only the write side was broken. Add terminal_reviewer and terminal_reviewer_acp_command fields to ProviderSelection, with resolved_terminal_reviewer and resolved_terminal_reviewer_acp_command properties mirroring the validation_worker pattern. Update env() to emit the terminal-reviewer vars only when they differ from the validator's (the cascade parent), matching the validator's comparison against the worker. Update providers() and skill dirs to include the terminal reviewer for asset installation when it's a distinct provider. Issue creation is restricted on this repository, so a PR is filed directly per CONTRIBUTING.md's fallback for small fixes. Tests: - terminal-reviewer provider + acp-command land in .mcp.json env. - unset flags emit no terminal-reviewer env keys (cascade handles it). - three distinct providers (claude/codex/hermes) all write their env vars in a single init. - round-trip: a distinct terminal reviewer written by env() is read back intact by HarnessConfig.discover(). - round-trip: with no explicit terminal reviewer, env() omits the vars and discover() reconstructs the validator as the cascade fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
--terminal-reviewer-providerand--terminal-reviewer-acp-commandflags were accepted by click but silently dropped in_resolve_selection:ProviderSelectionhad noterminal_reviewerfields, so the values never reachedenv()and were never written to.mcp.jsonor.codex/config.toml.HarnessConfigalready readsZENITH_TERMINAL_REVIEWER_PROVIDERandZENITH_TERMINAL_REVIEWER_ACP_COMMANDwith a fullterminal_reviewer -> validator -> workercascade — only the write side was broken.Fix
terminal_reviewerandterminal_reviewer_acp_commandfields toProviderSelection, withresolved_terminal_reviewer/resolved_terminal_reviewer_acp_commandproperties mirroring the existingvalidation_workerpattern.env()to emit the terminal-reviewer vars only when they differ from the validator's (the cascade parent), matching how the validator compares against the worker.providers()and the skill dirs so its assets get installed when it's a distinct provider.Tests
.mcp.jsonenv.env()is read back intact byHarnessConfig.discover().env()omits the vars anddiscover()reconstructs the validator as the cascade fallback.All three CI checks pass locally:
ruff check .,mypy src,pytest -q(207 passed, 7 skipped).🤖 Generated with Claude Code