Skip to content

fix(diagnosis): return BlameTarget.NONE for healthy items instead of UNKNOWN#216

Merged
himanshu231204 merged 3 commits into
OpenAgentHQ:mainfrom
syf2211:fix/blame-target-none-semantics-67
Jul 23, 2026
Merged

fix(diagnosis): return BlameTarget.NONE for healthy items instead of UNKNOWN#216
himanshu231204 merged 3 commits into
OpenAgentHQ:mainfrom
syf2211:fix/blame-target-none-semantics-67

Conversation

@syf2211

@syf2211 syf2211 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

When blame attribution finds no failures, it now returns BlameTarget.NONE (confidence 1.0) instead of BlameTarget.UNKNOWN (confidence 0.0). This separates "analysis succeeded, no issues" from "could not determine blame".

Fixes #67

Motivation

BlameTarget.UNKNOWN implied indeterminate analysis, but was returned for healthy items with no failures. This semantic mismatch caused DiagnosisAnalyzer to count healthy items by checking UNKNOWN, which is confusing for API consumers and report readers.

Changes

  • Added BlameTarget.NONE = "none" enum value with docstring clarifying NONE vs UNKNOWN semantics
  • BlameAttribution._determine_blame() returns NONE with confidence 1.0 when no failures are detected
  • DiagnosisAnalyzer counts healthy items via BlameTarget.NONE instead of UNKNOWN
  • CLI diagnose command displays [green]Healthy[/green] for NONE targets
  • Updated unit and integration tests

Tests

python3 -m pytest tests/unit/test_diagnosis/ -v
# 76 passed

Notes

  • BlameTarget.UNKNOWN is retained for future genuinely indeterminate cases but is not returned by BlameAttribution.analyze() today
  • This is a behavioral change for SDK consumers who checked target == BlameTarget.UNKNOWN to detect healthy items; they should now check BlameTarget.NONE

syf2211 and others added 3 commits July 23, 2026 12:03
…UNKNOWN

When no failures are detected, blame attribution now returns NONE with
confidence 1.0 instead of UNKNOWN with confidence 0.0. This separates
'analysis succeeded, no issues' from 'could not determine blame'.

Fixes OpenAgentHQ#67
@himanshu231204
himanshu231204 merged commit 545b69b into OpenAgentHQ:main Jul 23, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @syf2211!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

diagnosis(blame): BlameTarget.UNKNOWN semantically misleading — means 'no failures' not 'unknown'

2 participants