Repository navigation
test(cli): exercise interactive selector routes - #2777
Conversation
Problem PTY snapshots covered terminal rendering but did not establish a controlling terminal or drive the CLI through its external fzf path. Completion protocol coverage also stayed in-process. What changed Configure the PTY child with the requested window size and controlling terminal. Add real-process contracts for the Click bash-completion protocol, fzf's ranked-row selection route, and picker-visible terminal dimensions. Compatibility/migration Test infrastructure only; no production behavior changes. Co-Authored-By: Codex <[email protected]>
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c639b087c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Problem The interactive harness now applies the requested terminal size to the child process, so the renderer-only terminal snapshots no longer describe the CLI's actual width-sensitive output. The completion process test also accepted any rendered output that happened to mention one root option. What changed Regenerate the affected help snapshots and assert the exact Click bash completion records emitted for the origin prefix. Compatibility/migration Test fixtures only; no production behavior changes. Co-Authored-By: Codex <[email protected]>
|
Adversarial self-review iteration 1 Findings:
Verification: env POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest POLYLOGUE_PYTEST_WORKERS=1 nix develop --command devtools test tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_interactive_cli.py passed 12 tests. What survived scrutiny: the fzf route is a real CLI to external-process path; its deterministic first-row chooser still fails if candidate order or the selected result changes. |
|
Adversarial self-review iteration 2 Findings:
The existing inline snapshot review thread is resolved with the 12-test focused verification evidence. No code changed in this iteration, so no additional commit was appropriate. What survived scrutiny: the fzf selection and terminal-size paths remain real subprocess/TTY routes, and the completion assertion now checks Clicks exact bash protocol records. |
|
Adversarial self-review iteration 3 No new legitimate gaps found. The full branch diff, bead notes and ACs, PR conversation, and thread-aware review state were rechecked. The only substantive inline review is resolved; CodeRabbit remains rate-limited, and the known all-jobs-at-init CI failure pattern was not treated as a branch finding. What survived scrutiny: the completion, fzf selection, and terminal-size tests exercise real child processes and a controlling TTY. The three larger bead requirements remain accurately deferred rather than implied complete. |
|
Final acceptance-criteria matrix for polylogue-th0
No criterion is marked satisfied in full. This PRs delivered slice is the PTY substrate, three non-vacuous real-process exemplars, exact bash-completion protocol coverage, and refreshed terminal-width snapshots. |
…789,2792,2797 d3xj, w8et, w379 (cost-honesty, PR #2776), fs1.3 (hermes-wedge, PR #2789), and f2qv.5 (usage-convergence, PR #2797) fully satisfied — closed. cuxz (temporal-provenance, PR #2786), th0 (test-harness, PR #2777), and fs1.11/ fs1.12 (hermes-wedge cluster, PR #2792) partially satisfied — noted with disposition, left open per closure-discipline (no closing on partial ACs). Co-Authored-By: Claude <[email protected]>
Summary
Add a real PTY test boundary for the interactive CLI: Click shell completion, fzf selection, and terminal-size propagation.
Problem
Existing terminal tests captured output but did not attach a controlling terminal, invoke the real external picker, or execute Click shell completion through its installed process protocol. Those gaps could let interactive-only regressions pass.
Solution
The PTY harness now applies its requested window size and gives the child process a controlling terminal. Three process-route tests use an isolated archive and deterministic fzf stand-in to prove completion output, ranked picker selection, and picker-visible terminal dimensions. The child-width change also refreshes the affected terminal snapshots; that full fixture refresh records pre-existing annotations-command inventory drift at each tested width.
Verification
Acceptance criteria
Ref polylogue-th0
Anti-vacuity
Adversarial review notes