)]}'
{"watcher/api/hooks.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":"003efd00019b6fc9359af430d20c17e10e56dda2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    \"\"\"Configures a request context and attaches it to the request.\"\"\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def before(self, state):"},{"line_number":30,"context_line":"        show_deleted \u003d strutils.bool_from_string("},{"line_number":31,"context_line":"            state.request.headers.get(\u0027X-Show-Deleted\u0027)"},{"line_number":32,"context_line":"        )"},{"line_number":33,"context_line":"        state.request.context \u003d context.RequestContext.from_environ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7cc33fe9_afa64fe8","line":30,"updated":"2026-06-30 17:38:24.000000000","message":"bool_from_string is called without strict\u003dTrue, so malformed values such as \u0027flase\u0027, \u0027tru\u0027, or arbitrary garbage silently evaluate to True (the non-strict default). This is the same class of unexpected-truthiness bug being fixed here, just for malformed rather than negative input.\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: Rejecting unrecognized header values with strict\u003dTrue mirrors the existing BooleanType.validate pattern in this project (watcher/api/controllers/v1/types.py:115 uses strict\u003dTrue and maps ValueError to a 400 Invalid). It would prevent a typoed header from unexpectedly exposing soft-deleted resources.\n\n**Recommendation**:\nConsider passing strict\u003dTrue and wrapping the call so a ValueError yields a 400 BadRequest response, consistent with types.py. If silent defaulting is intentionally preferred for backward compatibility, add a brief comment documenting that decision so the choice is explicit.","commit_id":"4927fa2862c8ee7686a1fc6d9ff2d1ece32df156"}],"watcher/tests/unit/api/v1/test_actions.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":"003efd00019b6fc9359af430d20c17e10e56dda2","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        )"},{"line_number":188,"context_line":"        self.assertEqual(HTTPStatus.NOT_FOUND, response.status_int)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # NOTE(tkajinam): This is an only example test case for negative"},{"line_number":191,"context_line":"        # X-Show-Deleted header values."},{"line_number":192,"context_line":"        response \u003d self.get_json("},{"line_number":193,"context_line":"            \u0027/actions/{}\u0027.format(action[\u0027uuid\u0027]),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ec5fdeab_97ecd6b2","line":190,"updated":"2026-06-30 17:38:24.000000000","message":"The new assertions are appended to the existing test_show_soft_deleted method, which already mixes positive and negative scenarios. The NOTE comment frames the block as an example case for negative header values, indicating a separate scenario that was not split into its own test method.\n\n**Severity**: WARNING | **Confidence**: 0.8\n\n**Impact**: Combining unrelated scenarios in one method makes a failure ambiguous (which assertion failed?) and complicates adding further negative-value cases. The existing method name \u0027test_show_soft_deleted\u0027 does not convey the extra coverage.\n\n**Suggestion**:\nExtract the negative-header coverage into a dedicated test method such as test_show_soft_deleted_with_false_header, leaving test_show_soft_deleted focused on the original positive/no-header scenario.","commit_id":"4927fa2862c8ee7686a1fc6d9ff2d1ece32df156"},{"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":"003efd00019b6fc9359af430d20c17e10e56dda2","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        )"},{"line_number":188,"context_line":"        self.assertEqual(HTTPStatus.NOT_FOUND, response.status_int)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # NOTE(tkajinam): This is an only example test case for negative"},{"line_number":191,"context_line":"        # X-Show-Deleted header values."},{"line_number":192,"context_line":"        response \u003d self.get_json("},{"line_number":193,"context_line":"            \u0027/actions/{}\u0027.format(action[\u0027uuid\u0027]),"}],"source_content_type":"text/x-python","patch_set":1,"id":"34d63a8a_6aa9f8db","line":190,"updated":"2026-06-30 17:38:24.000000000","message":"The new test block does not exercise the negative X-Show-Deleted values the bug was about. \u0027false\u0027/\u00270\u0027/\u0027no\u0027 are not asserted anywhere; only the empty string is covered, and the added \u0027True\u0027 case duplicates the assertion at lines 178-183, leaving the actual regression unguarded.\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: A future change that reverts the bool_from_string conversion could pass this test suite while silently re-introducing the original bug, because no test asserts that \u0027false\u0027 yields show_deleted\u003dFalse.\n\n**Suggestion**:\nReplace the redundant \u0027True\u0027 block with an assertion using \u0027false\u0027 (e.g. headers\u003d{\u0027X-Show-Deleted\u0027: \u0027false\u0027} expecting NOT_FOUND), and ideally also cover \u00270\u0027 and \u0027no\u0027. This directly locks in the behavior the fix is meant to guarantee.","commit_id":"4927fa2862c8ee7686a1fc6d9ff2d1ece32df156"}]}
