Skip to content

refactor: remove stale typing suppressions - #295

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/provider-parser-contracts
Apr 21, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/provider-parser-contracts

Conversation

@Sinity

@Sinity Sinity commented Apr 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove the stale polylogue.sources.providers.* mypy follow-imports override.
  • Replace the last broad dataclasses.replace ignore in filter planning with a typed callable boundary.
  • Remove avoidable test type: ignore suppressions around storage and pipeline fixtures.

Problem

The mypy campaign had shrunk the checked surface, but a stale provider override and several local ignores still obscured whether the strict contract was genuinely clean. These suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries.

Solution

Typed the filter builder replacement call explicitly, removed the obsolete mypy override, and rewrote the affected test fixtures to express their concrete mock/record contracts without Any-style escape hatches. The only remaining source/test/devtools type: ignore is the dateparser untyped import boundary.

Verification

  • ruff check --fix pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py
  • ruff format pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py
  • mypy polylogue tests
  • pytest -q tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py tests/unit/sources
  • devtools verify --quick

Ref #281

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 53 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 53 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 03a72a96-8a31-4f26-a478-7039c7af03a2

📥 Commits

Reviewing files that changed from the base of the PR and between e805b14 and 3d75aa8.

📒 Files selected for processing (6)
  • polylogue/lib/filter_builder.py
  • pyproject.toml
  • tests/unit/pipeline/test_resilience.py
  • tests/unit/storage/test_embedding_stats.py
  • tests/unit/storage/test_hybrid_laws.py
  • tests/unit/storage/test_parse_tracking.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/provider-parser-contracts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 175c97a into master Apr 21, 2026
13 of 14 checks passed
@Sinity
Sinity deleted the feature/refactor/provider-parser-contracts branch April 21, 2026 12:58
Sinity added a commit that referenced this pull request Apr 22, 2026
## Summary
- Remove the stale `polylogue.sources.providers.*` mypy follow-imports override.
- Replace the last broad `dataclasses.replace` ignore in filter planning with a typed callable boundary.
- Remove avoidable test `type: ignore` suppressions around storage and pipeline fixtures.

## Problem
The mypy campaign had shrunk the checked surface, but a stale provider override and several local ignores still obscured whether the strict contract was genuinely clean. These suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries.

## Solution
Typed the filter builder replacement call explicitly, removed the obsolete mypy override, and rewrote the affected test fixtures to express their concrete mock/record contracts without `Any`-style escape hatches. The only remaining source/test/devtools `type: ignore` is the `dateparser` untyped import boundary.

## Verification
- `ruff check --fix pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py`
- `ruff format pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py`
- `mypy polylogue tests`
- `pytest -q tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py tests/unit/sources`
- `devtools verify --quick`

Ref #281
Sinity added a commit that referenced this pull request Apr 22, 2026
The mypy campaign had shrunk the checked surface, but a stale
`polylogue.sources.providers.*` follow-imports override and several
local `type: ignore` suppressions still obscured whether the strict
contract was genuinely clean. Those suppressions also made future
type debt harder to distinguish from intentional untyped
third-party boundaries.

Removes the stale provider override. Replaces the last broad
`dataclasses.replace` ignore in filter planning with a typed
callable boundary. Removes avoidable test `type: ignore`
suppressions around storage and pipeline fixtures. Rewrites the
affected test fixtures to express their concrete mock/record
contracts without `Any`-style escape hatches.

The only remaining source/test/devtools `type: ignore` is the
`dateparser` untyped import boundary.

Verification: ruff + mypy + pytest over storage / pipeline /
sources tests; devtools verify --quick green.

Ref #281
Sinity added a commit that referenced this pull request Apr 22, 2026
The mypy campaign had shrunk the checked surface, but a stale
`polylogue.sources.providers.*` follow-imports override and several
local `type: ignore` suppressions still obscured whether the strict
contract was genuinely clean. Those suppressions also made future
type debt harder to distinguish from intentional untyped
third-party boundaries.

Removes the stale provider override. Replaces the last broad
`dataclasses.replace` ignore in filter planning with a typed
callable boundary. Removes avoidable test `type: ignore`
suppressions around storage and pipeline fixtures. Rewrites the
affected test fixtures to express their concrete mock/record
contracts without `Any`-style escape hatches.

The only remaining source/test/devtools `type: ignore` is the
`dateparser` untyped import boundary.

Verification: ruff + mypy + pytest over storage / pipeline /
sources tests; devtools verify --quick green.

Ref #281
Sinity added a commit that referenced this pull request Apr 22, 2026
The mypy campaign had shrunk the checked surface, but a stale
`polylogue.sources.providers.*` follow-imports override and several
local `type: ignore` suppressions still obscured whether the strict
contract was genuinely clean. Those suppressions also made future
type debt harder to distinguish from intentional untyped
third-party boundaries.

Removes the stale provider override. Replaces the last broad
`dataclasses.replace` ignore in filter planning with a typed
callable boundary. Removes avoidable test `type: ignore`
suppressions around storage and pipeline fixtures. Rewrites the
affected test fixtures to express their concrete mock/record
contracts without `Any`-style escape hatches.

The only remaining source/test/devtools `type: ignore` is the
`dateparser` untyped import boundary.

Verification: ruff + mypy + pytest over storage / pipeline /
sources tests; devtools verify --quick green.

Ref #281
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants