Skip to content
Development preview · 2.0.0-SNAPSHOT

Semantic verification

These tests check execution behavior across runtime modes and database stores. For expected behavior, see supported surfaces, node support, and the format specifications.

Differential tests run the same definition through different execution paths and compare the results. Some also calculate an expected trace or token result independently—an oracle—to catch a mistake shared by both implementations.

Compared behavior Execution paths What the tests check
ProcessEngine execution Compiled and interpreted modes Expected output or error for the same validated definition and input. Trigger entries still start a new invocation.
Common TBBPM subset Both ProcessEngine modes and both Durable backends Values, defaults, lexical scopes, loop order, and structured branch merging for a fixed set of replayable, completing cases. This finite set does not cover every supported element across all four paths.
Durable machine Compiled and interpreted programs Requests, saved recovery state, consumed completion records, and final outcomes produced by the tested Turns.
Durable lifecycle and Store The runtime and each first-party database provider Wait, Timer, and Effect handling, stale lease rejection, competing commits, recovery, and delivery under Durable’s own lifecycle rules.

Choose tests with the execution model in mind. A ProcessEngine Wait entry starts a new trigger(...) invocation; a Durable Wait resumes an occurrence already stored in the database. ProcessEngine does not support Durable Timers. A successful ordinary Action tests that call only; persisted Effect dispatch, retries, and recovery from an unknown result need Durable tests.

Run from the repository root with a supported JDK and use the Maven reactor to build required dependencies. Run these commands in a dedicated checkout if other builds are using your working tree. clean removes old reports, including reports from earlier commands for overlapping reactor modules; save each command’s reports before starting the next one. failIfNoSpecifiedTests=false lets prerequisite modules pass without a matching test, so check the target module’s reports afterward to confirm that the selected tests ran. Compare the two ProcessEngine modes and run both generated-graph suites:

Terminal window
./mvnw clean test -pl compileflow-integration-tests -am \
-Dtest=ProcessRuntimeModeDifferentialTest,StructuredGatewayDifferentialTest,StructuredConcurrentGatewayDifferentialTest \
-Dsurefire.failIfNoSpecifiedTests=false

Compare the four execution paths and check Durable programs, codecs, and recovery positions:

Terminal window
./mvnw clean test -pl compileflow-durable/compileflow-durable-runtime -am \
-Dtest=TbbpmProcessDurableDifferentialTest,DurableCompiledInterpretedDifferentialTest,TbbpmDurableConcurrentGatewayTest,DurableSemanticContractTest,DurableValueSerializerTest,DurableKernelJsonCodecTest \
-Dsurefire.failIfNoSpecifiedTests=false

Check definition validation and semantic frontends:

Terminal window
./mvnw clean test -pl compileflow-tbbpm,compileflow-bpmn -am \
-Dtest=TbbpmSemanticFrontendTest,TbbpmStructuredControlFlowContractTest,BpmnSemanticFrontendTest,BpmnSemanticContractTest,StructuredControlFlowAnalyzerTest \
-Dsurefire.failIfNoSpecifiedTests=false

Each command runs only its selected tests. Reports are in the corresponding module’s target/surefire-reports. See the testing guide for other test layers and repository checks, and Durable Store testing for real PostgreSQL/MySQL commands and required races.

