Symptom
GET /api/v1/security/suggested-bindings → 200 {suggestions:[], synced:{created:0}} and the table is empty on stock, though the permission set and its everyone binding both exist.
Discriminating step: delete that binding row and re-list → synced {created:1} and a PENDING row appears — so the declaration is collected; it is just never surfaced on stock.
Root cause
Located by the run. packages/plugins/plugin-security/src/suggested-audience-bindings.ts syncAudienceBindingSuggestions does if (bound) continue when no row exists yet (~L224), and the "confirmed (observed)" transition only fires for a row already in status pending. But the security plugin auto-binds the app's isDefault set to everyone at boot, before any list call, so stock always takes the continue. This contradicts the module's own docblock. Confirmed present on origin/main (if (bound) continue still at suggested-audience-bindings.ts ~L224).
Reproduction
- Stock boot with an
isDefault permission set that auto-binds to everyone.
GET /api/v1/security/suggested-bindings → empty, synced.created:0.
- Delete the
everyone binding row and re-list → a PENDING suggestion appears, synced.created:1.
Suggested fix
Surface a PENDING suggestion for a declared isDefault binding even when the boot auto-bind has already satisfied it (or record it before the auto-bind), so the suggestion table reflects the declaration on stock rather than only after an unbind.
Source
Extracted from the QA run #7637 (framework 92f26f7, console 09987b680).
Symptom
GET /api/v1/security/suggested-bindings→ 200{suggestions:[], synced:{created:0}}and the table is empty on stock, though the permission set and itseveryonebinding both exist.Discriminating step: delete that binding row and re-list →
synced {created:1}and a PENDING row appears — so the declaration is collected; it is just never surfaced on stock.Root cause
Located by the run.
packages/plugins/plugin-security/src/suggested-audience-bindings.tssyncAudienceBindingSuggestionsdoesif (bound) continuewhen no row exists yet (~L224), and the "confirmed (observed)" transition only fires for a row already in statuspending. But the security plugin auto-binds the app'sisDefaultset toeveryoneat boot, before any list call, so stock always takes thecontinue. This contradicts the module's own docblock. Confirmed present onorigin/main(if (bound) continuestill at suggested-audience-bindings.ts ~L224).Reproduction
isDefaultpermission set that auto-binds toeveryone.GET /api/v1/security/suggested-bindings→ empty,synced.created:0.everyonebinding row and re-list → a PENDING suggestion appears,synced.created:1.Suggested fix
Surface a PENDING suggestion for a declared
isDefaultbinding even when the boot auto-bind has already satisfied it (or record it before the auto-bind), so the suggestion table reflects the declaration on stock rather than only after an unbind.Source
Extracted from the QA run #7637 (framework 92f26f7, console 09987b680).