Skip to content

test: cover assistant-prefill handoff paths#251

Merged
warren618 merged 1 commit into
mainfrom
fix/assistant-prefill-regression-tests
Jun 16, 2026
Merged

test: cover assistant-prefill handoff paths#251
warren618 merged 1 commit into
mainfrom
fix/assistant-prefill-regression-tests

Conversation

@warren618

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #248. Strengthen the assistant-prefill regression coverage by directly exercising the two AgentLoop handoff paths that used to append assistant-role acknowledgements.

Changes

  • Record messages seen by the stub LLM instead of relying on a class-level counter.
  • Add a direct regression for background notification injection, asserting the injected handoff is a user message.
  • Add a direct regression for _auto_compact() reconstruction, asserting the summary handoff is a user message.
  • Accept the current stream_chat(..., should_cancel=...) call shape in the test stub.

Validation

  • python -m pytest agent/tests/test_agent_loop_no_assistant_prefill.py -q
  • python -m pytest agent/tests/test_agent_loop_no_assistant_prefill.py agent/tests/test_provider_diagnostics.py agent/tests/test_kimi_reasoning_content.py -q
  • python -m ruff check agent/tests/test_agent_loop_no_assistant_prefill.py
  • python -m compileall -q agent/tests/test_agent_loop_no_assistant_prefill.py
  • git diff --check
@warren618 warren618 merged commit 5277399 into main Jun 16, 2026
1 check passed
@warren618 warren618 deleted the fix/assistant-prefill-regression-tests branch June 16, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant