Skip to content

fix(cli): persist terminal reviewer provider and ACP command - #40

Merged
TueVNguyen merged 2 commits into
mainfrom
integration/terminal-reviewer-cli
Sep 6, 2026
Merged

TueVNguyen merged 2 commits into
mainfrom
integration/terminal-reviewer-cli

Conversation

@TueVNguyen

Copy link
Copy Markdown
Collaborator

Integrates #26 by @stephanbrez.

The original change fixes zenith init silently dropping --terminal-reviewer-provider and --terminal-reviewer-acp-command. It persists the selected reviewer configuration and installs assets for its provider.

This maintainer PR merges current main, including #38, into the contribution and resolves the conflict in tests/test_config.py` by retaining both PRs’ tests. No additional functional changes were introduced.

Supersedes #26 for integration purposes.

Validation:

  • Python 3.12: 222 tests passed, 7 skipped.
  • Ruff and mypy passed.
  • 384 provider/command configuration cases passed.
  • CLI checks covered JSON/TOML configuration and quoted command values.

Live ACP smoke tests were skipped.

stephanbrez and others added 2 commits August 19, 2026 12:09
…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>
Resolve the test_config.py conflict by retaining both PR #38 command-inheritance tests and PR #26 terminal-reviewer configuration tests. Preserve the contributor's original commit.
@TueVNguyen
TueVNguyen merged commit 520dd6d into main Sep 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants