fix: reject partial hourly drills - #131
Closed
NikolayS wants to merge 2 commits into
Closed
Conversation
NikolayS
added a commit
that referenced
this pull request
Jul 27, 2026
Preserve honest retained grain across aas, timeline, top, compare, chart, summary, and v1.5 backfills; disclose effective plans and mark legacy/incomplete hourly detail as rollup_1h_flat.\n\nThe final rebase preserves #189's physical/logical raw-retention split and #181's dynamic reader grants. The Codex review's full-archive scan finding is fixed by keeping _rollup_1h_has_flat() indexable. Fixes #161, #168, #175, and #130; supersedes #131.
Owner
Author
|
Superseded by #182, merged as a1f0a30. #182 fixes the same #130 partial-hour failure across the full reader surface by snapping hour-only plans outward and disclosing effective bounds/buckets, while preserving exact minute_counts-backed database/unfiltered reads and zero-argument/default calls. Closing this narrower hard-error implementation in favor of the merged successor. |
This was referenced Aug 3, 2026
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 changed
aasandtimelinereads throughrollup_1h.minute_countstimelineandchartbuckets onrollup_1hWhy
An hourly dimensional row represents a full hour. The readers previously selected whole rows by their start timestamp and divided their complete counts by a clipped partial window. A single-backend half-hour IO read could therefore report AAS 2.0, while a cross-hour read could omit the overlapping first hour.
The current storage format cannot reconstruct partial-hour wait/query dimensions exactly. Rejecting unsupported shapes is safer than fabricating precision.
Impact
The data API now raises an actionable error for unsupported partial-hour dimensional reads. Unfiltered minute-total reads remain exact and unchanged.
Validation
Postgres 18.3:
5da0e13: filtered half-houraasreturned instead of rejecting1aa6bf3:avg_aas = 1.00,backend_seconds = 1800aas,top, dimensionalcompare, explicit sub-hourtimeline, and explicit sub-hourchartrejectavg_aas = 1.00,backend_seconds = 3600ON_ERROR_STOP=1passesgit diff --check main...HEADpassesCloses #130