Skip to content

fix(cli): handle piped config pull input (CLI-2425) - #6589

Open
7ttp wants to merge 2 commits into
developfrom
7ttp/cli-2425-supabase-config-pull-crashes-with-service-not-found
Open

fix(cli): handle piped config pull input (CLI-2425)#6589
7ttp wants to merge 2 commits into
developfrom
7ttp/cli-2425-supabase-config-pull-crashes-with-service-not-found

Conversation

@7ttp

@7ttp 7ttp commented Sep 13, 2026

Copy link
Copy Markdown
Member

TL;DR

Prevents supabase config pull from crashing when confirmation input is piped
the command could reach promptYesNo without providing stdinLayer

which is now fixed by:
Providing stdinLayer at the command boundary and covering the piped input path with a binary regression test.

Ref:

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

@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

The production fix is correct, but three review concerns are confirmed: missing Stdin wiring remains compile-time-permissible, the new invariant overstates which prompt paths need stdinLayer, and the E2E assertion is not Windows-portable. The proposed timeout-flakiness concern is refuted because stdin is written and closed before the command reaches the prompt. Codex completed its review and reported no findings.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/config/pull/pull.command.ts:79 maintainability claude Missing stdinLayer wiring can still type-check because Stdin is permitted at the root boundary even though the root runtime does not provide it, allowing another prompt-capable command to recreate the runtime defect.
⚪ NIT apps/cli/AGENTS.md:72 documentation claude The new invariant incorrectly says every production path reaching promptYesNo provides stdinLayer, although some safe paths reach the function without providing that layer and cannot enter its Stdin-reading branch.
⚪ NIT apps/cli/src/commands/config/pull/pull.e2e.test.ts:84 test-quality claude The prompt assertion hardcodes a POSIX path separator and will fail on Windows despite correct CLI behavior.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/config/pull/pull.e2e.test.ts:74 (test-flakiness): The decline assertion is flaky because a loaded runner may miss promptYesNo's 100 ms stdin window and apply the default affirmative answer.
    Refuted: The cited timeout exists, but the proposed loaded-runner race is countered by the harness queuing and closing stdin immediately after spawn. The pipe retains that complete line until the command eventually opens its lazy reader, so pre-prompt runner delay does not consume the 100 ms read window.

Stats

Claude findings: 4 · Codex findings: 0 · Confirmed: 3 · Refuted: 1 · 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/pull/pull.command.ts
Comment thread apps/cli/AGENTS.md Outdated
Comment thread apps/cli/src/commands/config/pull/pull.e2e.test.ts Outdated
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.

supabase config pull crashes with Service not found: supabase/runtime/Stdin when stdin is piped into the command.

1 participant