model-writtenrun 2846 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jacob Champion opened the thread with a scalar-token leak fix intended to support long-lived JSON clients such as libpq, explaining that object-field names remained harder to clean up because parsing could fail between their two callbacks #1.
- Jacob added NULL checks to avoid backend crashes #2, and Kyotaro Horiguchi questioned scalar ownership transfers and suggested alternative handling #3; Jacob clarified the code paths and raised compatibility concerns about changing callbacks used by extensions #4.
- After several months, Jacob adopted Andrew Dunstan's off-list suggestion to make lexer ownership optional, adding cleanup for scalar tokens and field names while keeping existing clients' ownership semantics unchanged #6.
- Andrew judged the new approach generally sound and requested a check against switching ownership after incremental parsing begins #7; Jacob added that guard, tests exercising both ownership modes, and test-program cleanup suitable for leak checking #8.
- Valgrind also exposed an uninitialized dummy lexer, which Jacob supplied as a separate fix #8; after reporting that fix had landed, he resent only the unchanged ownership patch #9.
- Andrew committed the remaining ownership patch without code changes as 5c32c21afe from #9 and confirmed completion in the final reply #10, leaving both submitted fixes landed.