Repository navigation
feat(query): sort terminal pipeline rows by time (#2006) - #2187
Conversation
Problem: #2006 pipeline queries can now scope and window terminal rows, but persisted terminal row queries still had no in-language ordering stage. Saved query strings needed a concrete sort primitive before more advanced pipeline stages can build on them. What changed: add a typed `sort by time [asc|desc]` terminal pipeline stage, expose it in explain payloads, lower it into SQLite ORDER BY clauses for message/action/block/assertion rows, and reject runtime-transform units until they have a streaming sort lowerer. Verification: devtools test tests/unit/cli/test_query_expression.py -k pipeline; devtools verify --quick. Ref #2006
|
Warning Review limit reached
More reviews will be available in 24 minutes and 3 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Adds a typed
sort by timepipeline stage for terminal query-unit rows. SQL-backed terminal units (messages,actions,blocks, andassertions) now carry the parsed sort stage into archive row execution so users can request ascending or descending time order directly in the DSL.Problem
#2006 defines the query DSL as the product selection language, including pipeline stages. Terminal row queries already existed, but their ordering was fixed per row source; the parser accepted pipeline stage syntax without a storage-backed row-ordering path for this useful base case.
Solution
sort by time [asc|desc].ORDER BYfragments.Verification
nix develop --command devtools test tests/unit/storage/test_no_string_interpolated_sql.py tests/unit/cli/test_query_expression.py -k 'pipeline or string_interpolated_sql'→ 12 passed.nix develop --command devtools test tests/unit/cli/test_help_snapshots.py::test_root_help_snapshot tests/unit/storage/test_no_string_interpolated_sql.py tests/unit/cli/test_query_expression.py -k 'root_help_snapshot or pipeline or string_interpolated_sql'→ 13 passed after rebasing onto current master.nix develop --command devtools verify --quick→ exit_code 0.nix develop --command devtools verifybefore rebase → 6060 passed, 1 stale root-help snapshot failure caused by master moving underneath the branch; the focused root-help snapshot passed after rebase.