Skip to content

#153 — surface the external-fixture cell diff in the golden diff-showcase - #214

Merged
cmbays merged 3 commits into
mainfrom
renderer-153-showcase-external-fixture-diff
Jun 11, 2026
Merged

cmbays merged 3 commits into
mainfrom
renderer-153-showcase-external-fixture-diff

Conversation

@cmbays

@cmbays cmbays commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Surfaces the cute-dbt#126 external-fixture cell diff in the committed golden examples/diff-showcase-report.html — the machinery (ProjectFileReader, external_fixture_table, reconstruct_external_fixture_diff, merge_external_data_diffs) was fully shipped and test-verified in #126/#154, but the golden showcase never exercised it. Pure fixture surgery: no src/, no template changes.

Closes #153

What changed (AC by AC)

  • External given in playground-current.json — test_mart_date_state_grid_cross_joins_months_and_states' ref('stg_synthea__patients') given (ordinal 1) converted from inline csv rows to "rows":null,"format":"csv","fixture":"tests/fixtures/mart_date_state_grid_patients.csv" (the fusion resolved-path wire shape), spliced byte-style-faithfully into the minified dbt-core JSON. Applied identically to playground-baseline.json so the conversion itself never reads as a baseline-vs-current change — the playground golden's curated changed-set story is untouched. The test is already in showcase scope (its declaring _analytics__models.yml is in the patch's file set; the model is checksum-modified in the playground pair) — no scope surgery.
  • Synthetic CSV committed — tests/fixtures/playground-source/tests/fixtures/mart_date_state_grid_patients.csv (resolved by the ProjectFileReader under --project-root tests/fixtures/playground-source, the dbt <project-root>/tests/fixtures/ convention). Same four fictitious Synthea-style patient rows the given previously inlined. [[fixture]] MANIFEST.toml entry with SHA-256 + synthetic_only = true; four sibling entries' sha256/descriptions refreshed.
  • EDIT hunk in playground-pr-diff.patch — a unified=0 hunk against the csv: Connecticutt→Connecticut (typo fix) + Vermont→ (empty ⇒ typed NULL). An edit, not all-added — the affordance the live dogfood structurally cannot show (renderer: read external unit-test fixture files (csv/sql) for cell-level diffing #126 added its dbt-project fixture as a NEW file).
  • Authoring YAML — _analytics__models.yml given[1] now authored as fixture: mart_date_state_grid_patients (bare-name dbt authoring convention), so the drawer shows the real authored form. The edit sits below the dq-test blocks: existing YAML hunk line numbers (1446/1450/1457) are unshifted.
  • Goldens regenerated (all three matrix rows per the ci.yml recipe): jaffle-shop byte-identical; diff-showcase + playground changed.

Patch-alignment evidence (same-revision contract)

  • The csv hunk's + lines are byte-identical to committed file lines 3–4; block_aligns_with_hunks over the whole-file span (5 lines) holds, hunk_touches_block(1..5, @@ -3,2 +3,2 @@) holds.
  • The YAML conversion removes lines only at 1492–1499 (end-of-file block) — every existing hunk (fct_provider_metrics.sql, _analytics__models.yml @1446/1450/1457) targets earlier lines, so the #64 — cross-join demo fixture from playground c8270a4 + example re-render #205 alignment is preserved (verified by the regen reconstructing the dq cell diff unchanged).

Payload + DOM evidence (regenerated diff-showcase)

Embedded cute-dbt-data payload, cross-join test:

  • given[1].fixture = "tests/fixtures/mart_date_state_grid_patients.csv", rows = loaded file body, table present → the loaded-external grid path.
  • data_diff.given[0].ordinal = 1 with rows: 2 unchanged, 2 modified — Connecticutt→Connecticut (changed: true) and Vermont→ with new.key = {"t":"null"} (a typed NULL — the NULL-aware cell affordance fires).
  • Headless DOM walk (served copy, given section ref('stg_synthea__patients')): provenance chip from tests/fixtures/mart_date_state_grid_patients.csv renders beside format: csv; the cell-diff-table shows TD.cell-changed | Connecticutt→Connecticut and TD.cell-changed | Vermont→NULL (cell-null markup) with the Diff/File toggle.

Structural audit of git diff -- examples/: non-payload HTML byte-identical in both reports; diff-showcase changes exactly 4 payload paths (the converted given's fixture/rows, its authoring_yaml, + the NEW external data_diff); playground changes the same 3 grid paths and gains no data_diff (baseline mode has no hunks). Every changed byte traces to the new external given/diff.

Gates (run directly — lefthook skips in fresh worktrees)

Gate Result
cargo fmt --check pass
cargo clippy --all-targets --locked -- -D warnings pass (exit 0)
cargo nextest run --locked 1091 passed (incl. fixture-manifest + fixture-parse gates)
cargo test --test bdd --locked 113 scenarios / 709 steps passed
cargo test --test headless_zero_egress --locked -- --ignored 2 passed
cargo test --test headless_toggle --locked -- --ignored 38 passed
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked pass
cargo deny check advisories/bans/licenses/sources ok

🤖 Generated with Claude Code


Open in Stage

github-actions Bot and others added 2 commits June 10, 2026 23:16
Surface the cute-dbt#126 external-fixture machinery in the committed
golden fixtures: test_mart_date_state_grid_cross_joins_months_and_states'
ref('stg_synthea__patients') given becomes rows:null + the resolved
fixture: tests/fixtures/mart_date_state_grid_patients.csv path (the
fusion wire shape), applied identically to BOTH playground manifests so
the conversion never reads as a baseline-vs-current change. The row data
moves verbatim into the new committed csv under playground-source; the
authored YAML switches to the bare-name fixture: form (dbt authoring
convention) BELOW the dq-test blocks so the existing patch hunk line
numbers are unshifted. The pr-diff patch gains a unified=0 EDIT hunk
against the csv (Connecticutt->Connecticut typo fix + Vermont->empty
NULL transition), + side byte-aligned to the committed csv per the
same-revision contract. MANIFEST.toml: new [[fixture]] entry + four
sha256/description refreshes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…153)

Byte-gated regen of all three example-report-check matrix rows.
jaffle-shop is byte-identical; the diff-showcase + playground payload
deltas all trace to the converted given (structural audit: non-payload
HTML byte-identical in both; diff-showcase changes exactly 4 payload
paths — given[1].fixture added, given[1].rows array->loaded file body,
authoring_yaml fixture: line, and the NEW data_diff carrying the
external old->new cell diff at ordinal 1 with two modified rows incl. a
typed-NULL transition; playground changes the same 3 grid paths, no
data_diff — baseline mode has no hunks).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@cmbays, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 19 minutes and 57 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6c81fb4-2f24-4f9b-aa3e-8c6693352724

📥 Commits

Reviewing files that changed from the base of the PR and between fb70a27 and 65a9414.

⛔ Files ignored due to path filters (1)
  • tests/fixtures/playground-source/tests/fixtures/mart_date_state_grid_patients.csv is excluded by !**/*.csv
📒 Files selected for processing (7)
  • examples/diff-showcase-report.html
  • examples/playground-report.html
  • tests/fixtures/MANIFEST.toml
  • tests/fixtures/playground-baseline.json
  • tests/fixtures/playground-current.json
  • tests/fixtures/playground-pr-diff.patch
  • tests/fixtures/playground-source/models/marts/analytics/_analytics__models.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch renderer-153-showcase-external-fixture-diff

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 and usage tips.

@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

📄 Rendered report preview

All golden examples regenerated cleanly.

🟡 Golden examples

Committed to examples/ and byte-identity gated — the canonical reports contributors and consumers browse. Stable across PRs.

Report View Download
jaffle-shop-report.html ▶ Open ↗ ⬇ Download
diff-showcase-report.html ▶ Open ↗ ⬇ Download
playground-report.html ▶ Open ↗ ⬇ Download

🐶 Live dogfood preview

This PR doesn't touch dbt-project/, so there's no live dogfood preview.

▶ Open ↗ opens the report in your browser in one click —
published to this repo's GitHub Pages under /pr-214/.
⬇ Download fetches the same self-contained HTML as a workflow
artifact (auth-gated; works fully offline). Either way the report
makes zero external resource requests.

The Pages preview may take ~1 min to update after this comment
posts. On PRs from forks the Open link is unavailable (read-only
token) — use Download.

Alternative: GitHub CLI
# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27321505674 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.html

Posted by report-preview.yml for 65a94145856bdc5c66859758f696a5817c59c340. Affordance only — never blocks merge.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request externalizes the inline CSV row data for the stg_synthea__patients input in the mart_date_state_grid cross-join unit test into a dedicated external fixture file (mart_date_state_grid_patients.csv). It updates the test configuration in _analytics__models.yml to reference this new fixture, adjusts the MANIFEST.toml metadata and SHA-256 hashes accordingly, and appends an edit hunk to the playground-pr-diff.patch file to reflect corrections made to the CSV data. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@cmbays
cmbays merged commit 71fba89 into main Jun 11, 2026
32 checks passed
@cmbays
cmbays deleted the renderer-153-showcase-external-fixture-diff branch June 11, 2026 03:23
github-actions Bot added a commit that referenced this pull request Jun 11, 2026
cmbays pushed a commit that referenced this pull request Jun 11, 2026
…howcase) + golden regen

Conflict resolution by REGENERATION, never manual picking: all three
examples re-rendered from the merged tree with the ci.yml recipe.
Non-payload bytes are byte-identical to origin/main's goldens (the
#213 template/CSS delta carries through untouched); the payload delta
vs origin/main is exclusively the #200 contract fields — manifest_nodes,
ModelPayload.description, the native-scalar overrides, and the three
\u003c= escapes inside new description content. The #214
external-fixture given rides through unchanged (no existing payload
key altered). Double-render byte-identity verified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cmbays pushed a commit that referenced this pull request Jun 11, 2026
- tests/steps/world.rs: kept BOTH accumulators — main's ContextPlan
  (#216) and the explore fields/structs (#100).
- tests/steps/report_generation.rs: the NEW #216 context-report
  invocation (landed on main pre-verb) gains the report verb.
- examples: report goldens taken from main and verified byte-identical
  over the merged tree under the report verb; explore goldens
  REGENERATED over the merged tree (stale twice: #214 changed the
  playground manifest, #216 added payload fields tests.html embeds) +
  double-render byte-identity + leak-grep clean.
- ci.yml/lefthook.yml auto-merged: verb-aware gate + tripwire +
  feature-count 16 intact (no upstream bump — no renumber).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

renderer: surface the external-fixture cell diff in the golden diff-showcase example

1 participant