Skip to content

fix(history): keep absorbed Parquet summaries in exports - #1566

Merged
frahlg merged 1 commit into
masterfrom
codex/stable-parquet-export-20261011
Oct 11, 2026
Merged

frahlg merged 1 commit into
masterfrom
codex/stable-parquet-export-20261011

Conversation

@frahlg

@frahlg frahlg commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

After Core absorbed a legacy Parquet file, /api/series with points=0 returned no points after restart. The hourly summaries and file receipt still existed in SQLite. The export branch read raw files and current buckets but skipped summary-only hours.

Stored-resolution exports now use the same summary reader as downsampled queries. They retain the hourly resolution, count, mean and extremes, and leave unknown first/last evidence unset. Existing source checks avoid counting retained files or raw/aggregate rows twice. The point limit also bounds the new summary allocation.

Validation: a real Parquet regression fails before the fix and passes after cleanup and two starts. It checks JSON-style stored points, the sample reader, honest resolution and no duplicate data while the original file exists. Nearby archive/hourly tests and make verify pass. The clean ARM64 build passed 28 checks for 2.3.2 and 28 for 3.8 sources: same and relocated directories, two starts, JSON/CSV Parquet exports, original charts, active settings, credentials, goals, identity, live writes, immutable source/archive and revert. The source uses old-Core SQLite data plus synthetic real legacy Parquet rows. A separate helper test also passed SIGKILL during partial extraction, retry and revert; activation-phase power loss and full installation cutover remain unqualified.

Refs #1564. General migration and field qualification remain blocked; this needs a new exact beta and 48-hour trial with the other approved fixes.

@frahlg
frahlg marked this pull request as ready for review October 11, 2026 20:57
@frahlg
frahlg merged commit 3c2d0f2 into master Oct 11, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T20:59:53.773255Z 66975db Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66975dbbd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// those in stored-resolution exports with their count and envelope.
if s.seriesHoursReady() {
summaries := make(map[int64]*seriesBucketAcc)
if err := s.addSummaryOnlySeriesBuckets(ctx, coldDir, driver, metric, since, until, 1, summaries); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve summaries across mixed archive windows

When a points=0 export spans an absorbed day plus any retained Parquet or aggregate file, this newly added call still omits every absorbed summary: addSummaryOnlySeriesBuckets returns immediately if either path lookup finds even one file anywhere in the requested interval, regardless of its day, driver, or metric. This occurs naturally when AbsorbColdHistory retains one unsummarized or changed sample day, and it makes a broad export silently lose all otherwise valid ts_series_hour history; source-file overlap needs to be excluded per hour/series rather than disabling summary loading for the whole request.

Useful? React with 👍 / 👎.

@frahlg
frahlg deleted the codex/stable-parquet-export-20261011 branch November 11, 2026 09:15
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.

1 participant