Commit c73eacd
* fix(security): reconcile audience-binding suggestions per organization (#8617)
The reconciler read and wrote through a module-level `SYSTEM_CTX = { isSystem:
true }` carrying no tenant, so a shared-runtime multi-organization install held
ONE organization-less suggestion row that every tenant read: the first admin to
confirm or dismiss answered for all of them, while the binding their confirm
created existed only in their own organization.
- every read and write in `suggested-audience-bindings.ts` now carries
`{ isSystem: true, tenantId }` — `findAnchorPositions`, `bindingExists`, the
list/confirm/dismiss paths and the reconcile loop alike;
- `reconcileAudienceBindingSuggestions` is the new entry point: one pass per
organization under a walled posture, exactly one organization-less pass under
`single`;
- pre-fix organization-less rows are reaped first. Measured: without the reap
the platform bucket (ADR-0120 D3) shows that row to every tenant and the
per-organization passes create nothing at all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MX1qcBzfwZb5wkRrJTNbhH
* chore(changeset): per-organization audience-binding suggestion reconciler
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MX1qcBzfwZb5wkRrJTNbhH
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent ead96d0 commit c73eacd
5 files changed
Lines changed: 577 additions & 83 deletions
File tree
- .changeset
- packages/plugins/plugin-security/src
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
2546 | 2546 | | |
2547 | 2547 | | |
2548 | 2548 | | |
2549 | | - | |
| 2549 | + | |
2550 | 2550 | | |
2551 | 2551 | | |
2552 | 2552 | | |
2553 | 2553 | | |
2554 | 2554 | | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
2555 | 2561 | | |
2556 | | - | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
2557 | 2568 | | |
2558 | 2569 | | |
2559 | 2570 | | |
| |||
2688 | 2699 | | |
2689 | 2700 | | |
2690 | 2701 | | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
2691 | 2710 | | |
2692 | | - | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
2693 | 2714 | | |
2694 | 2715 | | |
2695 | 2716 | | |
| |||
0 commit comments