)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":38496,"name":"Andressa Cabistani","display_name":"Andressa","email":"acabistani@gmail.com","username":"andressadotpy","status":"I\u0027m a Software Engineer at Red Hat and I love Open Source and connect with people! Feel free to DM through IRC, I\u0027ll be delighted to chat"},"change_message_id":"4f4bdc6bf7fb43661d9258a6d6c6d3d2b32422d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"302c142e_2a990444","updated":"2026-07-23 12:50:59.000000000","message":"Clean and well-tested patch. During code review I asked Claude to generate a few edge cases and here are the ones I analyzed:\n\n- What if code calls the formatter directly, skipping sanitization? All public methods (update_stats, timing, etc.) go through _format_labeled_metric() where sanitization happens, so there\u0027s no way to skip it through the public API.\n- What if a label key (not value) is None? Not possible. Label keys come from config string parsing or caller-provided dicts with string keys.\n- What if multiple threads access labels at the same time? Safe. Default labels are set once at startup and never modified. A fresh copy is made each time a metric is sent.\n- What if label values are falsy but not None (like 0 or False)? They\u0027re left alone. The code uses is not None (identity check), not truthiness, so only literal None is replaced.\n- Could someone pass None to sneak invalid characters past validation? No. None becomes an empty string, which has no characters to violate the validation pattern.\n- What if every label value is None? — You get labels like key1\u003d,key2\u003d (empty values), which is valid syntax in all four supported statsd formats.\n\nSo yeah it looks pretty good to me!","commit_id":"b0f92bd978266f30c20cfc9b37c63f3df81a22a2"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"276ebc0cff6fda225c3ababeca958d9dd33824dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"58742a7c_a8cc0728","updated":"2026-07-23 13:05:17.000000000","message":"LGTM.","commit_id":"b0f92bd978266f30c20cfc9b37c63f3df81a22a2"}],"swift/common/statsd_client.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"276ebc0cff6fda225c3ababeca958d9dd33824dc","unresolved":true,"context_lines":[{"line_number":570,"context_line":"            value,"},{"line_number":571,"context_line":"            metric_type,"},{"line_number":572,"context_line":"            sample_rate,"},{"line_number":573,"context_line":"            sanitised_labels.items())"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def update_stats(self, metric, value, *, labels\u003dNone, sample_rate\u003dNone):"},{"line_number":576,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"c0adaefa_0b67f3bf","line":573,"updated":"2026-07-23 13:05:17.000000000","message":"Nit: we could do this without the extra dict above - performance-wise it seems to not matter (in the range of 0.4µs per line), so no blocker.\n\n```\nsorted((k, \u0027\u0027 if v is None else v) for k, v in all_labels.items()))  \n```","commit_id":"b0f92bd978266f30c20cfc9b37c63f3df81a22a2"}]}