Behavior under test Test suites Scope and limits
Model validation and structured control flow TBBPM frontend, TBBPM structured control-flow contract, BPMN frontend, BPMN contracts, structured analyzer Checks the generated semantic plan and rejection of invalid models. Runtime tests verify actual execution.
ProcessEngine mode parity ProcessRuntimeModeDifferentialTest TBBPM/BPMN cases cover expressions, scripts, loop failures, scopes, child mappings, concurrency, trigger entries, output order, and expected failures.
Generated graphs and independent expected results StructuredGatewayDifferentialTest, StructuredConcurrentGatewayDifferentialTest Both ProcessEngine modes generate the same cases from the same seed and compare them with independently calculated traces or token results. Sequential choices use seed 20260808 and 12 graphs per mode, with a generated route for every leaf; mixed exclusive/parallel/inclusive regions use seed 20260809, 8 graphs × 16 routes per mode. Coverage is limited to these bounded TBBPM shapes, excluding arbitrary graphs and Durable recovery.
Four-path common behavior TbbpmProcessDurableDifferentialTest Both ProcessEngine modes and both Durable backends check explicit expected outputs for sequence, embedded scope, sequential/nested loops, ordered aggregation, omitted versus null defaults, and structured branch merges. It does not run a real Store.
Durable Turn agreement DurableCompiledInterpretedDifferentialTest Compares Wait/Timer/Effect requests, consumption of completion records, pending positions in concurrent branches (frontiers), and recovered execution state. Completion records are simulated; external delivery and database atomicity require separate tests.
Durable concurrent recovery TbbpmDurableConcurrentGatewayTest Checks independent Wait completion, deterministic merging, conflicting writes, nested branches, persisted frontier queues, and state encoding/decoding.
Recovery positions and persisted data DurableSemanticContractTest, DurableValueSerializerTest, DurableKernelJsonCodecTest Checks that plans and recovery positions remain stable without depending on generated-program identity; verifies typed values and framework encoding/decoding.
Runtime resources and lifecycle DefaultDurableProcessEngineTest, DurableWorkerCoordinatorTest, DurableEffectWorkerTest Checks runtime decisions, whether workers still hold execution leases, lease renewal, and Effect results. Test doubles isolate these rules; the next row tests real database races.
Database transactions and provider differences DurableStoreContract, PostgreSQL provider tests, MySQL provider tests Uses real databases for transactions, claims, stale lease rejection, Wait/Timer/Effect transitions, Outbox, retention, and races. Provider-specific regressions and schema checks supplement the shared suite.
Process crash and Outbox ACK loss LocalPostgresDurableOutboxAckLossTest, LocalPostgresDurableBpmnCrashMatrixTest Checks PostgreSQL process crashes and recovery. MySQL, failover, and PITR require their own verification. External deduplication and idempotency must be verified against the application and its actual adapters; the Store contract does not guarantee exactly-once effects.
Application integration and recovery Durable PostgreSQL example Uses PostgreSQL to test approval after engine restart, a persisted Timer, and an idempotent publication retry with the original Effect ID.

Shared frontend or translation code can contain a bug that makes both backends agree. Cross-check with explicit expected values, independent graph calculations, invalid inputs, and real Store tests. Generated-graph tests currently cover ProcessEngine only. The four-path cases have not established Durable generated-graph coverage or full cross-format equivalence.

The first-party Testcontainers contract classes set disabledWithoutDocker=true. Without Docker, Maven can succeed while skipping those classes. Record the container suite as not run; real local-database tests can establish separate database coverage but do not replace a required container suite for release qualification. Local-database suites require an explicitly configured disposable database. Follow the Store testing guide’s warnings about clearing data.

Durable CI selects the database/JDK matrix and suites. PostgreSQL jobs run explicit local-database tests; the MySQL job requires container contract tests. verify_durable_release_evidence.py defines required testcases and skip rules, and its suite command checks each job’s reports. Determine pass or failure from the actual reports. H2, an in-memory Store, and tests of SQL shape alone cannot replace real database tests.

Keep the following together for a verification run:

  1. Tested source: the commit ID and, for uncommitted changes, the actual patch or content manifest.
  2. The complete command, selected tests, fixed seed, JDK, and relevant provider, database, and image versions.
  3. JUnit XML and logs generated by this run, showing the expected suites and testcases as well as failures, errors, skips, and flaky reruns.
  4. Actual coverage and omissions. For example: “Generated-graph tests passed in both ProcessEngine modes; real MySQL tests were not run.” Missing infrastructure means unverified coverage.

Integration CI retains ProcessEngine test reports. Durable CI also records source, environment, and machine-readable results. The test-evidence validator records report hashes and checks required passing cases, counts, skips, and rerun failures. Release-evidence verification combines and checks the predefined release requirements. Use reports produced by the source and environment being verified.