Skip to content

fix: reject partial hourly drills - #131

Closed
NikolayS wants to merge 2 commits into
mainfrom
release/reject-partial-hour-drills-130
Closed

fix: reject partial hourly drills#131
NikolayS wants to merge 2 commits into
mainfrom
release/reject-partial-hour-drills-130

Conversation

@NikolayS

Copy link
Copy Markdown
Owner

What changed

  • preserves exact unfiltered/database-only partial-hour aas and timeline reads through rollup_1h.minute_counts
  • requires hour-aligned bounds when a reader must use hourly wait/query arrays
  • rejects explicitly requested sub-hour timeline and chart buckets on rollup_1h
  • widens omitted buckets to the safe one-hour grain automatically
  • documents the retained-precision boundary in README and catalog comments

Why

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:

  • RED at 5da0e13: filtered half-hour aas returned instead of rejecting
  • GREEN at 1aa6bf3:
    • unfiltered half-hour remains avg_aas = 1.00, backend_seconds = 1800
    • filtered aas, top, dimensional compare, explicit sub-hour timeline, and explicit sub-hour chart reject
    • aligned filtered hour remains exact at avg_aas = 1.00, backend_seconds = 3600
    • omitted timeline/chart buckets auto-select two one-hour rows
  • existing 2.0 rollup-source reader tests pass
  • existing rollup_1h minute-seam tests pass
  • existing calendar-bucket and spike-first ordering tests pass
  • installer re-apply with ON_ERROR_STOP=1 passes
  • git diff --check main...HEAD passes

Closes #130

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.
@NikolayS

Copy link
Copy Markdown
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.

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.

Bug: partial-hour dimensional reads fabricate rollup_1h AAS

1 participant