elsa-core/test/integration
Sipke Schoorstra 952dfa05ff
feat(bpmn): project interpreter diagnostics onto the scope's execution log (#8058)
* feat(bpmn): project interpreter diagnostics onto the scope's execution log

Under Option A only bound work carries an activity id, so gateways, events and
flows had no per-element trace in the journal. BpmnScopeHost now projects each
new BpmnExecutionState.Diagnostics entry onto the scope's own execution log
before Prune() runs, keyed by element id, with a persisted high-water mark so
a resumed scope never re-emits one. The scope's own start and completion stay
out, since they are already journaled as the activity's own lifecycle. Event
names and the payload shape are documented as a public compatibility surface
for elsa-studio#1000 to mirror.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(bpmn): project element and flow diagnostics dropped by the FlowId exclusion

The diagnostics exclusion keyed on Kind == TokenEmitted && FlowId is null/empty
also dropped an error or cancel boundary's own token emission, since a
boundary fires without an inbound flow. Narrow the rule to skip only
diagnostics that name neither an element nor a flow -- the scope's own
terminal Completed summary -- so every diagnostic keyed on an element or a
flow, including a start event's and a boundary's, is projected.

Also make DiagnosticSequence resilient: TryParse instead of Parse, logging a
warning and skipping projection for an id that doesn't match diag:N rather
than faulting the evaluation. Add a reflection-based test that keeps
BpmnDiagnosticEventNames in lockstep with BpmnDiagnosticKind, and record the
diagnostics volume measurement in the wiki.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(bpmn): require exact diag:N ids and seed the diagnostics cursor from prior state

Reject any diagnostic id that is not the exact "diag:" prefix followed by a
non-negative integer, so a malformed id can no longer poison the durable
projection cursor and cause later, genuinely valid, lower-sequence
diagnostics to be skipped forever.

Also seed a missing cursor from the highest valid sequence in the scope's
prior persisted state instead of treating it as zero, so a scope persisted
before diagnostics projection existed does not replay every retained
historical diagnostic as new on its next evaluation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 19:01:06 -07:00
..
Elsa.Activities.IntegrationTests [codex] Fix ForEach completion from nested flowchart (#7702) 2026-06-08 12:04:55 +02:00
Elsa.AI.IntegrationTests chore: apply safe dependency upgrades (#7896) 2026-07-26 21:42:27 +02:00
Elsa.Alterations.IntegrationTests fix(alterations): preserve tenant context for background alteration jobs (#7962) 2026-09-06 20:07:36 -07:00
Elsa.Bpmn.IntegrationTests feat(bpmn): project interpreter diagnostics onto the scope's execution log (#8058) 2026-09-11 19:01:06 -07:00
Elsa.Bpmn.Interchange.IntegrationTests feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Elsa.Common.IntegrationTests Add unit and integration tests for DownloadHttpFile activity (#7094) 2025-11-24 14:37:06 +01:00
Elsa.Diagnostics.ConsoleLogs.IntegrationTests refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
Elsa.Diagnostics.OpenTelemetry.IntegrationTests feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Elsa.Diagnostics.StructuredLogs.IntegrationTests [codex] Add live server log streaming diagnostics (#7438) 2026-05-11 00:08:52 +02:00
Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite.IntegrationTests Fix SQLite structured log shell lifecycle (#7461) 2026-05-18 01:04:04 +02:00
Elsa.Dsl.ElsaScript.IntegrationTests Adopt the Jint 4.15 host-integration surface: lazy type globals, enum names, and register-what-is-referenced (#7895) 2026-08-17 01:44:03 +02:00
Elsa.ExternalAuthentication.IntegrationTests fix(external-authentication): scope role-deletion impact to the role's tenant (#8036) 2026-09-06 22:34:44 -07:00
Elsa.Hosts.SmokeTests test(modular-host): add opt-in role management fixture 2026-09-06 04:25:09 +02:00
Elsa.Http.IntegrationTests Improves HTTP context loss error handling (#7187) 2026-01-12 16:51:30 +01:00
Elsa.JavaScript.IntegrationTests Adopt the Jint 4.15 host-integration surface: lazy type globals, enum names, and register-what-is-referenced (#7895) 2026-08-17 01:44:03 +02:00
Elsa.Resilience.IntegrationTests [codex] Secure Resilience simulate response endpoint (#7505) 2026-05-22 15:27:13 +02:00
Elsa.Workflows.IntegrationTests fix: preserve single latest draft when saving a new identity (#7918) 2026-09-08 01:03:30 +02:00
Directory.Build.props Add coverage enforcement for test projects (#6950) 2025-10-07 19:59:53 +02:00