test(intake): stabilize ATIF ingest tests against the 30-day read lookback - #174
Merged
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a module-level ChangesTest Timestamp Pinning
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
These tests ingest spans with fixed 2026-05 timestamps and read them back without a time filter. The spans list/traces endpoints default started_at to now-30d, so once wall-clock passes ~30 days after the fixtures the reads return nothing and the suite fails (assert 0 == 7 / StopIteration) — unrelated to any ingest logic. Pin each historical list read to an explicit started_at lower bound so the suite is stable regardless of the current date. Signed-off-by: mschwab <mschwab@nvidia.com>
marcusds
force-pushed
the
fix-atif-ingest-experiment-rollup/mschwab
branch
from
June 4, 2026 00:02
41b857c to
3a9bc49
Compare
Contributor
|
BrianNewsom
approved these changes
Jun 4, 2026
marcusds
enabled auto-merge
June 4, 2026 00:08
matthewgrossman
approved these changes
Jun 4, 2026
This was referenced Jul 6, 2026
Merged
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.
What
Pins the historical span/trace reads in
services/intake/tests/integration/spans/test_atif_ingest.pyto an explicitstarted_atlower bound.Why
test_atif_ingest_accepts_example_trajectory_and_reconstructs_read_side_dataandtest_atif_trace_tokens_do_not_double_count_when_trajectory_and_steps_both_carry_metricsingest spans with fixed2026-05-04timestamps and read them back with no time filter. The spanslist/tracesendpoints defaultstarted_attonow − 30 days(DEFAULT_LIST_LOOKBACK_DAYS). Once wall-clock passed ~30 days after the fixtures (≈ 2026-06-03T18:57Z), the reads returned nothing →assert 0 == 7/StopIteration. This is a calendar time-bomb in the tests, not an ingest regression — verified locally (Docker/ClickHouse): the 7 spans are written fine; only the read filtered them out by date.This is currently red on
mainand every open PR (the integration check is non-blocking, so PRs kept merging).Fix
Add an explicit
filter[started_at][gte](constant_HISTORICAL_GTE = 2024-01-01) to each historical list read so the suite no longer depends on the current date. Timestamps and reconstruction assertions are unchanged. Product behavior (recent-by-default lookback) untouched.Testing
pytest services/intake/tests/integration/spans/test_atif_ingest.py→ 16 passed (was 2 failed). ruff + ty clean.Summary by CodeRabbit