ReMe/tests
Ziyang Guo 7c6ed1e2a0 fix(frontmatter-read): use json.dumps for all scalars to preserve string and mapping distinctions
Follow-up to the @jinliyl review on #564 (10-15 round 2):

- _render_value now sends every scalar through json.dumps rather than
  the str-only branch. The str-only branch collapsed a literal '\n'
  two-character sequence and an actual newline into the same rendered
  form ('\n') and lost the distinction between the string 'null'
  and YAML null. The JSON form preserves both.
- Mixed mapping key types (int 1 vs string '1') now round-trip with
  their JSON-form distinction in the answer, matching the metadata.
  Callers that re-parse the answer body as JSON still discard one
  value (this is a YAML-side limitation, not a renderer one); pinned
  by a regression test.
- Updated the three existing answer assertions to carry the new
  quoted scalar form, and added two regression tests:
  test_read_answer_distinguishes_newline_from_literal_backslash_n and
  test_read_answer_mixed_mapping_key_types_render_via_json.

Note: the str-only branch's '\n' escape was the only reason the
description: |- literal-block test in test_read_answer_tolerates_rich_yaml_types
rendered as 'line one\\nline two'. With the change, the same
description renders as '"line one\nline two"' (real newline, JSON-
escaped), which is exactly the fix the review asked for.
2026-10-15 19:42:14 +08:00
..
fixtures/config fix(ci): support AgentScope 2.0.6 initialization (#457) 2026-08-19 11:33:52 +08:00
integration feat(proactive): separate proactive refresh from auto dream (#488) 2026-09-07 17:23:37 +08:00
unit fix(frontmatter-read): use json.dumps for all scalars to preserve string and mapping distinctions 2026-10-15 19:42:14 +08:00