fix(cli): handle piped config pull input (CLI-2425) - #6589
Open
7ttp wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🤖 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.
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.
TL;DR
Prevents
supabase config pullfrom crashing when confirmation input is pipedthe command could reach
promptYesNowithout providingstdinLayerwhich is now fixed by:
Providing
stdinLayerat the command boundary and covering the piped input path with a binary regression test.Ref: