feat(scorecard): add catalog module to validate fields (starting with a required attributes provider) - #4258
Conversation
Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4258 +/- ##
==========================================
+ Coverage 59.09% 59.17% +0.08%
==========================================
Files 2458 2461 +3
Lines 98057 98283 +226
Branches 27341 27428 +87
==========================================
+ Hits 57945 58159 +214
- Misses 39830 39842 +12
Partials 282 282
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
/fs-fix
|
|
🤖 Finished Fix · ✅ Success · Started 10:07 PM UTC · Completed 10:20 PM UTC Commit: |
- Change package version from 1.0.0 to 0.0.0 for initial release - Add patch changeset to release as 0.0.1 - Generate API report via yarn build:api-reports:only Addresses review feedback on #4258
🔧 Fix agent — iteration 1 (human-triggered)Addressed all 3 human-requested changes: set package version to 0.0.0, added patch changeset, and generated API report. Fixed (3):
Tests: passed Updated by fullsend fix agent |
|
/fs-fix
|
|
🤖 Finished Fix · ✅ Success · Started 10:28 PM UTC · Completed 10:34 PM UTC Commit: |
🔧 Fix agent — iteration 2 (human-triggered)Added README.md to the catalog-metadata module with feature explanation and 6 app-config configuration examples as requested. Fixed (1):
Tests: passed Updated by fullsend fix agent |
Add comprehensive README documenting the catalog-metadata backend module with feature overview, installation instructions, and six app-config configuration examples covering required attribute checks, value whitelist checks, multi-kind entity filters, options-level status mapping defaults, per-check overrides, and full configuration with schedule and per-metric thresholds. Addresses review feedback on #4258
|
/fs-fix align code style, run |
|
🤖 Finished Fix · ✅ Success · Started 4:57 AM UTC · Completed 5:10 AM UTC Commit: |
Run `yarn prettier:fix` to align README markdown table columns per project code style conventions. Addresses review feedback on #4258
🔧 Fix agent — iteration 3 (human-triggered)Ran Fixed (1):
Tests: passed Updated by fullsend fix agent |
|
/fs-fix Add an example "catalog-metadata-scorecard-without-title" without metadata title and "catalog-metadata-scorecard-with-title" with title to the catalog entity. Both should have an annotation |
|
🤖 Fix · Commit: |
|
/fs-fix
|
|
🤖 Finished Fix · ✅ Success · Started 6:01 AM UTC · Completed 6:21 AM UTC Commit: |
🔧 Fix agent — iteration 4 (human-triggered)Addressed all 5 human review findings: renamed module folder and package from catalog-metadata to catalog, renamed classes to CatalogRequiredAttributesConfig and CatalogRequiredAttributesMetricProvider, updated all provider/datasource/metric IDs to use catalog prefix, updated all README and config.d.ts references, and added example entities with catalog module configuration. All 53 tests pass. Fixed (5):
Tests: passed Updated by fullsend fix agent |
- Rename folder from scorecard-backend-module-catalog-metadata to scorecard-backend-module-catalog - Rename CatalogMetadataConfig to CatalogRequiredAttributesConfig - Rename CatalogMetadataMetricProvider to CatalogRequiredAttributesMetricProvider - Update getProviderDatasourceId to 'catalog' and getProviderId to 'catalog.requiredAttributes' - Update metric ID prefix from catalogMetadata to catalog - Update config path from catalogMetadata to catalog - Update all README examples and config.d.ts references - Add example entities catalog-scorecard-without-title and catalog-metadata-scorecard-with-title with scorecard.example annotation - Add catalog module configuration to app-config.yaml Addresses review feedback on #4258
|
/fs-fix rebase and resolve conflicts |
|
🤖 Finished Fix · ✅ Success · Started 6:36 AM UTC · Completed 6:50 AM UTC Commit: |
Add new scorecard backend module that checks catalog entity metadata attributes against configurable rules. The CatalogMetadataMetricProvider evaluates entity fields (e.g., metadata.title, spec.lifecycle) and maps field states to configurable status strings via a three-tier status mapping merge (check-level > options-level > hardcoded defaults). The module supports: - Required attribute checks (field exists, non-empty) - Value whitelist checks (field must be one of accepted values) - Per-check entity filters (e.g., only Components, only Templates) - Configurable status mapping for field states (exists, empty, emptyString, emptyArray, missed) and specific values - Automatic threshold rule generation from status mappings New files: - CatalogMetadataConfig.ts: config parsing and status mapping merge - CatalogMetadataMetricProvider.ts: MetricProvider<'number'> impl - CatalogMetadataMetricProvider.test.ts: 53 tests covering config parsing, field resolution, status evaluation, filter matching, threshold generation, and calculateMetrics scenarios Closes #4256
- Change package version from 1.0.0 to 0.0.0 for initial release - Add patch changeset to release as 0.0.1 - Generate API report via yarn build:api-reports:only Addresses review feedback on #4258
Add comprehensive README documenting the catalog-metadata backend module with feature overview, installation instructions, and six app-config configuration examples covering required attribute checks, value whitelist checks, multi-kind entity filters, options-level status mapping defaults, per-check overrides, and full configuration with schedule and per-metric thresholds. Addresses review feedback on #4258
Run `yarn prettier:fix` to align README markdown table columns per project code style conventions. Addresses review feedback on #4258
- Rename folder from scorecard-backend-module-catalog-metadata to scorecard-backend-module-catalog - Rename CatalogMetadataConfig to CatalogRequiredAttributesConfig - Rename CatalogMetadataMetricProvider to CatalogRequiredAttributesMetricProvider - Update getProviderDatasourceId to 'catalog' and getProviderId to 'catalog.requiredAttributes' - Update metric ID prefix from catalogMetadata to catalog - Update config path from catalogMetadata to catalog - Update all README examples and config.d.ts references - Add example entities catalog-scorecard-without-title and catalog-metadata-scorecard-with-title with scorecard.example annotation - Add catalog module configuration to app-config.yaml Addresses review feedback on #4258
🔧 Fix agent — iteration 5 (human-triggered)Rebased onto main, resolved conflicts in yarn.lock and all-scorecards-location.yaml. Regenerated yarn.lock via yarn install. Tests pass (53/53), build succeeds. Fixed (1):
Tests: passed Updated by fullsend fix agent |
0493669 to
cb86a43
Compare
|
christoph-jerolimov
left a comment
There was a problem hiding this comment.
Lgtm! Will create follow ups for e2e tests.



Add new scorecard backend module that checks catalog entity metadata attributes against configurable rules. The CatalogMetadataMetricProvider evaluates entity fields (e.g., metadata.title, spec.lifecycle) and maps field states to configurable status strings via a three-tier status mapping merge (check-level > options-level > hardcoded defaults).
The module supports:
emptyString, emptyArray, missed) and specific values
New files:
parsing, field resolution, status evaluation, filter matching,
threshold generation, and calculateMetrics scenarios
Closes #4256
Post-script verification
agent/4256-catalog-metadata-module)9ff73957b1e59ceca89032ba15af079e17c47087..HEAD)