You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: frame JSONL index reads on LF, not str.splitlines()
Four readers of the per-Goal run index frame it with `str.splitlines()`
(`history.py::repair_index_duplicates`, `run_index_rebuild.py::read_index_rows`,
`pending_intent.py::_actual_work_window`,
`monitor_poll.py::_find_monitor_poll_turn`). The index is written with
`json.dumps(..., ensure_ascii=False)`, which keeps U+0085, U+2028 and U+2029
inside a value verbatim — and `str.splitlines()` treats all three as line
breaks. A record holding one in a text field arrives as two fragments, both
fail `json.loads`, and the row is silently dropped.
Frame on LF instead. A trailing `\r` from a CRLF file stays harmless because
JSON treats it as whitespace.
Reproduced before the change: one record containing U+0085 yields zero parsed
rows; after it yields the record intact. The new test fails on
`read_index_rows` when only that function is reverted to `splitlines()` and
passes with the fix.
Validation: `pytest -q tests/control_plane/test_run_index_jsonl_framing.py` ->
2 passed; `ruff check` on the five files reports `All checks passed!`.
Signed-off-by: kokokoXUY <13682395396@163.com>
Rebased onto current main.
0 commit comments