fix(tests): unbreak main CI after #2177#2213
Merged
RealKai42 merged 2 commits intoMoonshotAI:mainfrom May 9, 2026
Merged
Conversation
PR MoonshotAI#2177 added a new `_current_step_retry` attribute to `_LiveView.__init__` and reads it from `compose_agent_output()`. The manual fixture in `test_render_agent_status_excludes_panels_in_interactive` uses `object.__new__(_PromptLiveView)` to bypass `__init__`, so the new attribute was missing — `render_agent_status()` raised AttributeError on push to main (CI run #2459 / Python 3.12 / 3.13 / 3.14). Initialize the attribute in the fixture alongside the other `compose_agent_output` dependencies.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a pytest failure introduced after _LiveView gained the _current_step_retry attribute (used by compose_agent_output()), by ensuring the modal-lifecycle test fixture that bypasses __init__ initializes this field.
Changes:
- Initialize
view._current_step_retry = Nonein the manualobject.__new__(_PromptLiveView)fixture used bytest_render_agent_status_excludes_panels_in_interactive.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR MoonshotAI#2177 bumped `WIRE_PROTOCOL_VERSION` from 1.9 to 1.10 in `src/kimi_cli/wire/protocol.py` but didn't update the e2e tests, so `tests_e2e/test_wire_protocol.py::{test_initialize_handshake, test_initialize_external_tool_conflict}` started failing on push to main. Update the three `"1.9"` literals in the e2e snapshot to `"1.10"` to match the new server response.
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.
Summary
view._current_step_retry = Nonein the manualobject.__new__(_PromptLiveView)fixture used bytest_render_agent_status_excludes_panels_in_interactive.protocol_versionliterals intests_e2e/test_wire_protocol.pyfrom"1.9"to"1.10"to match the wire-protocol bump.Motivation
PR #2177 (
fix(soul): clear partial UI output when LLM step is retried) introduced two test/code mismatches that only surfaced once the merge landed onmain:_LiveView.__init__gained a new_current_step_retryattribute, read fromcompose_agent_output(). The modal-lifecycle test bypasses__init__(object.__new__(_PromptLiveView)then sets attributes by hand), so the new attribute was missing —render_agent_status()raisedAttributeError: '_PromptLiveView' object has no attribute '_current_step_retry'.WIRE_PROTOCOL_VERSIONwas bumped from1.9to1.10insrc/kimi_cli/wire/protocol.py, but the e2e snapshot intests_e2e/test_wire_protocol.pystill asserted"1.9", sotest_initialize_handshakeandtest_initialize_external_tool_conflictstarted returning"1.10"against a"1.9"expectation.Together these were the only pytest failures in CI run #2459 (push to
main) and the same two failures reproduced in this PR's first CI run.Changes
tests/ui_and_conv/test_modal_lifecycle.py: addview._current_step_retry = Noneto the manual fixture, alongside the othercompose_agent_outputdependencies.tests_e2e/test_wire_protocol.py: update the three"1.9"literals to"1.10".Testing
prek run --all-files✅uv run pytest tests/ui_and_conv/test_modal_lifecycle.py— 42 passed (was 1 failure before commit 1).uv run pytest tests_e2e/test_wire_protocol.py— 4 passed (was 2 failures before commit 2).make test-kimi-clilocally surfaces 7 unrelated failures intests/ui/test_usage.py::{test_format_row_handles_no_remaining_quota,test_format_row_renders_remaining_quota}; verified those exact parametrizations pass on CI #2459 (Linux + Python 3.12), so they are macOS + Python 3.14 environment quirks unrelated to this branch or to fix(soul): clear partial UI output when LLM step is retried #2177.