mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-27 06:15:20 +00:00
Review on #564 found two rendering regressions plus boundary losses: - json.dumps(..., sort_keys=True) raised on datetime.date values (YAML timestamps) and on mixed-type mapping keys, turning a parseable frontmatter into a failed job with empty metadata - the base revision read those files fine. - Comma-joining lists lost item boundaries (["a, b", "c"] read back as one ambiguous string), [] was indistinguishable from an empty string, and the whitespace collapse also mangled spaces inside serialized values. _render_value is now a single tolerant renderer: bare strings keep their text but have line breaks escaped; everything else goes through json.dumps(ensure_ascii=False, default=str) (no key sort) so collections stay structured and YAML-only types serialize; anything JSON still cannot represent falls back to repr. Keys are rendered through the same path so a multiline key cannot break the one-key-per-line layout either. The structured metadata contract is untouched. Also aligns the benchmark.yaml job description with the textual answer (default.yaml already says 'one key: value per line') and the module docstring now distinguishes the textual answer from the structured payload in metadata. Regression coverage: nested dates, mixed mapping keys, empty lists, comma-containing items, significant whitespace, and a literal block scalar with a real newline. |
||
|---|---|---|
| .. | ||
| fixtures/config | ||
| integration | ||
| unit | ||