Skip to content

fix(cli): refuse review mode until an interactive reviewer exists - #247

Merged
goldbarth merged 1 commit into
mainfrom
fix/refuse-review-mode
Sep 24, 2026
Merged

goldbarth merged 1 commit into
mainfrom
fix/refuse-review-mode

Conversation

@goldbarth

@goldbarth goldbarth commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Follows #19.

  • The gap: docs/configuration.md promised that review.enabled: true presents generated texts for human sign-off. The only registered IReviewer is AutoApproveReviewer, so with review mode on every text was approved without anyone seeing it. A setting that suggests a safeguard and does nothing is worse than no setting.
  • Refused at composition, not at the schema: AddChartulaReview throws when Enabled is set, so chartula.yaml and Chartula__Review__Enabled are covered by the same check. It surfaces as Configuration error: ... with exit code 1, before any GitHub request or model call - the same path as the existing llm.* errors.
  • enabled: false stays valid: the review key remains in ChartulaYamlSchema, so existing configs that spell out the default keep working.
  • Mechanism left in place: ReviewCoordinator, IReviewer and the pipeline step are unchanged. The interactive reviewer that makes review mode usable is tracked in A run with flags looks like a clean run, and a published release's notes are replaced unasked #249.
  • Docs: the review section in docs/configuration.md and chartula.example.yaml say "not available yet". The AutoApproveReviewer and ReviewServiceCollectionExtensions comments no longer claim an interactive reviewer ships with the CLI.

Reproduced before the fix: ReviewWiringTests.Review_mode_on_is_refused_naming_the_key fails on main - review: enabled: true composes without error and registers the auto-approving reviewer.

Verified after the fix, binary from this branch (no tokens spent, the run stops at composition):

$ Chartula__Review__Enabled=true chartula preview --tag v0.1.0-preview.2
Configuration error: review.enabled is not available yet: no interactive reviewer exists, so every text would be approved unseen. Remove it or set it to false.
[exit code: 1]

Same message and exit code with review:\n enabled: true in chartula.yaml.

Tests: ReviewWiringTests (on is refused naming review.enabled; off and absent register the coordinator). Full suite 816 passing, build without warnings, dotnet format clean.

@goldbarth
goldbarth merged commit 1577172 into main Sep 24, 2026
4 checks passed
@goldbarth
goldbarth deleted the fix/refuse-review-mode branch September 24, 2026 01:03
@goldbarth goldbarth self-assigned this Sep 29, 2026
goldbarth added a commit that referenced this pull request Oct 1, 2026
…320)

Follows #319 (ADR 0004); this branch builds on it for the index row and
is rebased onto `main` once #319 is merged.

- **Why:** seven changes since September made Chartula stop where it
used to choose silently, each with its own reasoning in its pull
request, but the rule they share was written down nowhere. A contributor
adding an option or a setting could not tell whether to refuse an
ambiguous value or take the likelier reading, nor when refusing goes too
far.
- **Context** lists the seven cases in one table, each with what the
silent choice did and the change that ended it: a first tag (#198 for
#138, #282), a key sent to the other provider's host (#235), an unknown
or misindented key (#238), a shallow clone read as a first release
(#244), review mode approving unseen text (#247), two configuration
files (#287 for #278), and options a command does not take (#301).
Decided is #198, the first of them.
- **Decision:** stop and say so instead of choosing; before anything is
spent; with a message that names the cause and the fix, shown with two
real messages; ask at a terminal where the answer is the user's, and
stop naming the option without one; refuse only what Chartula can tell
for certain (an empty list, an unknown host and an unknown model id are
taken as written); refuse a setting that would have no effect. The rule
is about what the user meant, not about what the release says, which is
what flags are for.
- **Consequences** name the cost: a run that could have produced
something stops, and a CI job fails until the input says what it means.
The ADR weighs that rerun against what a silent choice cost in the seven
cases. For a new case, four questions in order, so a contributor can
apply the rule rather than match it against the examples.
- The index in `adr/README.md` lists 0005.

**Verified:**
- Each case was checked against its pull request's description and the
issue it closes (#237, #243, #233, #278, #300, #138); the dates are the
merge dates.
- Both messages are the ones `docs/cli.md` and `docs/configuration.md`
show from the built binary.
- The counter-cases were checked in the code: `ProviderHost` accepts
every host but two, `ClaudeThinkingSupport` passes an unknown model id,
#289 reads an empty list as written, and #244 still runs `--since` in a
shallow clone when the range holds.
- Every relative link and anchor in all Markdown files of the repository
resolves (script, with a negative test).

Tests: none, documentation only.
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.

1 participant