Skip to content

Fix remaining xfail tests#351

Merged
dwash96 merged 4 commits intocecli-dev:v0.92.0from
johbo:fix-xfail-tests-2
Jan 2, 2026
Merged

Fix remaining xfail tests#351
dwash96 merged 4 commits intocecli-dev:v0.92.0from
johbo:fix-xfail-tests-2

Conversation

@johbo
Copy link
Copy Markdown

@johbo johbo commented Jan 2, 2026

This PR contains the remaining fixes for the xfail tests:

  • base coder dropping deleted files
  • changes in _confirm_ask in the io module. 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)

johbo added 4 commits January 2, 2026 02:11
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.
@dwash96 dwash96 merged commit f0f601c into cecli-dev:v0.92.0 Jan 2, 2026
1 check passed
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.

2 participants