Skip to content

Preserve caller path filters in asset-scoped rules queries - #3488

Merged
wborn merged 3 commits into
mainfrom
bugfix/assets-path-filter-preservation
Oct 28, 2026
Merged

wborn merged 3 commits into
mainfrom
bugfix/assets-path-filter-preservation

Conversation

@ebariaux

@ebariaux ebariaux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asset-scoped rules currently replace caller-supplied path filters with the engine's asset path. A query for a descendant subtree can therefore return the engine's entire subtree, and an explicitly empty path selection can return assets.

Preserve the caller's path alternatives and apply the engine subtree as a separate required condition in the storage query, before ordering and pagination. Results must satisfy both the caller's filters and the engine's realm/subtree restrictions. Empty path arrays continue to return no assets, and recursive queries remain constrained to the engine subtree.

Fixes #3479. Related to #2675.

Compatibility and integration

Rules that supply path filters may now return fewer assets because those filters are respected. Rules without a path filter retain their existing scope. No query schema changes are introduced.

Caller-query isolation is handled separately in #3481. When combining the changes, its facade unit-test stubs and path expectations need to reflect the separate required-path storage argument.

The new storage overload documents its filtering behavior and caller authorization responsibility.

@ebariaux ebariaux added the Bug Error or issue in the system label Oct 26, 2026
@ebariaux ebariaux self-assigned this Oct 26, 2026
@ebariaux ebariaux added the Breaking Change Indicates that a PR includes a breaking change label Oct 26, 2026
@ebariaux
ebariaux requested a review from a team October 26, 2026 09:30
@sonarqubecloud

Copy link
Copy Markdown

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wborn
wborn added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit bfda4f3 Oct 28, 2026
24 checks passed
@wborn
wborn deleted the bugfix/assets-path-filter-preservation branch October 28, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Change Indicates that a PR includes a breaking change Bug Error or issue in the system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve caller path filters in asset-scoped rules queries

2 participants