Skip to content

test(tui): cover clipboard helper polling decisions - #255

Merged
KooshaPari merged 1 commit into
fix/clipboard-helper-ownership-231from
codex/pr253-poll-decision-6687507-20261106
Nov 11, 2026
Merged

KooshaPari merged 1 commit into
fix/clipboard-helper-ownership-231from
codex/pr253-poll-decision-6687507-20261106

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

User description

Extract the clipboard helper polling decision into a shared function and exercise observed success, failure, errors, pending, and deadline outcomes without spawning a helper.

Validation: the exact in-tree Linux test passed (1 passed, 2,550 filtered out); a standalone mutation changing deadline-unconfirmed to accepted failed as expected. Formatting and diff checks passed.

This covers polling classification only. Clipboard stdin backpressure, helper cleanup, supersession, and real clipboard behavior remain separate unverified gates.


Tracks #271 (residual agent PR backlog): the Require Linked Issue gate failed only because this PR predates the issue.


CodeAnt-AI Description

Add coverage for clipboard helper polling outcomes

What Changed

  • Add checks that distinguish successful and failed helper exits, polling errors, pending results, and results that remain unconfirmed at the deadline.

Impact

✅ Catches regressions in clipboard fallback decisions
✅ Prevents deadline results from being mistaken for success
✅ Preserves fallback after reported helper failures

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

tx-agent: codex

tx-validated: test
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

@KooshaPari
KooshaPari marked this pull request as ready for review November 11, 2026 13:15
Copilot AI balanced review requested due to automatic review settings November 11, 2026 13:15
@codeant-ai

codeant-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #623ad Reviewed your PR 64aea0b Nov 11, 2026 · 13:15 13:17

@codeant-ai

codeant-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@KooshaPari
KooshaPari merged commit 56cf4b7 into fix/clipboard-helper-ownership-231 Nov 11, 2026
9 of 10 checks passed
@KooshaPari
KooshaPari deleted the codex/pr253-poll-decision-6687507-20261106 branch November 11, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Nov 11, 2026
PollDecision::Failed => return HelperOutcome::Failed,
PollDecision::Unconfirmed => {
let (watch, tx) = ClipboardWatch::channel();
std::thread::spawn(move || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Restore the reaper-thread rationale comment

The refactor dropped the comment explaining that Unconfirmed is safe because the reaper thread owns child, waits for it, and publishes the exit through the watch — and that dropping the watch before the exit is observed is fine (the send fails but the child is still reaped). That rationale is non-obvious; keeping it here prevents future "simplifications" that could break the ownership contract.

@kilo-code-bot

kilo-code-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address in follow-up (PR already merged)

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
crates/jcode-tui/src/tui/app/helpers/clipboard_helper.rs 130 Restore the reaper-thread rationale comment removed by the refactor (explains why the reaper owns child and watch-drop is safe)
Files Reviewed (2 files)
  • crates/jcode-tui/src/tui/app/helpers/clipboard_helper.rs - 1 issue
  • crates/jcode-tui/src/tui/app/helpers/clipboard_poll_tests.rs - 0 issues

Fix these issues in Kilo Cloud


Reviewed by free · Input: 93.9K · Output: 19.8K · Cached: 182.1K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants