fix(resource-registry): remove type: ignore[override] suppressions from ResourceDagMixin #3238

Merged
freemo merged 1 commit from fix/resource-registry-dag-type-ignore-override into master 2026-04-05 21:14:48 +00:00
Owner

Summary

Removes two unnecessary # type: ignore[override] inline suppression comments from _resource_registry_dag.py that violated the project's CONTRIBUTING.md policy prohibiting # type: ignore directives. Investigation confirmed the suppressions were never required — Pyright already accepts the mixin pattern without them.

Changes

  • Removed # type: ignore[override] from link_child in ResourceDagMixin: the suppression was applied to the method signature using a self: RegistryHost Protocol annotation; Pyright accepts this pattern natively and the comment was redundant.
  • Removed # type: ignore[override] from unlink_child in ResourceDagMixin: same pattern and same rationale as link_child — the suppression was unnecessary and masked no real type error.
  • No structural changes were made to the Protocol definition, inheritance hierarchy, method signatures, or any other logic. The fix is purely compliance: two comment tokens deleted.

Design Decisions

  • No refactoring required. The self: RegistryHost Protocol annotation pattern used in both mixin methods is valid Python and is already understood correctly by Pyright. The suppressions were added at some earlier point either out of caution or due to a transient tooling issue, but they have not been necessary.
  • Minimal, surgical fix. Rather than restructuring the mixin or Protocol to "justify" the suppressions, the correct resolution was simply to remove them and verify that nox -e typecheck remains clean. This avoids unnecessary churn and keeps the diff as small as possible.
  • Policy compliance is the primary driver. CONTRIBUTING.md explicitly prohibits # type: ignore directives. Retaining suppressions that are not needed is a direct violation of that policy, regardless of whether they cause functional harm.

Testing

  • nox -e typecheck: 0 errors, 0 warnings, 0 informations — confirms the suppressions were genuinely unnecessary and their removal introduces no type regressions
  • No logic changed; existing test suite unaffected

Modules Affected

  • src/cleveragents/application/services/_resource_registry_dag.py — only file changed; two inline suppression comments removed from ResourceDagMixin.link_child and ResourceDagMixin.unlink_child

Closes #2830


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

## Summary Removes two unnecessary `# type: ignore[override]` inline suppression comments from `_resource_registry_dag.py` that violated the project's `CONTRIBUTING.md` policy prohibiting `# type: ignore` directives. Investigation confirmed the suppressions were never required — Pyright already accepts the mixin pattern without them. ## Changes - **Removed `# type: ignore[override]` from `link_child`** in `ResourceDagMixin`: the suppression was applied to the method signature using a `self: RegistryHost` Protocol annotation; Pyright accepts this pattern natively and the comment was redundant. - **Removed `# type: ignore[override]` from `unlink_child`** in `ResourceDagMixin`: same pattern and same rationale as `link_child` — the suppression was unnecessary and masked no real type error. - No structural changes were made to the Protocol definition, inheritance hierarchy, method signatures, or any other logic. The fix is purely compliance: two comment tokens deleted. ## Design Decisions - **No refactoring required.** The `self: RegistryHost` Protocol annotation pattern used in both mixin methods is valid Python and is already understood correctly by Pyright. The suppressions were added at some earlier point either out of caution or due to a transient tooling issue, but they have not been necessary. - **Minimal, surgical fix.** Rather than restructuring the mixin or Protocol to "justify" the suppressions, the correct resolution was simply to remove them and verify that `nox -e typecheck` remains clean. This avoids unnecessary churn and keeps the diff as small as possible. - **Policy compliance is the primary driver.** `CONTRIBUTING.md` explicitly prohibits `# type: ignore` directives. Retaining suppressions that are not needed is a direct violation of that policy, regardless of whether they cause functional harm. ## Testing - **`nox -e typecheck`: 0 errors, 0 warnings, 0 informations ✅** — confirms the suppressions were genuinely unnecessary and their removal introduces no type regressions - No logic changed; existing test suite unaffected ## Modules Affected - `src/cleveragents/application/services/_resource_registry_dag.py` — only file changed; two inline suppression comments removed from `ResourceDagMixin.link_child` and `ResourceDagMixin.unlink_child` ## Related Issues Closes #2830 --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
fix(resource-registry): remove type: ignore[override] suppressions from ResourceDagMixin by restructuring mixin/protocol relationship
All checks were successful
CI / lint (pull_request) Successful in 29s
CI / quality (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 53s
CI / security (pull_request) Successful in 54s
CI / build (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 7m5s
CI / e2e_tests (pull_request) Successful in 17m54s
CI / integration_tests (pull_request) Successful in 22m51s
CI / coverage (pull_request) Successful in 10m50s
CI / docker (pull_request) Successful in 1m23s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m18s
8d7f2103e7
The two # type: ignore[override] inline suppression comments on the
link_child and unlink_child methods of ResourceDagMixin violated the
project's strict no-suppression policy in CONTRIBUTING.md.

Investigation revealed the suppressions were unnecessary: after removing
them, nox -e typecheck passes with 0 errors and 0 warnings. The
underlying Pyright type checker already accepts the mixin pattern with
self: RegistryHost annotations without any suppression.

Both comments are removed with no other changes required.

ISSUES CLOSED: #2830
Author
Owner

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3238-1775372600]


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3238-1775372600] --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo added this to the v3.7.0 milestone 2026-04-05 08:53:17 +00:00
freemo left a comment

