Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/unit/test_psycopg_utils.py">
<violation number="1" location="tests/unit/test_psycopg_utils.py:111">
P2: These range deserialization tests are environment-dependent and will fail when psycopg is installed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Patch HAS_PSYCOPG_RANGE to False for the fallback-path tests so they pass regardless of whether psycopg is installed. Add companion tests that exercise the psycopg-present path (skipped when psycopg is absent). https://claude.ai/code/session_01C8uL7wPeJFV7EeLipxmPgV
- Updated import statements to use importlib for dynamic module loading. - Enhanced type assertions in `restore_row_integer_types` and `restore_row_date_types` tests to ensure results are of expected types (list or dict). - Adjusted handling of non-dict items in row descriptions for better type safety.
jy-tan
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains 122 unit tests across 2 test files.
CoverBot config: Instrumentation utils
ℹ️ You're a few files away from solid coverage in this CoverBot. Consider adjusting the file patterns in the CoverBot config above.
File patterns:
drift/instrumentation/utils/**Why these files?
Both
psycopg_utils.pyandserialization.pysit at 0% coverage with no existing unit tests, yet handle non-trivial DB value serialization/deserialization logic for the PostgreSQL instrumentation path. These files show high recent churn: 3–4 commits each in the past 3 months with 2–3 bug-fix commits, indicating they're historically risky. The tight coupling between them enables round-trip testing of the subsystem. CoverBot's test suite targets the complex conditional branches and multiple public functions that feed into the core replay path.Reviewers
Tagged @jy-tan — authored
restore_row_integer_typesinpsycopg_utils.py. Tagged @sohankshirsagar — 3+ fix commits across bothpsycopg_utils.pyandserialization.pyin recent months.Files tested
drift/instrumentation/utils/psycopg_utils.pydrift/instrumentation/utils/serialization.pyView test details on Tusk ↗