Skip to content

fix(cli): honour config push consent (CLI-2450) - #6670

Open
7ttp wants to merge 2 commits into
developfrom
7ttp/fix-config-push-consent
Open

7ttp wants to merge 2 commits into
developfrom
7ttp/fix-config-push-consent

Conversation

@7ttp

@7ttp 7ttp commented Sep 18, 2026

Copy link
Copy Markdown
Member

TL;DR

Fixes config push applying remote changes after a piped n in agent mode.

whats wrong?

JSON/stream-json confirmations return the default before reading stdin. With config push defaulting to yes, an explicit decline is ignored.

now fixed by

Honor piped answers in machine output and require affirmative input or --yes/SUPABASE_YES for unattended updates. Interactive text confirmations retain their yes default.

ref:

@7ttp 7ttp self-assigned this Sep 18, 2026
@7ttp
7ttp requested a review from a team as a code owner September 18, 2026 00:33

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews completed. After deduplication, all seven findings are confirmed. The most consequential issues are a silent no-op for text output with redirected stdout and a shared-helper change that unintentionally alters confirmation behavior across unrelated machine-mode commands. The literal -o json example from Claude is not affected because it uses the text layer; the confirmed regression applies to --output-format json|stream-json.

Findings

Severity Location Category Sources Claim
🟠 MAJOR apps/cli/src/commands/config/push/push.handler.ts:290 correctness claude With text output, TTY stdin, and redirected stdout, each changed resource is silently skipped after its “Updating … service with config:” diagnostic, and the command exits successfully without a prompt or skip summary.
🟠 MAJOR apps/cli/src/command-internal/prompt-yes-no.ts:45 behavioral-regression claude+codex The config-push fix changes every default-interactive promptYesNo caller in `--output-format json
🟡 MINOR apps/cli/src/commands/config/push/push.e2e.test.ts:96 test-coverage claude The new subprocess test does not prove that piped consent is honored because it supplies n, which produces the same skipped result as ignoring stdin and applying the machine-mode false default.
🟡 MINOR apps/cli/src/commands/config/pull/SIDE_EFFECTS.md:6 documentation claude The config-pull compatibility document incorrectly says JSON modes return the confirmation default without reading stdin, although the shared helper now reads and honors piped answers.
🟡 MINOR apps/cli/src/commands/config/push/push.integration.test.ts:361 test-coverage claude The integration fixture commonly combines text output marked interactive with stdoutIsTty=false, an impossible production state that obscures redirected-stdout behavior.
⚪ NIT apps/cli/src/commands/config/push/SIDE_EFFECTS.md:177 documentation claude The consent documentation omits the text-output case where stdin is a TTY but stdout is redirected, even though that case silently defaults and skips without rendering a prompt.
⚪ NIT apps/cli/src/command-internal/prompt-yes-no.ts:41 consistency claude Machine-mode confirmation diagnostics are asymmetric: --yes echoes the question and answer to stderr, while an answer consumed from piped stdin is silent.

Findings outside the diff

  • 🟡 MINOR apps/cli/src/commands/config/pull/SIDE_EFFECTS.md:6 — The config-pull compatibility document incorrectly says JSON modes return the confirmation default without reading stdin, although the shared helper now reads and honors piped answers.
  • 🟡 MINOR apps/cli/src/commands/config/push/push.integration.test.ts:361 — The integration fixture commonly combines text output marked interactive with stdoutIsTty=false, an impossible production state that obscures redirected-stdout behavior.

Stats

Claude findings: 7 · Codex findings: 1 · Confirmed: 7 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5 + gpt-5.6-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/src/commands/config/push/push.handler.ts Outdated
Comment thread apps/cli/src/command-internal/prompt-yes-no.ts Outdated
Comment thread apps/cli/src/commands/config/push/push.e2e.test.ts Outdated
Comment thread apps/cli/src/commands/config/push/SIDE_EFFECTS.md
Comment thread apps/cli/src/command-internal/prompt-yes-no.ts
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.

config push applies remote changes despite an explicit piped "n" when agent mode is auto-detected

1 participant