You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@burr.apache.org by "Ghraven (via GitHub)" <gi...@apache.org> on 2026/05/26 01:28:22 UTC

[PR] fix: use utf-8 for local tracking text files [burr]

Ghraven opened a new pull request, #790:
URL: https://github.com/apache/burr/pull/790

   ## Summary
   
   Thanks for maintaining Burr. This PR makes the local tracking backend text-file reads and writes use explicit UTF-8 encoding.
   
   ## What changed
   
   - Adds `encoding="utf-8"` to annotation JSONL reads and writes in `LocalBackend`
   - Adds `encoding="utf-8"` when reading `children.jsonl`
   - Leaves binary log/metadata reads unchanged
   
   ## Before / after
   
   Before, these JSONL text files used the platform default encoding, which can vary on Windows and other non-UTF-8 locale environments.
   
   After, the local backend reads and writes these text files consistently as UTF-8.
   
   ## Verification
   
   - `python -m py_compile burr/tracking/server/backend.py`
   - `git diff --check`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use utf-8 for local tracking text files [burr]

Posted by "andreahlert (via GitHub)" <gi...@apache.org>.
andreahlert commented on PR #790:
URL: https://github.com/apache/burr/pull/790#issuecomment-4574746510

   LGTM. Thanks for adding the test and catching the graph.json spot.
   
   I pushed one small follow-up commit (`b142647d`) to harden the regression test. The round-trip assertion alone passes on a UTF-8 default host even if a text open drops `encoding="utf-8"`, so it would not actually catch a future missed call site on CI. The follow-up wraps the backend's `aiofiles.open` and asserts every text-mode open is explicitly UTF-8 (binary `rb` opens stay exempt), which fails deterministically regardless of the host locale. Verified it goes red when the encoding arg is removed from any read.
   
   Merging once CI is green.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use utf-8 for local tracking text files [burr]

Posted by "Ghraven (via GitHub)" <gi...@apache.org>.
Ghraven commented on PR #790:
URL: https://github.com/apache/burr/pull/790#issuecomment-4572561315

   Thank you for the suggestion. I added a focused regression test that writes non-ASCII content through LocalBackend annotations, graph.json, and children.jsonl, then reads it back through the backend APIs.\n\nVerified locally with:\n\n``\npython -m pytest tests\\tracking\\test_local_tracking_client.py::test_local_backend_reads_utf8_annotations_graph_and_children -q\npython -m py_compile burr\\tracking\\server\\backend.py tests\\tracking\\test_local_tracking_client.py\ngit diff --check\n``\n\nThe focused pytest passes; the remaining warnings are existing Pydantic deprecation warnings in the backend path.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use utf-8 for local tracking text files [burr]

Posted by "andreahlert (via GitHub)" <gi...@apache.org>.
andreahlert merged PR #790:
URL: https://github.com/apache/burr/pull/790


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use utf-8 for local tracking text files [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on PR #790:
URL: https://github.com/apache/burr/pull/790#issuecomment-4560927317

   This looks like the right fix, but since this is correcting platform-dependent file encoding behavior, I think it would be worth adding a regression test that writes and reads non-ASCII content through LocalBackend (annotations / graph / children) to prove UTF-8 handling end-to-end and prevent missed call sites. Could you add that please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use utf-8 for local tracking text files [burr]

Posted by "Ghraven (via GitHub)" <gi...@apache.org>.
Ghraven commented on PR #790:
URL: https://github.com/apache/burr/pull/790#issuecomment-4553035839

   Thank you for catching that missed spot. I added the same explicit `encoding="utf-8"` to the `graph.json` read in `LocalBackend` and pushed the update. I verified it with `python -m py_compile burr/tracking/server/backend.py` and `git diff --check`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org