Skip to content

feat(lineage): add compact validation summaries - #1539

Merged
gcko merged 2 commits into
mainfrom
feature/drc-4260-aggregate-compact-validation-summaries-by-lineage-node
Sep 8, 2026
Merged

gcko merged 2 commits into
mainfrom
feature/drc-4260-aggregate-compact-validation-summaries-by-lineage-node

Conversation

@gcko

@gcko gcko commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

Feature

What this PR does / why we need it:

  • Adds compact lineage-node summaries for value, profile, top-k, and histogram validation results.
  • Selects the latest valid evidence deterministically and handles both persisted mappings and live Pydantic results.
  • Exposes counts and per-column run IDs without embedding raw frames, rows, values, labels, or bins.
  • Refreshes lineage aggregates after all supported terminal validation runs.
  • Preserves existing row-count payloads and state-loader interfaces.

Which issue(s) this PR fixes:

Closes DRC-4260

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Yes.

Lineage run aggregates now include compact summaries for value, profile, top-k, and histogram validations without returning raw result payloads.

@gcko gcko changed the title feature/drc 4260 aggregate compact validation summaries by lineage node feat(lineage): add compact validation summaries Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.44262% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
recce/apis/run_func.py 88.78% 12 Missing ⚠️
Files with missing lines Coverage Δ
tests/apis/test_run_func.py 98.46% <100.00%> (+0.36%) ⬆️
recce/apis/run_func.py 88.33% <88.78%> (+4.60%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gcko gcko self-assigned this Sep 4, 2026
gcko and others added 2 commits September 8, 2026 08:05
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@datarecce.io>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@datarecce.io>
@gcko
gcko force-pushed the feature/drc-4260-aggregate-compact-validation-summaries-by-lineage-node branch from c63b6df to 8151e17 Compare September 8, 2026 00:05
@gcko
gcko requested a review from wcchang1115 September 8, 2026 00:05
@wcchang1115

Copy link
Copy Markdown
Collaborator

Code Review: PR #1539

SHA 8151e17 · Verdict GO

Blockers

None.

Issues

None.

Notes

  1. recce/apis/run_func.py:513,514 — validation_summary publishes two sibling counters that count different units.

    result_count counts runs. Each per-column top_k_diff or histogram_diff run adds one (:508). difference_count counts columns inside the latest value_diff result (:478). The names give no hint of that difference. One value_diff run with 5 mismatched columns gives {'result_count': 1, 'difference_count': 5}, so difference_count exceeds result_count.

    difference_count also has no defined value for a node with no value_diff run. Line 472 leaves it at 0, which reads the same as "a value_diff ran and found nothing".

    No consumer depends on the field yet. PR feat(lineage): add conditional validation summary chip #1540 reads summary.types.value_diff.difference_count instead (GraphNodeOss.tsx:133). So this PR is the last point where a change costs nothing.

  2. recce/apis/run_func.py:355 — The tie-break for recency is str(run.run_id), which is random.

    run_at has one-second resolution (recce/models/types.py:54). Two runs on the same model and column in the same second tie on time. The winner is then the higher UUID4. So latest_run_id can name the older run.

    tests/apis/test_run_func.py:154 and :182 lock this in. Both profile_diff runs carry run_at="2026-09-04T11:00:00Z", and line 243 asserts that the higher UUID wins.

    Millisecond resolution on run_at makes the tie-break real.

  3. recce/apis/run_func.py:390 — _value_diff_difference_count reads matched_p at fixed position row[2].

    The payload carries the column names in data["columns"]. The code never uses them to find the index. A producer with a different column order gives a wrong count and no error.

@wcchang1115 wcchang1115 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 8151e17. GO — no blockers, no issues. Three notes in #1539 (comment)

@gcko
gcko merged commit bf29991 into main Sep 8, 2026
27 checks passed
@gcko
gcko deleted the feature/drc-4260-aggregate-compact-validation-summaries-by-lineage-node branch September 8, 2026 06:51
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.

2 participants