Skip to content

fix: write score and badge to manifest meta for seeds and macros - #222

Merged
jochemvandooren merged 1 commit into
PicnicSupermarket:masterfrom
winklemad:fix/manifest-seed-macro-score
Aug 26, 2026
Merged

jochemvandooren merged 1 commit into
PicnicSupermarket:masterfrom
winklemad:fix/manifest-seed-macro-score

Conversation

@winklemad

Copy link
Copy Markdown
Contributor

Closes #221

ManifestFormatter.project_evaluated wrote meta.score / meta.badge for models, snapshots, sources and exposures, but had no branch for seeds or macros — so dbt-score lint --format manifest emitted a manifest where seed and macro nodes carried no score, even though they are scored like everything else and their results sit in _evaluable_scores.

Seeds live under manifest["nodes"] alongside models/snapshots, so this adds seed to that branch; macros live under the separate manifest["macros"] key, so they get their own branch. The human_readable and json formatters were already correct (they key off the evaluable type generically); this only touches the manifest formatter.

Added a regression test using the existing tests/resources/manifest.json fixture (which already contains seeds and macros): it asserts seed and macro nodes carry meta.score and meta.badge after formatting. It fails on master (empty meta) and passes with this change. Full formatter suite green, ruff and mypy clean.

The manifest formatter wrote the computed score and badge into the meta
of models, snapshots, sources and exposures, but had no branch for seeds
or macros. Both are fully supported evaluables that get scored, so
`dbt-score lint --format manifest` silently dropped their scores.

Add seeds to the nodes branch and a dedicated macros branch so their
nodes carry meta.score and meta.badge like every other evaluable type.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4ceb42e2-be62-45a3-805b-0e541adc58a5

📥 Commits

Reviewing files that changed from the base of the PR and between 8aecd93 and c83e1c9.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/dbt_score/formatters/manifest_formatter.py
  • tests/formatters/test_manifest_formatter.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The manifest formatter now writes meta.score and meta.badge for seed and macro resources. Tests verify the output for different evaluation results, and the changelog documents the change.

Changes

Manifest metadata output

Layer / File(s) Summary
Seed and macro metadata handling
src/dbt_score/formatters/manifest_formatter.py, tests/formatters/test_manifest_formatter.py, CHANGELOG.md
The formatter writes score and badge metadata for seeds under manifest["nodes"] and for macros under manifest["macros"]. Tests verify both resource types. The changelog records the update.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c83e1

This localized change adds manifest score and badge metadata for seed and macro nodes, with regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: writing score and badge metadata for seed and macro resources in manifests.
Description check ✅ Passed The description directly explains the bug, implementation, regression test, and formatter scope.
Linked Issues check ✅ Passed The changes satisfy issue #221 by writing score and badge metadata for both seeds and macros and adding regression coverage.
Out of Scope Changes check ✅ Passed The changelog update and regression test support the manifest formatter fix, with no unrelated code changes identified.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jochemvandooren jochemvandooren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks for picking it up! Code look good 👌

@winklemad

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review, @jochemvandooren! Glad it looks good.

@jochemvandooren
jochemvandooren merged commit a10a185 into PicnicSupermarket:master Aug 26, 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

Development

Successfully merging this pull request may close these issues.

Manifest formatter drops meta.score/meta.badge for seeds and macros

2 participants