Fix remaining xfail tests#351
Merged
dwash96 merged 4 commits intocecli-dev:v0.92.0from Jan 2, 2026
Merged
Conversation
Production fix:
- io.py: Add missing return after do_run("exit") in EOFError handler
Test fixes:
- Add await for async check_for_file_mentions calls
- Mock confirm_ask to control test behavior
- Pass mock args to Coder.create for realistic test setup
- Remove xfail markers from 6 tests
Two fixes to ensure KeyboardInterrupt properly propagates: 1. In confirm_ask(): Remove asyncio.create_task() wrapper around _confirm_ask(). Using create_task() caused KeyboardInterrupt to be caught by asyncio's event loop rather than propagating normally. 2. In _confirm_ask(): Call prompt_async directly instead of using input_task/get_input(), which catches KeyboardInterrupt and returns "" rather than propagating the exception. This allows callers to detect when users press Ctrl+C during confirmation prompts, preventing unintended default responses.
The xfail markers claimed "Commands.cmd_web method not implemented" but WebCommand was actually registered. The real issues were: 1. Tests didn't pass mock args, causing AttributeError on self.args.yes_always_commands 2. Tests mocked coder.commands.scraper which no longer exists - the scraper is now internal to WebCommand.execute() Fix by: - Passing mock args with yes_always_commands and disable_scraping - Mocking coder.commands.do_run to return expected content - Updating test assertions to verify do_run was called correctly
In get_abs_fnames_content(), deleted files were filtered out for iteration but never removed from self.abs_fnames. This caused stale file references to persist. Now explicitly checks for and removes non-existent files at the start of get_abs_fnames_content(), with a warning message to inform the user.
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.
This PR contains the remaining fixes for the xfail tests:
_confirm_askin theiomodule. These might be related to the issue of pressing ESC on a question and cecli still going forward and carrying it out (assumption, was not able to test it manually)