Repository navigation
test: type pipeline contracts - #291
Conversation
|
Warning Rate limit exceeded
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 42 minutes and 17 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
## Summary - remove explicit dynamic typing from `tests/unit/pipeline` - replace loose test doubles with concrete repository, backend, parsing, validation, and payload types - keep pipeline behavior covered by the existing focused tests ## Problem The ongoing refactor campaign is shrinking typed-test debt by eliminating explicit `Any` from test areas that exercise core archive behavior. `tests/unit/pipeline` still had broad dynamic annotations around stage services, ingestion fakes, validation stubs, and synthetic payload helpers, which weakened the value of strict mypy coverage. Ref #281 ## Solution Typed the pipeline test contracts directly against production-facing models where practical: `ConversationRepository`, `SQLiteBackend`, `ParsingService`, `RunResult`, `TransformResult`, `ValidationResult`, `RawConversationRecord`, and typed synthetic payload aliases. The remaining fake objects are narrow casts to the production classes they stand in for, rather than `Any` escapes. ## Verification - `ruff check --fix tests/unit/pipeline` - `ruff format tests/unit/pipeline` - `mypy tests/unit/pipeline` - `pytest -q tests/unit/pipeline` - `devtools verify --quick` - push hook reran `devtools verify --quick` with repo-local `PATH` and passed
`tests/unit/pipeline` still had broad dynamic annotations around stage services, ingestion fakes, validation stubs, and synthetic payload helpers, which weakened the value of strict mypy coverage. Removes explicit dynamic typing from `tests/unit/pipeline`. Replaces loose test doubles with concrete production-facing models where practical: `ConversationRepository`, `SQLiteBackend`, `ParsingService`, `RunResult`, `TransformResult`, `ValidationResult`, `RawConversationRecord`, and typed synthetic payload aliases. The remaining fake objects are narrow casts to the production classes they stand in for, rather than `Any` escapes. Verification: ruff + mypy + pytest over `tests/unit/pipeline`; devtools verify --quick green. Ref #281
`tests/unit/pipeline` still had broad dynamic annotations around stage services, ingestion fakes, validation stubs, and synthetic payload helpers, which weakened the value of strict mypy coverage. Removes explicit dynamic typing from `tests/unit/pipeline`. Replaces loose test doubles with concrete production-facing models where practical: `ConversationRepository`, `SQLiteBackend`, `ParsingService`, `RunResult`, `TransformResult`, `ValidationResult`, `RawConversationRecord`, and typed synthetic payload aliases. The remaining fake objects are narrow casts to the production classes they stand in for, rather than `Any` escapes. Verification: ruff + mypy + pytest over `tests/unit/pipeline`; devtools verify --quick green. Ref #281
`tests/unit/pipeline` still had broad dynamic annotations around stage services, ingestion fakes, validation stubs, and synthetic payload helpers, which weakened the value of strict mypy coverage. Removes explicit dynamic typing from `tests/unit/pipeline`. Replaces loose test doubles with concrete production-facing models where practical: `ConversationRepository`, `SQLiteBackend`, `ParsingService`, `RunResult`, `TransformResult`, `ValidationResult`, `RawConversationRecord`, and typed synthetic payload aliases. The remaining fake objects are narrow casts to the production classes they stand in for, rather than `Any` escapes. Verification: ruff + mypy + pytest over `tests/unit/pipeline`; devtools verify --quick green. Ref #281
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
tests/unit/pipelineProblem
The ongoing refactor campaign is shrinking typed-test debt by eliminating explicit
Anyfrom test areas that exercise core archive behavior.tests/unit/pipelinestill had broad dynamic annotations around stage services, ingestion fakes, validation stubs, and synthetic payload helpers, which weakened the value of strict mypy coverage.Ref #281
Solution
Typed the pipeline test contracts directly against production-facing models where practical:
ConversationRepository,SQLiteBackend,ParsingService,RunResult,TransformResult,ValidationResult,RawConversationRecord, and typed synthetic payload aliases. The remaining fake objects are narrow casts to the production classes they stand in for, rather thanAnyescapes.Verification
ruff check --fix tests/unit/pipelineruff format tests/unit/pipelinemypy tests/unit/pipelinepytest -q tests/unit/pipelinedevtools verify --quickdevtools verify --quickwith repo-localPATHand passed