Repository navigation
test: type integration workflow contracts - #293
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 46 minutes and 36 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 (6)
✨ 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 - removes explicit dynamic typing from the integration test suite - gives health-repair database helpers concrete SQLite connection types - types integration fixtures, JSON payloads, CLI machine-contract decoding, and schema patch context managers ## Problem The integration tests still used explicit Any annotations across health repair workflows, facade ingestion flows, end-to-end workflow tests, timestamp chaos tests, schema operator workflow tests, and CLI machine-contract tests. That left the highest-level contract tests less precise than the code paths they exercise. Ref #281 ## Solution Replace dynamic fixture and helper annotations with concrete Path, pytest.MonkeyPatch, Source, JSONDocument, sqlite3.Connection, and workflow-specific type aliases/protocols. Where JSON mutation was previously path-dependent through nested dynamic dictionaries, rebuild the typed JSON payload explicitly. Touched files: - tests/integration/test_chronology_extremes.py - tests/integration/test_cli_machine_contract.py - tests/integration/test_facade.py - tests/integration/test_health.py - tests/integration/test_schema_operator_workflow.py - tests/integration/test_workflows.py ## Verification - rg -n "\bAny\b|cast\(Any|typing import .*Any" tests/integration -g "*.py" - PATH=/tmp/polylogue-281/.cache/codex-bin:$PATH ruff check --fix tests/integration - PATH=/tmp/polylogue-281/.cache/codex-bin:$PATH ruff format tests/integration - PATH=/tmp/polylogue-281/.cache/codex-bin:$PATH mypy tests/integration - PATH=/tmp/polylogue-281/.cache/codex-bin:$PATH pytest -q tests/integration/test_health.py tests/integration/test_facade.py tests/integration/test_workflows.py tests/integration/test_chronology_extremes.py tests/integration/test_cli_machine_contract.py tests/integration/test_schema_operator_workflow.py - PATH=/tmp/polylogue-281/.cache/codex-bin:$PATH git push --force-with-lease -u origin feature/refactor/integration-test-contracts
Integration tests still used explicit `Any` annotations across health repair workflows, facade ingestion flows, end-to-end workflow tests, timestamp chaos tests, schema operator workflow tests, and CLI machine-contract tests. The highest-level contract tests were less precise than the code paths they exercise. Replaces dynamic fixture and helper annotations with concrete `Path`, `pytest.MonkeyPatch`, `Source`, `JSONDocument`, `sqlite3.Connection`, and workflow-specific type aliases / protocols. Where JSON mutation was previously path-dependent through nested dynamic dictionaries, rebuilds the typed JSON payload explicitly. Gives health-repair database helpers concrete SQLite connection types. Types integration fixtures, JSON payloads, CLI machine-contract decoding, and schema patch context managers. Touched: `test_chronology_extremes.py`, `test_cli_machine_contract.py`, `test_facade.py`, `test_health.py`, `test_schema_operator_workflow.py`, `test_workflows.py`. Verification: ruff + mypy + pytest over the touched integration tests; devtools verify green. Ref #281
Integration tests still used explicit `Any` annotations across health repair workflows, facade ingestion flows, end-to-end workflow tests, timestamp chaos tests, schema operator workflow tests, and CLI machine-contract tests. The highest-level contract tests were less precise than the code paths they exercise. Replaces dynamic fixture and helper annotations with concrete `Path`, `pytest.MonkeyPatch`, `Source`, `JSONDocument`, `sqlite3.Connection`, and workflow-specific type aliases / protocols. Where JSON mutation was previously path-dependent through nested dynamic dictionaries, rebuilds the typed JSON payload explicitly. Gives health-repair database helpers concrete SQLite connection types. Types integration fixtures, JSON payloads, CLI machine-contract decoding, and schema patch context managers. Touched: `test_chronology_extremes.py`, `test_cli_machine_contract.py`, `test_facade.py`, `test_health.py`, `test_schema_operator_workflow.py`, `test_workflows.py`. Verification: ruff + mypy + pytest over the touched integration tests; devtools verify green. Ref #281
Integration tests still used explicit `Any` annotations across health repair workflows, facade ingestion flows, end-to-end workflow tests, timestamp chaos tests, schema operator workflow tests, and CLI machine-contract tests. The highest-level contract tests were less precise than the code paths they exercise. Replaces dynamic fixture and helper annotations with concrete `Path`, `pytest.MonkeyPatch`, `Source`, `JSONDocument`, `sqlite3.Connection`, and workflow-specific type aliases / protocols. Where JSON mutation was previously path-dependent through nested dynamic dictionaries, rebuilds the typed JSON payload explicitly. Gives health-repair database helpers concrete SQLite connection types. Types integration fixtures, JSON payloads, CLI machine-contract decoding, and schema patch context managers. Touched: `test_chronology_extremes.py`, `test_cli_machine_contract.py`, `test_facade.py`, `test_health.py`, `test_schema_operator_workflow.py`, `test_workflows.py`. Verification: ruff + mypy + pytest over the touched integration tests; devtools verify green. Ref #281
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ 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
Problem
The integration tests still used explicit Any annotations across health repair workflows, facade ingestion flows, end-to-end workflow tests, timestamp chaos tests, schema operator workflow tests, and CLI machine-contract tests. That left the highest-level contract tests less precise than the code paths they exercise.
Ref #281
Solution
Replace dynamic fixture and helper annotations with concrete Path, pytest.MonkeyPatch, Source, JSONDocument, sqlite3.Connection, and workflow-specific type aliases/protocols. Where JSON mutation was previously path-dependent through nested dynamic dictionaries, rebuild the typed JSON payload explicitly.
Touched files:
Verification