Skip to content

fix(language): forbid duplicate @default applications#2697

Open
sanny-io wants to merge 1 commit into
zenstackhq:devfrom
sanny-io:fix/default-duplicates
Open

fix(language): forbid duplicate @default applications#2697
sanny-io wants to merge 1 commit into
zenstackhq:devfrom
sanny-io:fix/default-duplicates

Conversation

@sanny-io
Copy link
Copy Markdown
Contributor

@sanny-io sanny-io commented Jun 3, 2026

Summary by CodeRabbit

  • Attributes
    • The @default attribute is now restricted to single application per declaration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 70bdb004-71cd-478c-b91d-f181524882c9

📥 Commits

Reviewing files that changed from the base of the PR and between f41a1f6 and c696481.

📒 Files selected for processing (1)
  • packages/language/res/stdlib.zmodel

📝 Walkthrough

Walkthrough

A single-line change to stdlib.zmodel adds the @@@once marker to the @default attribute declaration, restricting it to be applied at most once per declaration rather than potentially multiple times.

Changes

Default Attribute Once Constraint

Layer / File(s) Summary
@default attribute once constraint
packages/language/res/stdlib.zmodel
The @default attribute declaration adds @@@once marker to restrict usage to a single application per target declaration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A single line makes the change so clean,
One @@@once marks where default's been seen,
No more duplicates in declarations day,
Constraints now tighter—hop hip hooray! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding @@@once to @default attribute to prevent duplicate applications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

@sanny-io sanny-io marked this pull request as ready for review June 3, 2026 06:17
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