Private
Public Access
0
0
Commit Graph

5 Commits

Author SHA1 Message Date
ed 4393e831b0 test(ai_client): rename send_result to send in test_ai_loop_regressions_20260614
13 references renamed (planned 12; one extra found in a comment).

Test function test_fr2_send_result_callable_in_app_controller_namespace
renamed to test_fr2_send_callable_in_app_controller_namespace.

7 tests pass.
2026-06-17 00:32:33 -04:00
ed 4910a703a7 more manual corrections 2026-06-15 19:41:33 -04:00
ed f9832b07b3 manaul correction attempts 2026-06-15 19:14:22 -04:00
ed f4a782d99f fix(ai_loop): wrap MiniMax reasoning in <thinking> tags for parse_thinking_trace (FR3, Bug #3)
Adds a new wrap_reasoning_in_text: bool = False keyword argument to
run_with_tool_loop. When True and reasoning_content is non-empty, the
returned text is prepended with <thinking>...</thinking> tags so
thinking_parser.parse_thinking_trace can extract a ThinkingSegment
for the discussion entry.

The wrap is conditional (default False) so it doesn't break providers
that already wrap inline (e.g. DeepSeek, which wraps at line 2117-2118
before run_with_tool_loop sees the response).

_send_minimax now passes wrap_reasoning_in_text=bool(caps.reasoning).
When caps.reasoning is True (M2.5/M2.7), the reasoning is wrapped in
<thinking> tags. When False (M2/M2.1), the parameter is False and
no wrap happens (avoids useless getattr on non-reasoning models).

Also fixes a bug in the test_fr3_minimax_thinking_in_returned_text
test mock: it was returning a raw MagicMock instead of a Result
object, which caused the test to see auto-created MagicMock attributes
instead of the expected text. Now wraps in Result(data=MagicMock(...))
and sets ai_client._model to ensure get_capabilities('minimax', _model)
resolves to the M2.7 capabilities (reasoning=True).
2026-06-15 10:56:24 -04:00
ed 44dc90bca8 test(ai_loop): add FR1/FR2/FR3 tests for ai_loop_regressions_20260614 (TDD red)
3 bug groups, all reproducing documented regressions:
- test_fr1_*: error response becomes a discussion entry (Bug #2)
- test_fr2_*: no ProviderError references in src/app_controller.py (Bug #1)
- test_fr3_*: MiniMax thinking mono rendering in returned text (Bug #3)

4 critical tests fail for the documented reasons; 3 sanity checks pass.
2026-06-15 09:18:07 -04:00