Skip to content

seed(stand): two years of activity on both stands - #2501

Closed
ktursunov wants to merge 2 commits into
mainfrom
seed/two-year-window
Closed

seed(stand): two years of activity on both stands#2501
ktursunov wants to merge 2 commits into
mainfrom
seed/two-year-window

Conversation

@ktursunov

@ktursunov ktursunov commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

The compose stand seeded 60 days and the deployed stand 365. Both seed 730 now, so a developer and CI look at the same shape of data, and the range finally reaches back far enough for a year-over-year view.

The trap this walks into on purpose

730 days is wider than any single request the analytics API will answer — MAX_PERIOD_DAYS is 400 and the check is >=, on both /v1/metric-results and /v1/metric-drilldown. INFRA.md already names this exact failure ("730-day seed window"): a window-derived request starts answering 400 and it reads like a broad data problem rather than a period that is simply too long.

The mitigation was already built — tests/stand/api/analytics/query_window returns the queryable tail of the seeded range, and the package docstring says every request wanting "a real period" should go through it. Four call sites still read data_window raw, and each would have gone red the moment the window grew:

  • test_drilldown.py _request_for and _period_value
  • test_drilldown_rebuild.py _request and _period_value

They go through the helper now, so the suite asks about the most recent 399 days whatever the seed window is. INFRA.md's row is rewritten to match: the guard is no longer "keep the seed inside the API limit", it is "no test may read data_window raw".

A reconciliation has to pass the same clamped period to both sides — the evidence walk and the scalar it is checked against — or it compares two different periods and the disagreement looks like a data bug. Both pairs above are converted together for that reason.

What the first CI run caught

test_export_cells_match_the_page_and_hostile_values_stay_inert failed with "no evidence title begins with =". The seed plants deliberately hostile commit titles for the export-escaping test, and it dealt them to the dev lead's earliest commits. Clamping the query to the tail of a 730-day window put them out of reach — the stand did contain every title, and the suite could not see one.

They are dealt to the most recent commits now, which the tail always covers. The dealing moved to after the row loop rather than inside it, and finds the message column by name, so the row tuple's shape stays the one thing the link-parity tests read positionally. Verified offline against the real column list: all six titles land on the final day of the window at both 60 and 730 days.

Cost

The paged walk grows on the compose lane. test_git_commit_drilldown_pages_and_reconciles pages with limit=1 and no budget, so its request count tracks the queried period — which on compose goes from 60 days of data to a clamped 399. Measured offline: 434 → 2,877 rows for that selection. At CI's latency that is a minute or two, not a lane-breaker, and it is bounded from here on: the clamp holds the walk at 399 days however wide the seed becomes. The deployed stand barely moves (365 → 399).

The compose seed itself gets bigger — 60 → 730 days is roughly 12× the rows for every developer bring-up and for the Stand E2E gate. Measured in this PR's own run: api-smoke 8m31s against a 45-minute ceiling, ui-journeys 5m39s and green. SEED_DAYS still overrides per run.

The compose stand seeded 60 days and the deployed stand 365, so a developer
and CI were looking at differently shaped data, and neither reached far
enough back to show a year-over-year view.

Both seed 730 days now. That is wider than any single request the analytics
API will answer — it refuses a period of 400 days or more — which is exactly
the trap INFRA.md already names. The mitigation was built with the helper:
`query_window` returns the queryable tail of the seeded range. Four call
sites still read `data_window` raw, against the note in the package's own
docstring, and each would have started answering 400 the moment the window
grew; they go through the helper now.

Clamping also keeps the paged drilldown walks bounded: they page a fixed 399
days whatever the seed window becomes, rather than growing with it.

A reconciliation must pass the SAME clamped period to both sides — the walk
and the scalar it is checked against — or it compares two different periods.
Both pairs do.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
@ktursunov
ktursunov requested a review from a team as a code owner August 13, 2026 08:20
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ktursunov, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 115 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bc8e4191-b497-483b-94b2-b1d7a90ea829

📥 Commits

Reviewing files that changed from the base of the PR and between c0043b9 and 877e5aa.

📒 Files selected for processing (6)
  • .github/workflows/deploy-test-stand.yml
  • deploy/gitops/environments/test-stand/INFRA.md
  • docker-compose.yml
  • src/ingestion/tools/seed/insight_seed/generators/git.py
  • tests/stand/api/analytics/test_drilldown.py
  • tests/stand/api/analytics/test_drilldown_rebuild.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The titles the export test needs went to the dev lead's EARLIEST commits, so
widening the seed window pushed them out of the period the suite can ask
about — the API answers no period of 400 days or more, so a request for "the
seeded range" is clamped to its tail, and the compose lane failed on a stand
that did contain every title.

They go to the most recent commits instead, which the tail always covers.
The dealing moved after the row loop rather than into it: the message column
is found by name, so the row tuple's shape stays the one thing the link
parity tests read positionally.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
@ktursunov

Copy link
Copy Markdown
Contributor Author

Folded into #2498 — the four commits belong together: the full-suite lane is what makes the seed changes worth running, and the hostile-title fix only exists because the wider window exposed it. Closing this in favour of the combined PR.

@ktursunov ktursunov closed this Aug 13, 2026
@ktursunov
ktursunov deleted the seed/two-year-window branch August 13, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant