Skip to content

[OPIK-8023] Add page-boundary coverage for dataset-item JSON-key sorting - #7939

Open
thiagohora wants to merge 2 commits into
mainfrom
thiagoh/OPIK-8023-datasetitem-sort-pagination
Open

[OPIK-8023] Add page-boundary coverage for dataset-item JSON-key sorting#7939
thiagohora wants to merge 2 commits into
mainfrom
thiagoh/OPIK-8023-datasetitem-sort-pagination

Conversation

@thiagohora

@thiagohora thiagohora commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Details

Follow-up to #7935. Extends DatasetVersionResourceTest#sortByJsonKeyThroughPushTopLimit with a page=2, size=2 request per namespace/direction, asserting the single trailing item on the boundary page and that total stays at the full matching count. This exercises the push-top-limit OFFSET :top_offset + outer LIMIT path, which was previously covered only at page=1, size=10.

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-8023

AI-WATERMARK

AI-WATERMARK: yes

  • Tools: Claude Code
  • Model(s): Claude Opus
  • Scope: Added the page-boundary assertions to the existing parameterized test
  • Human verification: ran the test locally (6 namespace/direction cases green)

Testing

  • mvn -o test -Dtest='DatasetVersionResourceTest$ExperimentDatasetVersionLinking#sortByJsonKeyThroughPushTopLimit' — 6/6 pass (output/input/metadata x ASC/DESC), each now also asserting page 2 (size 2) returns the single boundary item with total=3
  • mvn -o spotless:check — clean
  • Environment: local Maven, Testcontainers (ClickHouse / MySQL / Redis)

Documentation

N/A — test-only change.

Follow-up to #7935 (already merged to main).

🤖 Generated with Claude Code

Follow-up to #7935. Extend the parameterized version-DAO sort test with a page=2,size=2
request per namespace/direction, asserting the single trailing item on the boundary page
and that total stays at the full matching count. This exercises the push-top-limit
OFFSET :top_offset + outer LIMIT path, previously covered only at page=1,size=10.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thiagohora
thiagohora requested a review from a team as a code owner August 20, 2026 17:57
@github-actions github-actions Bot added java Pull requests that update Java code Backend tests Including test files, or tests related like configuration. labels Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

⏱️ pre-commit per-hook timing

Hook Description Result Duration
☕ spotless — java backend Format Java code 4.88s
Total (1 ran) 4.88s
⏭️ 42 skipped (no matching files changed)
Hook Description Result
🐍 trim trailing whitespace — python sdk Strip trailing whitespace ⏭️
🐍 fix end of files — python sdk Ensure files end in a newline ⏭️
🐍 ruff — python sdk Lint + autofix Python (ruff) ⏭️
🐍 ruff-format — python sdk Format Python code (ruff) ⏭️
🐍 mypy — python sdk Static type check ⏭️
🤖 trim trailing whitespace — optimizer Strip trailing whitespace ⏭️
🤖 fix end of files — optimizer Ensure files end in a newline ⏭️
🤖 check yaml — optimizer Validate YAML syntax ⏭️
🤖 check json — optimizer Validate JSON syntax ⏭️
🤖 check toml — optimizer Validate TOML syntax ⏭️
🤖 check for added large files — optimizer Block large files (>1MB) ⏭️
🔐 detect private key — optimizer Block committed private keys ⏭️
🤖 check for merge conflicts — optimizer Block merge-conflict markers ⏭️
🤖 check for case conflicts — optimizer Block case-only name clashes ⏭️
🤖 pyupgrade — optimizer Modernize Python syntax ⏭️
🤖 ruff — optimizer Lint + autofix Python (ruff) ⏭️
🤖 ruff-format — optimizer Format Python code (ruff) ⏭️
🤖 mypy — optimizer Static type check ⏭️
📓 nbstripout — optimizer notebooks Strip notebook output ⏭️
📝 markdownlint — optimizer Lint Markdown ⏭️
🔤 codespell — optimizer Fix common misspellings ⏭️
📊 radon cc — optimizer Cyclomatic-complexity gate ⏭️
📊 radon raw — optimizer Raw size metrics gate ⏭️
📊 xenon — optimizer Fail on complexity thresholds ⏭️
📊 lizard — optimizer Cyclomatic-complexity gate ⏭️
🧹 vulture — optimizer Find dead code ⏭️
🛡️ trim trailing whitespace — guardrails Strip trailing whitespace ⏭️
🛡️ fix end of files — guardrails Ensure files end in a newline ⏭️
🛡️ ruff — guardrails Lint + autofix Python (ruff) ⏭️
🛡️ ruff-format — guardrails Format Python code (ruff) ⏭️
🛡️ mypy — guardrails Static type check ⏭️
⚓ helm-docs Regenerate Helm chart README ⏭️
block non-public FE plugins Block non-public FE plugins ⏭️
🧪 pre-commit wrapper smoke tests Self-test the wrapper scripts ⏭️
🧪 rebaseline script tests Self-test the changelog re-baseline script ⏭️
🌐 eslint — frontend Lint + autofix JS/TS ⏭️
🌐 typecheck — frontend Whole-project tsc type check ⏭️
📘 eslint — typescript sdk Lint + autofix JS/TS ⏭️
📘 typecheck — typescript sdk Whole-project tsc type check ⏭️
⚙️ actionlint — github workflows Lint GitHub Actions workflows ⏭️
🐳 hadolint — dockerfiles Lint Dockerfiles ⏭️
🌈 zizmor — github workflows security Security-scan GitHub Actions workflows ⏭️

@CometActions

CometActions commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

No test needed here.

This PR is test-only: the whole diff is 9 added lines in DatasetVersionResourceTest.java asserting page 2 of a size-2 page over JSON-key sorting. No production code changes, so there is no new behaviour for an e2e test to cover — the assertion you added is itself the coverage for the top_offset/LIMIT path.

Run

Advisory, from the QA test radar. Nothing here blocks this PR, and anything it proposes is a draft for review.

Re-checked after a push on 21 Aug 09:12 UTC — nothing the verdict depends on changed.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Backend Tests - Integration Group 12

227 tests   226 ✅  4m 3s ⏱️
 32 suites    1 💤
 32 files      0 ❌

Results for commit bc173cd.

♻️ This comment has been updated with latest results.

…push-top-limit

Per review: applyPushTopLimit requires hasAggregated && !hasRaw. Without materialized
aggregates the query fell back to the raw path with an ordinary OFFSET, so the
push-top-limit CTE (and its bound JSON key + top_offset) went untested. Populate
experiment_item_aggregates via ExperimentAggregatesService before the sort/page-boundary
assertions so the test deterministically exercises the push-top-limit branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thiagohora
thiagohora requested a review from JetoPistola August 21, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code 🟢 size/S tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants