Commit graph

3 commits

Author SHA1 Message Date
Sipke Schoorstra e4478af2be
Fix Alterations ownership parity and MySQL retry (#8133)
Closes #8125
2026-09-14 02:51:34 +02:00
Sipke Schoorstra 54209e24c2
fix(alterations): atomic EF tenant ownership on Save/SaveMany (#8128)
Closes #8125.

Alterations-local CAS via ExecuteUpdate+INSERT with ambient ownership gate,
same-tenant race retry, multi-TFM setters, persistence compatibility ctors.
2026-09-13 23:38:40 +00:00
Sipke Schoorstra 373f99d163
fix(alterations): honor tenant isolation in Memory alteration stores (#8106)
* fix(alterations): honor tenant isolation in Memory alteration stores

Stamp ambient tenant on Memory plan/job saves and filter find/count/list
with TenantVisibility so default Alterations persistence matches EF
SetTenantIdFilter / ApplyTenantId. Locks Save under MemoryStore.Sync.

Fixes #8093

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(alterations): refuse Memory Save when Id belongs to another tenant

Fail closed on Save/SaveMany if the ID already exists and is not visible
to the ambient tenant, matching TriggerStore collision style. Visible
same-tenant upsert is unchanged.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(alterations): refuse named-tenant overwrite of agnostic Memory rows

* is visible to every tenant, so EnsureIdAvailable now allows replacing
a * plan/job only when the ambient tenant is also *. Named-tenant Save
and SaveMany fail closed and leave the shared row in place.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-13 14:04:46 +02:00