Skip to content

fix(dwn): reject record-limited roles#1480

Merged
LiranCohen merged 1 commit into
mainfrom
fix/record-limit-role-policy
Jul 25, 2026
Merged

fix(dwn): reject record-limited roles#1480
LiranCohen merged 1 commit into
mainfrom
fix/record-limit-role-policy

Conversation

@LiranCohen

Copy link
Copy Markdown
Contributor

Summary

  • reject $role and $recordLimit on the same protocol path with a typed configuration error
  • keep role authorization consistent with visible membership without adding occupancy queries to every role invocation
  • document the restriction and migration boundary

No shipped protocol definition combines these directives. This takes #1444's explicit greenfield alternative: bounded role membership needs a purpose-built policy rather than allowing hidden records to remain capabilities.

Closes #1444.

Test plan

  • bun test tests/interfaces/protocols-configure.spec.ts
  • bun run lint
  • bunx turbo run build --filter=@enbox/dwn-sdk-js...
  • bunx turbo run build --filter=@enbox/agent...

Migration

Affected definitions must move to a corrected protocol under a new URI, migrating only intended role assignments. Existing definitions and records are not rewritten.

@sonarqubecloud

Copy link
Copy Markdown

@LiranCohen
LiranCohen merged commit 9511e65 into main Jul 25, 2026
30 checks passed
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.

fix(dwn-sdk-js): make record-limit occupancy govern role invocation

1 participant