Independent Code Review: APPROVED

Summary

This PR makes a clean, minimal, and correct fix: removing two unnecessary # type: ignore[override] suppression comments from ResourceDagMixin.link_child and ResourceDagMixin.unlink_child in _resource_registry_dag.py.

Review Findings

Specification Alignment

  • This is a compliance fix removing policy-violating type suppressions. No architectural or behavioral changes.
  • The self: RegistryHost Protocol annotation pattern is valid and Pyright accepts it natively.

Code Quality

  • Diff is surgical: exactly 2 lines changed, both removing # type: ignore[override] comments.
  • No logic, signatures, imports, or structure modified.
  • File remains at 293 lines (well under 500-line limit).
  • No remaining # type: ignore directives in the file.

CI Verification (partial — still running)

  • lint: passed
  • typecheck: passed — confirms suppressions were genuinely unnecessary
  • quality: passed
  • security: passed
  • build: passed
  • helm: passed
  • unit_tests, integration_tests, e2e_tests, coverage: still running

Commit Message

  • Follows Conventional Changelog format: fix(resource-registry): ...
  • Has ISSUES CLOSED: #2830 footer.
  • Minor note: the subject says "by restructuring mixin/protocol relationship" but no restructuring occurred — the body correctly clarifies this. Acceptable since the issue metadata prescribed this message.

PR Metadata

  • Type/Refactor label present.
  • Closes #2830 in body.
  • Milestone set to v3.7.0 (corrected during review).

Test Adequacy

  • No test changes needed — this is a comment-only removal with no behavioral impact.
  • Existing test suite covers link_child and unlink_child functionality.

Security

  • No security concerns — comment removal only.

Verdict

Clean compliance fix. No concerns. Scheduling merge for when remaining CI checks complete.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Independent Code Review: APPROVED ✅ ### Summary This PR makes a clean, minimal, and correct fix: removing two unnecessary `# type: ignore[override]` suppression comments from `ResourceDagMixin.link_child` and `ResourceDagMixin.unlink_child` in `_resource_registry_dag.py`. ### Review Findings **Specification Alignment** ✅ - This is a compliance fix removing policy-violating type suppressions. No architectural or behavioral changes. - The `self: RegistryHost` Protocol annotation pattern is valid and Pyright accepts it natively. **Code Quality** ✅ - Diff is surgical: exactly 2 lines changed, both removing `# type: ignore[override]` comments. - No logic, signatures, imports, or structure modified. - File remains at 293 lines (well under 500-line limit). - No remaining `# type: ignore` directives in the file. **CI Verification** ✅ (partial — still running) - `lint`: ✅ passed - `typecheck`: ✅ passed — confirms suppressions were genuinely unnecessary - `quality`: ✅ passed - `security`: ✅ passed - `build`: ✅ passed - `helm`: ✅ passed - `unit_tests`, `integration_tests`, `e2e_tests`, `coverage`: ⏳ still running **Commit Message** ✅ - Follows Conventional Changelog format: `fix(resource-registry): ...` - Has `ISSUES CLOSED: #2830` footer. - Minor note: the subject says "by restructuring mixin/protocol relationship" but no restructuring occurred — the body correctly clarifies this. Acceptable since the issue metadata prescribed this message. **PR Metadata** ✅ - `Type/Refactor` label present. - `Closes #2830` in body. - Milestone set to v3.7.0 (corrected during review). **Test Adequacy** ✅ - No test changes needed — this is a comment-only removal with no behavioral impact. - Existing test suite covers `link_child` and `unlink_child` functionality. **Security** ✅ - No security concerns — comment removal only. ### Verdict Clean compliance fix. No concerns. Scheduling merge for when remaining CI checks complete. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo scheduled this pull request to auto merge when all checks succeed 2026-04-05 08:57:14 +00:00
freemo merged commit 6bf67861c3 into master 2026-04-05 21:14:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!3238
No description provided.