fix(intake): bound trace hydration by page timestamps - #1039
Conversation
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
|
📝 WalkthroughWalkthroughTrace page references now retain Unix-microsecond start times. Hydration queries apply inclusive minimum and maximum start-time bounds. Hydration reconciliation matches source-format and trace-ID keys. Tests cover the updated query parameters and row schemas. ChangesTrace hydration timestamp bounds
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
services/intake/tests/test_traces_clickhouse_repository.py (1)
133-140: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winTest a non-empty timestamp range.
The fixture contains one page row, so the minimum and maximum bounds are always equal. Add a second row with a different
started_at_usvalue and assert distinctpage_started_at_min_usandpage_started_at_max_usvalues.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@services/intake/tests/test_traces_clickhouse_repository.py` around lines 133 - 140, Extend the fixture in the test using _Client and _QueryResult with a second page row whose started_at_us differs from the existing page_row value. Update the assertions for page_started_at_min_us and page_started_at_max_us to verify the distinct lower and upper timestamps produced by the non-empty range.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@services/intake/tests/test_traces_clickhouse_repository.py`:
- Around line 133-140: Extend the fixture in the test using _Client and
_QueryResult with a second page row whose started_at_us differs from the
existing page_row value. Update the assertions for page_started_at_min_us and
page_started_at_max_us to verify the distinct lower and upper timestamps
produced by the non-empty range.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c3081e2c-6e30-4bfb-9a99-b098da3815f9
📒 Files selected for processing (2)
services/intake/src/nmp/intake/repository/clickhouse/trace.pyservices/intake/tests/test_traces_clickhouse_repository.py
🚧 Files skipped from review as they are similar to previous changes (1)
- services/intake/src/nmp/intake/repository/clickhouse/trace.py
Summary
Production profile
For the reported 50-row page:
Count and page selection were already fast at 53ms and 90ms respectively.
Validation
Summary by CodeRabbit