Skip to content

fix(scopes): namespace data-update entry topics for scoped clients - #949

Open
BetterAndBetterII wants to merge 1 commit into
permitio:masterfrom
BetterAndBetterII:fix/scoped-data-update-topics
Open

BetterAndBetterII wants to merge 1 commit into
permitio:masterfrom
BetterAndBetterII:fix/scoped-data-update-topics

Conversation

@BetterAndBetterII

Copy link
Copy Markdown

POST /scopes/{scope_id}/data/update rewrote each entry's topics as data:{topic} and published through ScopedServerSideTopicPublisher, which prefixes only the pub/sub channel. Scoped clients subscribe to {scope_id}:data:{topic} and then skip any entry whose topics are disjoint from that set, so the update was delivered and then dropped.

Prefix entry topics as {scope_id}:data:{topic} and publish through ServerSideTopicPublisher so the channel matches the payload and is not double-prefixed.

Fixes #920

POST /scopes/{scope_id}/data/update rewrote entry topics as data:{topic}
and published through ScopedServerSideTopicPublisher, which prefixes
only the channel. Scoped clients filter on {scope_id}:data:{topic}, so
every entry was skipped. Prefix the payload the same way and publish
on the already-scoped topics so the channel is not double-prefixed.
Copilot AI lite review requested due to automatic review settings August 26, 2026 23:24
@netlify

netlify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for opal-docs canceled.

Name Link
🔨 Latest commit 94d2e12
🔍 Latest deploy log https://app.netlify.com/projects/opal-docs/deploys/6a8f75bd755e580008e60cb4

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

Scoped POST /scopes/{scope_id}/data/update never reaches the scoped agent (entry topics not scope-namespaced)

2 participants