Skip to content

feat: API Server - Pipeline run search - Validate TimeRange bound ordering (#162)#162

Merged
Ark-kun merged 1 commit intoTangleML:masterfrom
shuofengzhang:fix/time-range-bound-order-validation
Mar 12, 2026
Merged

feat: API Server - Pipeline run search - Validate TimeRange bound ordering (#162)#162
Ark-kun merged 1 commit intoTangleML:masterfrom
shuofengzhang:fix/time-range-bound-order-validation

Conversation

@shuofengzhang
Copy link
Contributor

What changed

  • Added TimeRange model validation to reject ranges where start_time is later than end_time.
  • Updated TimeRange docstring to document the bound-order requirement when both timestamps are provided.
  • Added a regression test (test_time_range_rejects_start_after_end) in tests/test_filter_query_models.py.

Why

  • A reversed time window is almost always a caller error.
  • Rejecting invalid ranges early in request validation provides clearer feedback and avoids executing contradictory SQL predicates.

Testing

  • .venv/bin/python -m pytest -q (298 passed)

@shuofengzhang shuofengzhang requested a review from Ark-kun as a code owner March 12, 2026 13:08
@Ark-kun
Copy link
Contributor

Ark-kun commented Mar 12, 2026

Thank you for your contribution.

@Ark-kun Ark-kun changed the title Validate TimeRange bound ordering feat: API Server - Pipeline run search - Validate TimeRange bound ordering (#162) Mar 12, 2026
@Ark-kun Ark-kun merged commit bc8ee06 into TangleML:master Mar 12, 2026
2 checks passed
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.

3 participants