You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e3143ba
Browse filesBrowse the repository at this point in the historyBrowse files
fix(policies): specificity-aware default position on the server
The UI computed a specificity-aware position for new rules client-side,
but the server defaulted a positionless create to the TOP of the owner's
list. When the client's policy list was stale (e.g. the optimistic atom
hadn't refreshed between two quick writes), the UI sent no usable
position and the top-of-list default let a broad category rule shadow a
narrower leaf rule written moments earlier — surfaced by the policies-ui
scenario failing against the production selfhost image.
Move the specificity placement into the sdk (positionForNewPattern) and
make it the server-side default for create; the React hook now reuses
the same helper so the optimistic order matches what the server commits.
Policy create now defaults a new rule's position below any more-specific existing rule on the server, so a broad rule written without an explicit position (stale UI, API, agent tool) cannot shadow an existing narrower rule.
0 commit comments