Skip to content

Make comparison provenance squash-stable - #75

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/fix-release-provenance
Aug 9, 2026
Merged

Make comparison provenance squash-stable#75
tannerlinsley merged 1 commit into
mainfrom
taren/fix-release-provenance

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • make measured-input content digests authoritative for comparison provenance while retaining the exact source revision for attribution
  • upgrade comparison baselines to schema 4 and record the baseline generated from main at 35832f7
  • prevent squash merges with unchanged measured inputs from failing the post-merge benchmark workflow

This fixes the deterministic provenance failure in the post-merge chart benchmark run and unblocks the 0.8.0 version PR (#74).

Validation

  • pnpm validate
  • 260 test files / 1,745 tests passed
  • focused comparison provenance and docs contract tests passed (18 tests)
  • generated documentation and benchmark baseline checks passed

Release impact

No publishable package changes and no changeset. This is release tooling, tests, baseline data, and documentation only.

Summary by CodeRabbit

  • Bug Fixes

    • Comparison provenance now remains consistent across rewritten history when tracked input content is unchanged.
    • Content changes are detected reliably and require a new comparison baseline.
    • Baseline validation now verifies source revisions and SHA-256 input digests.
  • Documentation

    • Updated comparison records to the latest tested workspace revision.
    • Updated comparison baseline metadata and validation requirements to schema version 4.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 43d1b7a2-8707-404a-8f40-7f02a1bb43ac

📥 Commits

Reviewing files that changed from the base of the PR and between 35832f7 and c9cc6c6.

📒 Files selected for processing (9)
  • API-FRICTION.md
  • benchmarks/comparison/bundle-baseline.json
  • docs/comparison.md
  • packages/charts-core/docs/comparison.md
  • scripts/compare-chart-libraries.mjs
  • scripts/comparison-source-revision.mjs
  • scripts/comparison-source-revision.test.mjs
  • scripts/docs-contract.mjs
  • scripts/docs-contract.test.mjs

📝 Walkthrough

Walkthrough

Comparison provenance now uses SHA-256 digests of tracked inputs as the equality boundary. Baselines use schema version 4 and retain source revisions. Tests cover history rewrites, content changes, malformed metadata, and missing digests.

Changes

Comparison provenance

Layer / File(s) Summary
Input digest calculation and provenance checks
scripts/comparison-source-revision.mjs, scripts/comparison-source-revision.test.mjs
The comparison inputs are recursively collected and hashed with normalized paths, byte lengths, and contents. Provenance checks validate the recorded SHA-256 digest. Tests cover rewritten history and changed input content.
Schema-4 baseline generation and validation
scripts/compare-chart-libraries.mjs, scripts/docs-contract.mjs, scripts/docs-contract.test.mjs
Baseline generation records the input digest and uses schema version 4. Validation requires a correctly formatted TanStack workspace digest and passes it to provenance checks.
Baseline metadata and revision documentation
benchmarks/comparison/bundle-baseline.json, docs/comparison.md, packages/charts-core/docs/comparison.md, API-FRICTION.md
The checked-in baseline records schema-4 metadata and the TanStack input digest. Comparison documentation and release evidence record the updated workspace revision and digest-based validation behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ComparisonScript
  participant DigestUtility
  participant BaselineContract
  ComparisonScript->>DigestUtility: Compute TanStack input digest
  DigestUtility-->>ComparisonScript: Return SHA-256 digest
  ComparisonScript->>BaselineContract: Validate schema-4 provenance
  BaselineContract-->>ComparisonScript: Accept baseline or report failure
Loading

Possibly related PRs

  • TanStack/charts#14: Both changes update comparison provenance and validation across the comparison scripts and tests.
  • TanStack/charts#12: Both changes extend comparison baseline provenance metadata and validation.
  • TanStack/charts#5: Both changes modify comparison baseline schema and source revision checks.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making comparison provenance stable across squash merges.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/fix-release-provenance

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c9cc6c6

Command Status Duration Result
nx run charts-workspace:ci-distributed ✅ Succeeded 1m 6s View ↗
nx run charts-workspace:package-check ✅ Succeeded <1s View ↗
nx run charts-workspace:benchmark-check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-09 04:03:25 UTC

@tannerlinsley
tannerlinsley merged commit e1d0734 into main Aug 9, 2026
15 checks passed
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