- test_catalog_bounds_failure_only_keys failed 3/5 runs on Windows: all
three get() calls land within one time.monotonic() tick, so the eviction
victim in _reserve() is decided by hash-seeded set iteration order among
tied recency keys. Pin the catalog to a synthetic strictly-increasing
monotonic clock (the constructor already accepts one) so the oldest
entry is evicted deterministically. 5/5 stable after, 3/5 failures before.
- test_equivalent_workspace_paths_share_one_store requires directory
symlinks, which need admin/developer mode on Windows (WinError 1314).
Skip with the same pattern the file already uses for file symlinks.
- tests/agent/conftest.py: make_provider() assigned through a spec'd mock
by reading provider.estimate_prompt_tokens first, which raises
AttributeError because the attribute is not on the LLMProvider class
spec; assign a MagicMock directly instead. Latent - no test hit the
default-provider path until now.
Provider exceptions may expose numeric error_type or error_code values. Convert those fields at the response boundary before fallback consumers apply string operations, and cover the behavior with a regression test.
Plain tool values (grep patterns, web_search/x_search queries, find_files
globs) were never truncated by format_tool_hints(), so long arguments
overflowed tool_hint_max_length and were pushed to chat/UI verbatim.
Add a hard-truncation fallback for the plain branch, mirroring the existing
truncation used by abbreviate_path / _abbreviate_command. This completes the
same class of fix started in 99209a80 for is_path tools.
Adds 4 regression tests to tests/agent/test_tool_hint.py.
* refactor(agent): unify runner request fitting
* fix(agent): fit every runner model request
* fix(agent): count resumed state during request fitting
* refactor(agent): consolidate request fitting state
* refactor(agent): defer transcript assembly to runner
Keep persisted history and the fresh turn as explicit inputs until the Runner assembles the provider transcript. Preserve ContextBuilder and direct AgentRunner compatibility while making the save boundary structural.
Refs NAN-81.
* fix(providers): preserve mixed adjacent user content
With unifiedSession enabled, all turns are routed to the shared
unified:default session, so title generation, persistence, and change
notifications all happen on that shared session. The WebUI sidebar,
however, renders per-chat websocket:<id> sessions, so generated titles
never reach the session the user sees and every chat stays "Untitled".
Pass the origin chat_id through maybe_generate_webui_title_after_turn and
add a target_session_key to maybe_generate_webui_title so the title is
written to the per-chat session while conversation content still comes
from the shared (routed) session. When the routed session differs from
the per-chat session, the latest user/assistant exchange is used as the
title prompt since the shared session mixes content from every channel.
The shared session's title metadata is no longer read or written, so
stale shared titles can no longer leak into per-chat sessions.