)]}'
{"watcher_dashboard/content/action_plans/views.py":[{"robot_id":"zuul","robot_run_id":"0359450fc0f74437a19760c13057c3ab","url":"https://zuul.teim.app/t/main/buildset/0359450fc0f74437a19760c13057c3ab","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":"d02a121bcdc956fcf418cbecfc4784b9829d25e9","patch_set":1,"id":"81686801_e41754ea","line":59,"updated":"2026-02-28 12:34:33.000000000","message":"Line 62 in action_plans/views.py has a inconsistent variable name - the method get_action_plans_count() references get_data() which returns action_plans, but in tests the variable was named differently before this change\n\n**Severity**: WARNING | **Confidence**: 0.7\n\n**Impact**: Minor - The code is correct, but there was a pre-existing variable naming inconsistency that this change cleaned up. This is noted as positive but the inconsistency existed before.\n\n**Suggestion**:\nNone - this was cleaned up correctly in this change.","commit_id":"c6ae72e2d8904635d3faeabaa3733132df0637e9"}],"watcher_dashboard/content/actions/views.py":[{"robot_id":"zuul","robot_run_id":"39278b306e4b49a795eab6f01287492c","url":"https://zuul.teim.app/t/main/buildset/39278b306e4b49a795eab6f01287492c","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":"d8eef7caff159a125079666df7b4bca57ed2026f","patch_set":3,"id":"5e7eecd0_3e6dc271","line":79,"updated":"2026-04-04 02:38:49.000000000","message":"The max_version() method and memoized decorator are still present in actions/views.py:DetailView even though the microversion negotiation logic was removed from _get_data(). The method is now unused in that file.\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: Removing unused code reduces maintenance burden and avoids confusion about whether microversion negotiation is active in this view.\n\n**Recommendation**:\nRemove the unused max_version() method and the common_client import from actions/views.py if common_client is no longer referenced in that file.","commit_id":"9cf04420628cc3fcc68cfd545f3a773cff7c5fd3"}],"watcher_dashboard/content/audit_templates/forms.py":[{"robot_id":"zuul","robot_run_id":"0359450fc0f74437a19760c13057c3ab","url":"https://zuul.teim.app/t/main/buildset/0359450fc0f74437a19760c13057c3ab","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":"d02a121bcdc956fcf418cbecfc4784b9829d25e9","patch_set":1,"id":"b8bea04e_f392c139","line":77,"updated":"2026-02-28 12:34:33.000000000","message":"The audit_templates/forms.py file removed the _get_strategy_list method which is good cleanup, but the comment \u0027# Defer strategy choices to be populated dynamically\u0027 could be more explicit about why this is deferred\n\n**Severity**: SUGGESTION | **Confidence**: 0.6\n\n**Benefit**: Better code documentation for future maintainers understanding the AJAX-based dynamic form population pattern.\n\n**Recommendation**:\nConsider expanding the comment to explain the AJAX endpoint (get_strategies_for_goal) and how it populates choices based on goal selection.","commit_id":"c6ae72e2d8904635d3faeabaa3733132df0637e9"},{"robot_id":"zuul","robot_run_id":"0359450fc0f74437a19760c13057c3ab","url":"https://zuul.teim.app/t/main/buildset/0359450fc0f74437a19760c13057c3ab","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":"d02a121bcdc956fcf418cbecfc4784b9829d25e9","patch_set":1,"id":"dd307879_3d6869d7","line":115,"updated":"2026-02-28 12:34:33.000000000","message":"Inconsistent exception message format - some logging uses delayed interpolation (LOG.exception(exc)) while others use direct string formatting (\u0027Failed to get strategies for selected goal.\u0027 with LOG.info(msg))\n\n**Severity**: WARNING | **Confidence**: 0.7\n\n**Impact**: Logging inconsistency may affect debugging and log analysis. The H702 rule recommends delayed interpolation for all logging calls to avoid unnecessary string formatting when logging is disabled.\n\n**Suggestion**:\nConsider using LOG.info(\u0027Failed to get strategies for selected goal: %s\u0027) with exc as the parameter, or use LOG.exception() for exception cases consistently.","commit_id":"c6ae72e2d8904635d3faeabaa3733132df0637e9"}],"watcher_dashboard/content/audit_templates/tests.py":[{"robot_id":"zuul","robot_run_id":"0359450fc0f74437a19760c13057c3ab","url":"https://zuul.teim.app/t/main/buildset/0359450fc0f74437a19760c13057c3ab","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":"d02a121bcdc956fcf418cbecfc4784b9829d25e9","patch_set":1,"id":"ed65b553_bd7666df","line":38,"updated":"2026-02-28 12:34:33.000000000","message":"The test file audit_templates/tests.py still has unnecessary blank lines that could be cleaned up for better consistency\n\n**Severity**: SUGGESTION | **Confidence**: 0.7\n\n**Benefit**: Improved code consistency and readability following PEP 8 blank line conventions.\n\n**Recommendation**:\nConsider removing extra blank lines to match the 1 blank line between method definitions pattern used elsewhere in the file.","commit_id":"c6ae72e2d8904635d3faeabaa3733132df0637e9"},{"robot_id":"zuul","robot_run_id":"39278b306e4b49a795eab6f01287492c","url":"https://zuul.teim.app/t/main/buildset/39278b306e4b49a795eab6f01287492c","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":"d8eef7caff159a125079666df7b4bca57ed2026f","patch_set":3,"id":"a5c4a797_0fe1f6a1","line":76,"updated":"2026-04-04 02:38:49.000000000","message":"The test_create_post method in audit_templates/tests.py no longer verifies that strategy choices are loaded correctly during POST validation. The old test had m_strategy_list returning raw strategy objects, while the new m_strategy_choices returns pre-built tuples. However, the test does not assert on the strategy field choices being populated after the POST.\n\n**Severity**: WARNING | **Confidence**: 0.7\n\n**Impact**: The POST path in CreateForm.__init__() calls _get_strategy_list_for_goal() to populate strategy choices for server-side validation, but there is no test asserting this code path executes or returns the correct choices when a goal is selected in the form data.\n\n**Suggestion**:\nConsider adding a test that submits a POST with a selected goal and verifies the strategy field choices are populated. This would improve coverage of the POST validation code path.","commit_id":"9cf04420628cc3fcc68cfd545f3a773cff7c5fd3"}],"watcher_dashboard/content/audit_templates/views.py":[{"robot_id":"zuul","robot_run_id":"48be978b7c26401eb560c6578f08913f","url":"https://zuul.teim.app/t/main/buildset/48be978b7c26401eb560c6578f08913f","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":"3ac95a740b5220747be9021e7cbf485b9933006c","patch_set":2,"id":"8b601734_1300314a","line":125,"updated":"2026-03-30 16:36:39.000000000","message":"audits/views.py IndexView.get_data() still passes api_version for microversion negotiation to watcher.audit_list(), but audit_templates/views.py get_related_audits_data() calls watcher.audit_list_for_template() without any microversion parameter, using the default (1.0).\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: Ensuring consistency in microversion usage across similar list operations would prevent subtle behavioral differences between listing audits from different views.\n\n**Recommendation**:\nVerify that watcher.audit_list_for_template() in api/watcher.py correctly handles microversion negotiation. If audits need start_time/end_time fields in the template detail view, the service function may need to accept an api_version parameter.","commit_id":"47d54294dcdc6ca1d82fab7b75aaed12e35bae98"}],"watcher_dashboard/content/audits/tables.py":[{"robot_id":"zuul","robot_run_id":"39278b306e4b49a795eab6f01287492c","url":"https://zuul.teim.app/t/main/buildset/39278b306e4b49a795eab6f01287492c","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":"d8eef7caff159a125079666df7b4bca57ed2026f","patch_set":3,"id":"8af31356_5d31b6f0","line":63,"updated":"2026-04-04 02:38:49.000000000","message":"The GoToActionPlan.allowed() method at line 64 accesses audit.state without a None guard, while the single() method at line 68 calls watcher.get_action_plan_for_audit() which may return None. The allowed() check at line 64 will raise AttributeError if audit is None.\n\n**Severity**: WARNING | **Confidence**: 0.8\n\n**Impact**: If the audit object is None (which can happen during table rendering when data fetching fails), the allowed() method will crash with AttributeError instead of gracefully returning False.\n\n**Suggestion**:\nChange line 64 to guard against None: `return audit and audit.state in (\u0027SUCCEEDED\u0027,)` or `return (audit is not None) and audit.state in (\u0027SUCCEEDED\u0027,)`. Note: this is a pre-existing issue, not introduced by this patch, but it is in a file that was modified.","commit_id":"9cf04420628cc3fcc68cfd545f3a773cff7c5fd3"},{"robot_id":"zuul","robot_run_id":"39278b306e4b49a795eab6f01287492c","url":"https://zuul.teim.app/t/main/buildset/39278b306e4b49a795eab6f01287492c","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":"d8eef7caff159a125079666df7b4bca57ed2026f","patch_set":3,"id":"2a7710fa_6db874bc","line":68,"updated":"2026-04-04 02:38:49.000000000","message":"Broad except Exception in audits/tables.py:GoToActionPlan.single() does not log the exception, making it difficult to diagnose API failures in production. Other table actions in the same file (ArchiveAudits, CancelAudits) also use bare Exception without logging, but GoToActionPlan is the one changed in this patch.\n\n**Severity**: HIGH | **Confidence**: 0.8\n\n**Risk**: Silent API failures make it difficult to diagnose issues when the action plan lookup fails for audits in the SUCCEEDED state, which is a critical user-facing workflow\n\n**Priority**: Before merge\n**Why This Matters**: When an audit has SUCCEEDED, the user clicks \u0027Go to Action Plan\u0027 expecting a redirect. If the API call fails silently, the user gets no feedback about what went wrong beyond the generic javascript:void(0) fallback.\n\n**Recommendation**:\nAdd LOG.exception() or LOG.info() before the horizon.exceptions.handle() call in GoToActionPlan.single(), consistent with the pattern used in action_plans/tables.py:UpdateRow.get_data() at lines 109-113.","commit_id":"9cf04420628cc3fcc68cfd545f3a773cff7c5fd3"}],"watcher_dashboard/content/audits/views.py":[{"robot_id":"zuul","robot_run_id":"0359450fc0f74437a19760c13057c3ab","url":"https://zuul.teim.app/t/main/buildset/0359450fc0f74437a19760c13057c3ab","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":"d02a121bcdc956fcf418cbecfc4784b9829d25e9","patch_set":1,"id":"4d8dcc77_23437fd0","line":162,"updated":"2026-02-28 12:34:33.000000000","message":"In audits/views.py line 162, the variable name change from \u0027audits\u0027 to \u0027action_plans\u0027 corrects a pre-existing bug but the error message still says \u0027Action plan list cannot be retrieved\u0027 which is now correct but could be more specific\n\n**Severity**: SUGGESTION | **Confidence**: 0.7\n\n**Benefit**: Clearer error messages help with debugging and user experience.\n\n**Recommendation**:\nThe error message is correct now. No change needed, but this was a good bug fix as part of the migration.","commit_id":"c6ae72e2d8904635d3faeabaa3733132df0637e9"},{"robot_id":"zuul","robot_run_id":"39278b306e4b49a795eab6f01287492c","url":"https://zuul.teim.app/t/main/buildset/39278b306e4b49a795eab6f01287492c","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":"d8eef7caff159a125079666df7b4bca57ed2026f","patch_set":3,"id":"b2334c36_da080e7f","line":124,"updated":"2026-04-04 02:38:49.000000000","message":"Microversion negotiation logic was removed from audits/views.py:DetailView._get_data() and actions/views.py:DetailView._get_data(), but the same microversion check is still present in audit_templates/views.py:get_related_audits_data() and in audits/views.py:IndexView.get_data(). This creates an inconsistency where the audit list endpoint receives the MV_START_END microversion header but the audit detail endpoint does not.\n\n**Severity**: WARNING | **Confidence**: 0.8\n\n**Impact**: If the Watcher API server requires the MV_START_END microversion to return start_time/end_time fields on the Audit detail response, those fields will be absent from the detail view. This could cause KeyError or missing data in the template without an obvious error.\n\n**Suggestion**:\nVerify that the Audit.get() service function (which delegates to watcherclient without a microversion) still returns all required fields. If start_time/end_time are needed on the detail page, the service layer function audit_get should accept an optional api_version parameter.","commit_id":"9cf04420628cc3fcc68cfd545f3a773cff7c5fd3"}]}
