Fix deployment metadata filters in view predicates#2986
Conversation
🦋 Changeset detectedLatest commit: b328eb4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
857b3be to
069a11c
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR fixes deployment relationship metadata filtering so deployed-instance metadata replaces model element metadata when present, adds tests for deployment- and element-view exclude predicates covering instance/relationship/endpoint metadata and fallback rules, and updates documentation and skill/eval content with examples and clarifications. ChangesMetadata predicates in deployment views
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/core/src/compute-view/deployment-view/predicates/__test__/exclude-metadata.filter.spec.ts`:
- Around line 1-4: The file exclude-metadata.filter.spec.ts currently has a
copyright header referencing "NVIDIA CORPORATION & AFFILIATES"; confirm whether
that is intentional for this repository and if not, replace the header with the
repository's standard copyright holder text (or the SPDX and year only) so the
top-of-file comment matches project convention; locate the header at the top of
exclude-metadata.filter.spec.ts and update the owner string accordingly.
In `@packages/core/src/compute-view/element-view/exclude-where.spec.ts`:
- Around line 1-4: The file header in exclude-where.spec.ts contains a copyright
line referencing "NVIDIA CORPORATION & AFFILIATES"; update this header to use
the repository's standard copyright holder (or the project's legal owner) so it
matches other files—edit the top-of-file comment block to replace "NVIDIA
CORPORATION & AFFILIATES" with the correct holder (e.g., the likec4 org or the
project's canonical copyright string) and ensure SPDX and year remain correct.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2c67584c-8b78-49f0-8416-f2c4b4adef6d
📒 Files selected for processing (6)
.changeset/fix-deployment-metadata-filters.mdapps/docs/src/content/docs/dsl/Deployment/views.mdxapps/docs/src/content/docs/dsl/Views/predicates.mdxpackages/core/src/compute-view/deployment-view/predicates/__test__/exclude-metadata.filter.spec.tspackages/core/src/compute-view/deployment-view/predicates/utils.tspackages/core/src/compute-view/element-view/exclude-where.spec.ts
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
source.metadata.*andtarget.metadata.*use deployed instance metadata when present, with logical metadata as fallback.excluderules in element and deployment views, including relationship metadata, endpoint metadata, arrays, and missing keys.likec4-dslAI skill/evals so agents explain relationship metadata filters and deployment metadata semantics correctly.Root cause
Deployment model-backed relationship filters resolved endpoint metadata from the logical model element only, so deployment-specific instance metadata was ignored for
source.metadata.*andtarget.metadata.*predicates.Screenshots
View predicates docs
Deployment views docs
Validation
node_modules/.bin/vitest run packages/core/src/compute-view/element-view/exclude-where.spec.ts packages/core/src/compute-view/deployment-view/predicates/__test__/exclude-metadata.filter.spec.ts --no-isolatenode_modules/.bin/vitest run packages/core/src/compute-view/element-view packages/core/src/compute-view/deployment-view --no-isolatenode_modules/.bin/tsc -b packages/core/tsconfig.json --pretty falsenode_modules/.bin/astro checkfromapps/docsnode_modules/.bin/nano-stagednode_modules/.bin/dprint checkfor the changedskills/likec4-dslfilesevals-public.jsonlikec4-dsleval artifacts