feat: fix preserve escaped newlines in frontmatter & update tests & ci workflows (#6783)

This commit is contained in:
Ruochen Pan
2026-03-22 14:23:21 +08:00
committed by GitHub
parent ef43217117
commit 554c9cecfa
10 changed files with 129 additions and 21 deletions

View File

@@ -2,6 +2,7 @@ import asyncio
import os
import sys
from types import SimpleNamespace
from typing import Any, cast
from unittest.mock import AsyncMock
import pytest
@@ -763,7 +764,7 @@ async def test_skills_like_requery_passes_extra_user_content_parts():
provider=provider,
request=req,
run_context=run_context,
tool_executor=MockToolExecutor(),
tool_executor=cast(Any, MockToolExecutor()),
agent_hooks=MockHooks(),
tool_schema_mode="skills_like",
)
@@ -797,7 +798,7 @@ async def test_follow_up_accepted_when_active_and_not_stopping(
# Runner is active (not done) and stop is not requested
assert not runner.done()
assert runner._stop_requested is False
assert runner._is_stop_requested() is False
ticket = runner.follow_up(message_text="valid follow-up message")
@@ -824,7 +825,7 @@ async def test_follow_up_rejected_when_stop_requested(
# Request stop
runner.request_stop()
assert runner._stop_requested is True
assert runner._is_stop_requested() is True
ticket = runner.follow_up(message_text="follow-up after stop")
@@ -959,7 +960,7 @@ async def test_follow_up_rejected_and_runner_stops_without_execution(
# Request stop before any execution (simulates /stop command received at start)
runner.request_stop()
assert runner._stop_requested is True
assert runner._is_stop_requested() is True
# Try to add follow-up after stop (should be rejected)
ticket_after = runner.follow_up(message_text="follow-up after stop")
@@ -1017,7 +1018,7 @@ async def test_follow_up_after_stop_not_merged_into_tool_result(
# Request stop (simulates /stop command during active execution)
runner.request_stop()
assert runner._stop_requested is True
assert runner._is_stop_requested() is True
# Try to add follow-up after stop (should be rejected)
ticket_after = runner.follow_up(message_text="invalid after stop")