Skip to content

fix(tests): unbreak main CI after #2177 - #2213

Merged
RealKai42 merged 2 commits into
MoonshotAI:mainfrom
7Sageer:fix/test-modal-step-retry-attr
May 9, 2026
Merged

fix(tests): unbreak main CI after #2177#2213
RealKai42 merged 2 commits into
MoonshotAI:mainfrom
7Sageer:fix/test-modal-step-retry-attr

Conversation

@7Sageer

@7Sageer 7Sageer commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Initialize view._current_step_retry = None in the manual object.__new__(_PromptLiveView) fixture used by test_render_agent_status_excludes_panels_in_interactive.
  • Bump the three protocol_version literals in tests_e2e/test_wire_protocol.py from "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 on main:

  1. _LiveView.__init__ gained a new _current_step_retry attribute, read from compose_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() raised AttributeError: '_PromptLiveView' object has no attribute '_current_step_retry'.
  2. WIRE_PROTOCOL_VERSION was bumped from 1.9 to 1.10 in src/kimi_cli/wire/protocol.py, but the e2e snapshot in tests_e2e/test_wire_protocol.py still asserted "1.9", so test_initialize_handshake and test_initialize_external_tool_conflict started 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: add view._current_step_retry = None to the manual fixture, alongside the other compose_agent_output dependencies.
  • tests_e2e/test_wire_protocol.py: update the three "1.9" literals to "1.10".

Testing

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 MoonshotAI#2459 / Python 3.12 / 3.13 / 3.14).

Initialize the attribute in the fixture alongside the other
`compose_agent_output` dependencies.
Copilot AI review requested due to automatic review settings May 9, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 = None in the manual object.__new__(_PromptLiveView) fixture used by test_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.
@7Sageer 7Sageer changed the title fix(shell): init _current_step_retry in modal fixture fix(tests): unbreak main CI after #2177 May 9, 2026
@RealKai42
RealKai42 merged commit c584bbc into MoonshotAI:main May 9, 2026
15 checks passed
@7Sageer
7Sageer deleted the fix/test-modal-step-retry-attr branch May 9, 2026 12:51
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.

3 participants