)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":28647,"name":"David","display_name":"morenod","email":"dsanzmor@redhat.com","username":"morenod"},"change_message_id":"299333bad32e518736998c0fa2e72c9b514b133b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"376d689d_064dc755","updated":"2026-06-29 10:49:28.000000000","message":"I left a comment about the json .get function, but the code is working fine and clean, so LGTM","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1471b1bb1d367981b21c1b698b8ab6116eb6be40","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bbabfbbf_716e1eec","updated":"2026-07-28 09:59:19.000000000","message":"LGTM, Just a minor proposal of validating the resulting audittemplate.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"b47a8bc2a866b78392fc51895450fadc0c701648","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a40de850_6023ac9d","updated":"2026-07-24 19:53:48.000000000","message":"recheck","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"4d7fe7712715b5686301bac7dd280191dc61b457","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"174b8cd8_1c875c8f","updated":"2026-06-26 18:09:00.000000000","message":"recheck\n\ndepends-on patch changed","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"}],"watcher_tempest_plugin/services/infra_optim/v1/json/client.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":"57389eab2ba2a9514e04fce91c8382bb06ccc682","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @base.handle_errors"},{"line_number":69,"context_line":"    def create_audit_template(self, **kwargs):"},{"line_number":70,"context_line":"        \"\"\"Creates an audit template with the specified parameters."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        :param name: The name of the audit template."},{"line_number":73,"context_line":"        :param description: The description of the audit template."}],"source_content_type":"text/x-python","patch_set":2,"id":"8f615d02_d81e947a","line":70,"updated":"2026-06-26 18:48:01.000000000","message":"create_audit_template docstring does not document the new default_parameters parameter, and still references stale param names (goal_uuid, strategy_uuid, audit_scope) that do not match the actual **kwargs keys (goal, strategy, scope).\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: The method accepts default_parameters via **kwargs but the docstring omits it, leaving callers and future maintainers without guidance on the newly supported field. The pre-existing stale parameter names compound the confusion.\n\n**Suggestion**:\nAdd \u0027:param default_parameters: Default strategy parameters dict for the audit template.\u0027 to the docstring, and align the existing param names with the actual kwarg keys (goal, strategy, scope) for consistency with the base helper docstring.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"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":"9397de6b2b22498d955104928fbe0444f6fae7f1","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \u0027goal\u0027: parameters.get(\u0027goal\u0027),"},{"line_number":89,"context_line":"            \u0027strategy\u0027: parameters.get(\u0027strategy\u0027),"},{"line_number":90,"context_line":"            \u0027scope\u0027: parameters.get(\u0027scope\u0027, []),"},{"line_number":91,"context_line":"            \u0027default_parameters\u0027: parameters.get(\u0027default_parameters\u0027),"},{"line_number":92,"context_line":"        }"},{"line_number":93,"context_line":"        audit_template \u003d {k: v for k, v in audit_template.items()"},{"line_number":94,"context_line":"                          if v is not None}"}],"source_content_type":"text/x-python","patch_set":2,"id":"221f98d2_672103f7","line":91,"updated":"2026-07-24 20:04:53.000000000","message":"The create_audit_template method docstring was not updated to document the new default_parameters parameter. While the method uses **kwargs, the existing docstring explicitly lists other accepted parameters (name, description, goal_uuid, strategy_uuid, audit_scope). Adding default_parameters woul...\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: Developers calling create_audit_template with default_parameters have no docstring guidance on the expected type or semantics of the parameter.\n\n**Recommendation**:\nAdd \u0027:param default_parameters: Default strategy parameters dictionary for the audit template.\u0027 to the create_audit_template docstring, after the existing :param entries.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"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":"57389eab2ba2a9514e04fce91c8382bb06ccc682","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            \u0027scope\u0027: parameters.get(\u0027scope\u0027, []),"},{"line_number":91,"context_line":"            \u0027default_parameters\u0027: parameters.get(\u0027default_parameters\u0027),"},{"line_number":92,"context_line":"        }"},{"line_number":93,"context_line":"        audit_template \u003d {k: v for k, v in audit_template.items()"},{"line_number":94,"context_line":"                          if v is not None}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return self._create_request(\u0027audit_templates\u0027, audit_template)"}],"source_content_type":"text/x-python","patch_set":2,"id":"564c751f_5ddfe001","line":93,"updated":"2026-06-26 18:48:01.000000000","message":"The None-filtering comprehension at lines 93-94 re-filters a dict whose only possibly-None new entry is default_parameters. The kwargs filter at line 81 already strips None values for passed args; the re-filter exists solely because the literal dict re-introduces .get() defaults.\n\n**Severity**: SUGGESTION | **Confidence**: 0.7\n\n**Benefit**: Slightly improves readability by making the None-handling intent explicit; functionally the current code is correct and backward compatible.\n\n**Recommendation**:\nConsider documenting why the second filter is necessary (default_parameters/scope may be None after .get()), or building the dict only from already-filtered \u0027parameters\u0027 to avoid the double pass. Low priority since behavior is correct.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"author":{"_account_id":28647,"name":"David","display_name":"morenod","email":"dsanzmor@redhat.com","username":"morenod"},"change_message_id":"299333bad32e518736998c0fa2e72c9b514b133b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            \u0027scope\u0027: parameters.get(\u0027scope\u0027, []),"},{"line_number":91,"context_line":"            \u0027default_parameters\u0027: parameters.get(\u0027default_parameters\u0027),"},{"line_number":92,"context_line":"        }"},{"line_number":93,"context_line":"        audit_template \u003d {k: v for k, v in audit_template.items()"},{"line_number":94,"context_line":"                          if v is not None}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return self._create_request(\u0027audit_templates\u0027, audit_template)"}],"source_content_type":"text/x-python","patch_set":2,"id":"8b30c558_f4ae81f2","line":93,"in_reply_to":"564c751f_5ddfe001","updated":"2026-06-29 10:49:28.000000000","message":"I agree on this, I know that create_audit_template function assign a None by default to default_parameters but I think it is a good practice to include a default value on all json .get() functions, at least for visual consistency","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"}],"watcher_tempest_plugin/tests/api/admin/test_audit.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":"57389eab2ba2a9514e04fce91c8382bb06ccc682","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                              \u0027deleted_at\u0027, \u0027state\u0027, \u0027hostname\u0027)):"},{"line_number":429,"context_line":"        super().assert_expected(expected, actual, keys)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":432,"context_line":"    @decorators.idempotent_id(\u00272586951a-ce4c-4c10-8c61-ac673999010c\u0027)"},{"line_number":433,"context_line":"    def test_audit_inherits_template_default_parameters(self):"},{"line_number":434,"context_line":"        \"\"\"Audit created from a template inherits default_parameters.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1b15ba4b_dfecb4c6","line":431,"updated":"2026-06-26 18:48:01.000000000","message":"TestCreateAuditWithDefaultParameters.assert_expected override is defined but never called by either test method in the class, making it unused boilerplate.\n\n**Severity**: WARNING | **Confidence**: 0.8\n\n**Impact**: Dead code that gives a false impression of validation coverage; readers may assume assert_expected is invoked. If left in, future copy-paste will propagate the unused override. The two tests verify parameters directly via assertEqual on individual keys instead.\n\n**Suggestion**:\nRemove the assert_expected override from TestCreateAuditWithDefaultParameters since neither test_audit_inherits_template_default_parameters nor test_audit_parameters_override_template_defaults calls it. Keep it only if a future test in this class will use it.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"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":"57389eab2ba2a9514e04fce91c8382bb06ccc682","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"class TestShowListAudit(base.BaseInfraOptimTest):"},{"line_number":478,"context_line":"    \"\"\"Tests for audit.\"\"\""},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def setUp(self):"},{"line_number":481,"context_line":"        super(TestShowListAudit, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"d7e7ca9a_ff8e088b","line":478,"updated":"2026-06-26 18:48:01.000000000","message":"test_audit_parameters_override_template_defaults only verifies the overridden key; it does not assert that the audit\u0027s final parameters are exactly the override dict (template defaults should be fully replaced or merged per server semantics).\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: A full-dict assertion documents and enforces the intended precedence semantics (override replaces vs. merges with defaults), catching regressions if the server merge behavior changes.\n\n**Recommendation**:\nAfter confirming the server\u0027s merge semantics, assert the complete expected parameters dict, e.g. self.assertEqual(override_params, body[\u0027parameters\u0027]), rather than checking only the para1 key.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"}],"watcher_tempest_plugin/tests/api/admin/test_audit_template.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":"57389eab2ba2a9514e04fce91c8382bb06ccc682","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            default_parameters\u003ddefault_params,"},{"line_number":259,"context_line":"        )"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        for key, value in default_params.items():"},{"line_number":262,"context_line":"            self.assertEqual(value, body[\u0027default_parameters\u0027][key])"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        _, audit_template \u003d self.client.show_audit_template(body[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"febe3b4d_a897a6c2","line":261,"updated":"2026-06-26 18:48:01.000000000","message":"The new default_parameters tests iterate over the input dict and assertEqual on each key individually, but do not assert full dict equality. This means extra or unexpected keys in the response would pass silently.\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: assertEqual(default_params, body[\u0027default_parameters\u0027]) would catch unexpected extra parameters returned by the API, tightening the contract the test enforces and catching server-side regressions that inject stray keys.\n\n**Recommendation**:\nReplace the for-loop per-key checks with a single assertEqual(default_params, body[\u0027default_parameters\u0027]) where the value is expected to be exactly the input. Apply the same to the update test (line 300-301) and the audit inheritance tests in test_audit.py.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1471b1bb1d367981b21c1b698b8ab6116eb6be40","unresolved":true,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        _, audit_template \u003d self.client.show_audit_template(body[\u0027uuid\u0027])"},{"line_number":265,"context_line":"        for key, value in default_params.items():"},{"line_number":266,"context_line":"            self.assertEqual(value, audit_template[\u0027default_parameters\u0027][key])"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":269,"context_line":"    @decorators.idempotent_id(\u0027d21eb4db-123c-460e-91a8-78d6a66e4259\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"45821eb5_e24d28b0","line":266,"updated":"2026-07-28 09:59:19.000000000","message":"We may also validate that other parameters non included in default_parameters are not included at all in the audit template.","commit_id":"a1995b2e76fad5d2a8095c60b34b12d83a80c59b"}]}
