elsa-core/test
Sipke Schoorstra d2d3109024
fix(runtime): enforce MemoryTriggerStore logical uniqueness (#8098)
* fix(runtime): enforce MemoryTriggerStore logical uniqueness

MemoryTriggerStore upserted only by Id, so two records with different Ids
but the same (WorkflowDefinitionId, Hash, ActivityId, TenantId) were
accepted in memory and rejected under EF. Mirror EFCoreTriggerStore:
distinct-by-logical-key, skip already-present keys on ReplaceAsync,
reject Save* collisions, and stamp the current tenant when unset.

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

* fix(runtime): keep FindAsync first-match and use a structural trigger key

FindAsync must return the first matching trigger. SingleOrDefault threw
when a valid filter (for example WorkflowDefinitionId) matched several
distinct logical keys. Restore FirstOrDefault to match ITriggerStore and
EF. Represent the logical key as a record so fields that contain U+001F
cannot collide.

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-13 02:20:28 -07:00
..
component test(workflows-api): pin that a new read-only workflow can be imported (#8038) 2026-09-06 22:51:17 -07:00
integration fix(bpmn): make document PUT If-Match and save a compare-and-swap (#8092) 2026-09-13 01:40:43 -07:00
performance Add output converter support at binding boundaries 2026-08-21 22:22:46 +02:00
TlsSmoke [codex] Fix console log metadata and type resolution (#7542) 2026-05-30 22:52:01 +02:00
unit fix(runtime): enforce MemoryTriggerStore logical uniqueness (#8098) 2026-09-13 02:20:28 -07:00
Directory.Build.props Upgrade projects to target .NET 10, add conditional System.Linq.Async dependencies for compatibility with earlier frameworks, and update project files for consistency across the solution. (#7062) 2025-11-21 20:55:30 +01:00
Directory.Build.targets [codex] Harden initial security remediation slice (#7495) 2026-05-22 00:45:47 +02:00