elsa-core/test
Sipke Schoorstra 6503c0cb92
fix(workflows): resolve GetInput serializer options per host (#8158)
* fix(workflows): resolve GetInput serializer options per host

Remove the process-wide JsonSerializerOptions cache from ExpressionExecutionContextExtensions so DI converters registered on a later host remain visible after the first GetInput. Share CloneForValueConversion with WorkflowInstanceStorageDriver reads.

Closes #8131

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

* fix(workflows): match storage write/read JSON reference semantics

Use the same cloned payload-serializer options for WorkflowInstanceStorageDriver Write and Read. Forcing ReferenceHandler.Preserve on read only treated ordinary $ref properties as metadata and broke restore.

Closes the P1 on #8158.

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

* fix(workflows): serialize storage values by runtime type

SerializeToNode(object, options) used the compile-time object converter, so PolymorphicObjectConverter wrapped arrays as _items metadata. Write now uses the runtime type with the same cloned host options as Read.

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

* test(workflows): assert stored array conversion is non-null

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

* fix(workflows): restore _type for object-typed storage values

Serialize object-typed variables through the polymorphic converter so aliased CLR types keep a _type discriminator. Typed arrays still serialize by runtime type so they stay JSON arrays.

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

* fix(workflows): deserialize object variables through polymorphic options

ConvertTo(object) returns the stored JsonObject because it is assignable to object. Read object-typed variables with the payload serializer so _type restores the concrete CLR type.

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 19:07:24 +02:00
..
component test(runtime): lock InternalState and activity-execution store conformance (#8153) 2026-09-14 15:10:18 +02:00
integration test(runtime): lock InternalState and activity-execution store conformance (#8153) 2026-09-14 15:10:18 +02: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(workflows): resolve GetInput serializer options per host (#8158) 2026-09-14 19:07:24 +02: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