)]}'
{"watcher_dashboard/test/integration/playwright_base.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"0cdaf13afe21c741787a5ed64f4be6192eb83450","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        if trace_mode !\u003d \u0027off\u0027:"},{"line_number":122,"context_line":"            trace_dir \u003d config.get_trace_dir()"},{"line_number":123,"context_line":"            os.makedirs(trace_dir, exist_ok\u003dTrue)"},{"line_number":124,"context_line":"            safe_name \u003d re.sub("},{"line_number":125,"context_line":"                r\u0027[^A-Za-z0-9_.-]+\u0027, \u0027_\u0027, self.test_name or str(id(self))"},{"line_number":126,"context_line":"            )"},{"line_number":127,"context_line":"            trace_path \u003d os.path.join(trace_dir, f\"trace_{safe_name}.zip\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ac286f95_5d302df8","line":124,"updated":"2026-07-06 08:44:02.000000000","message":"The test-name sanitization regex r\u0027[^A-Za-z0-9_.-]+\u0027 is now duplicated: once for the trace filename and once in _get_test_screenshot_dir.\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: A single helper keeps both call sites consistent and makes future naming changes a one-line edit instead of a two-place change.\n\n**Recommendation**:\nAdd a small helper, e.g. def _sanitize_for_path(name): return re.sub(r\u0027[^A-Za-z0-9_.-]+\u0027, \u0027_\u0027, name), and call it both when building the trace filename and inside _get_test_screenshot_dir.","commit_id":"bb43883dd40114ad72fe6c9b788ae40dddd9b1ce"}]}
