Repository navigation
fix(metrics): treat an unreadable objectives file as an unchecked source when retiring a metric - #4645
Merged
vybe merged 1 commit intoNov 19, 2026
Conversation
…rce when retiring a metric Fixes Abilityai#4586 Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4586
Description
metric_declaration_service._objectivesonly raised whenread_objective_joinansweredunavailable. When an objective file does not parse, cannot be read, or the read runs out of its time budget, the join answersunavailable: Noneand putsobjective_invalid/objective_unreadable/objectives_read_timeoutinfindings._objectivesignoredfindings, so retiring a metric cited only in such a file reported no objective reference andunchecked: [], and the retire went through without acknowledgement._widgetsalready treats its equivalent case (adashboard.yamlthat does not parse) as unchecked (#2196)._objectivesnow raises whenfindingscarries one of those three codes, so the source is listed inuncheckedand the retire needs the same acknowledgement a real reference would.objective_file_skipped(files the reader refuses because of their name) is left out to keep this to the parse/read failures the issue describes; happy to add it if you want those counted as unchecked too.Related Issue
Fixes #4586
Journey Impact
Journey Impact: none: only the retire-metric reference check changes, from silently "no objective uses it" to "objectives could not be checked" when an objective file is unreadable
Type of Change
Testing
New tests in
tests/unit/test_ent1006_metric_declaration_service.pyrun the real_objectivesagainst a fakedread_objective_join: each of the three finding codes (parametrized) yieldsunchecked == ["objectives"], the same with a broken dashboard gives["objectives", "dashboard"], and a clean read carrying onlyobjective_file_skippedstays not unchecked. Againstdevthe 6 failure cases fail; with the fix all pass, as do the 32 existing tests in the file and the editor tests.Checklist
git commit -s) — required for contributors outside the core teamThis PR was prepared with AI assistance (Claude Code); disclosed here as CONTRIBUTING asks.
🤖 Generated with Claude Code