Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(py-ext-marketplace): drop unused _evaluators init in QualityAssessor#2154

Merged
imran-siddique merged 1 commit into
microsoft:mainfrom
aegis-initiative:fix/py-ext-marketplace-remove-dead-evaluators-init
May 12, 2026
Merged

chore(py-ext-marketplace): drop unused _evaluators init in QualityAssessor#2154
imran-siddique merged 1 commit into
microsoft:mainfrom
aegis-initiative:fix/py-ext-marketplace-remove-dead-evaluators-init

Conversation

@finnoybu

Copy link
Copy Markdown
Contributor

Summary

QualityAssessor.__init__ only sets:

self._evaluators: dict[AssessmentDimension, Any] = {}

…and nothing else on the instance. The attribute is never read, written, or mutated anywhere in the source tree — none of the assess_* methods consult it, no caller touches it, and the tests do not reference it.

A repo-wide grep -rn '_evaluators' confirms QualityAssessor is the only producer; all other _evaluators matches belong to unrelated classes in agent_sandbox and agentmesh.governance.policy.

Change

Since the only purpose of the constructor was that dead assignment, drop the empty __init__ entirely. Any remains imported because to_dict still uses dict[str, Any] as its return annotation.

If pluggable evaluators are added later, they should be introduced together with the registration path and the call site that uses them.

Tests

No behavioural change; the existing suite continues to pass.

$ PYTHONPATH=src python -m pytest tests/ -q
309 passed, 2 skipped in 1.76s

Test plan

  • Existing marketplace test suite green.
  • QualityAssessor() still instantiates (covered by the existing tests/test_quality_assessment.py::TestQualityAssessor class).

Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].

…essor

`QualityAssessor.__init__` only set `self._evaluators: dict[AssessmentDimension, Any] = {}`
and nothing else on the instance. The attribute is never read, written, or
mutated anywhere in the source tree — none of the `assess_*` methods consult
it, no caller touches it, and the tests do not reference it.

Since the only purpose of the constructor was that dead assignment, drop the
empty `__init__` entirely. `Any` remains imported because `to_dict` still uses
`dict[str, Any]` as its return annotation.

If pluggable evaluators are added later, they should be introduced together
with the registration path and the call site that uses them.

Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].
@github-actions

Copy link
Copy Markdown
🤖 AI Agent: test-generator — View details

Test coverage looks good. No gaps identified.

@github-actions

Copy link
Copy Markdown
🤖 AI Agent: breaking-change-detector — API Compatibility

API Compatibility

Severity Change Impact
Low Removed the __init__ method from QualityAssessor class No direct impact on existing functionality, but could affect future extensions that may rely on the constructor for initialization.

@github-actions

Copy link
Copy Markdown
🤖 AI Agent: docs-sync-checker — Docs Sync

Docs Sync

Documentation is in sync.

@github-actions

Copy link
Copy Markdown
🤖 AI Agent: code-reviewer — View details

TL;DR: 0 blockers, 0 warnings. No issues found. Clean change.

@github-actions github-actions Bot added the size/XS Extra small PR (< 10 lines) label May 12, 2026
@github-actions

Copy link
Copy Markdown
🤖 AI Agent: security-scanner — View details

No security issues found.

@github-actions

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential NONE
Overall MEDIUM

Automated check by AGT Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label May 12, 2026
@github-actions

Copy link
Copy Markdown

PR Review Summary

Check Status Details
🔍 Code Review ✅ Passed No issues found
🛡️ Security Scan ✅ Passed No issues found
🔄 Breaking Changes ✅ Completed Analysis complete
📝 Docs Sync ✅ Passed No issues found
🧪 Test Coverage ✅ Completed Analysis complete

Verdict: ✅ Ready for human review

@imran-siddique imran-siddique merged commit 91bd0d3 into microsoft:main May 12, 2026
13 of 14 checks passed
MohammadHaroonAbuomar pushed a commit to MohammadHaroonAbuomar/agt-acs that referenced this pull request Jun 1, 2026
…essor (microsoft#2154)

`QualityAssessor.__init__` only set `self._evaluators: dict[AssessmentDimension, Any] = {}`
and nothing else on the instance. The attribute is never read, written, or
mutated anywhere in the source tree — none of the `assess_*` methods consult
it, no caller touches it, and the tests do not reference it.

Since the only purpose of the constructor was that dead assignment, drop the
empty `__init__` entirely. `Any` remains imported because `to_dict` still uses
`dict[str, Any]` as its return annotation.

If pluggable evaluators are added later, they should be introduced together
with the registration path and the call site that uses them.

Surfaced during independent audit conducted by @finnoybu (Ken Tannenbaum, AEGIS Initiative); [LOW, Python Extensions].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk size/XS Extra small PR (< 10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants