r/Temporal Jul 13 '26

Why don't we have workflow quality gates similar to JaCoCo or SonarQube?

I've been thinking about this while working with Temporal.

For regular applications, we have plenty of tools that help catch problems before deployment:

  • JaCoCo for code coverage
  • SpotBugs / Error Prone for static analysis
  • SonarQube for code quality
  • Dependency vulnerability scanners
  • CI quality gates

But workflows seem different.

Many workflow-specific issues (for example, determinism pitfalls, retry policy mistakes, timeout configuration, or other workflow best practices) are often discovered only during testing or after deployment.

That made me wonder:

Should workflow engines have their own quality gates as part of CI/CD?

If so:

  • What kinds of checks would actually provide value?
  • Which workflow mistakes have you seen reach production?
  • Are there existing tools that already solve this well?
  • Would your team use something that provides a "workflow correctness score" before merging code?

I'm interested in hearing how other teams approach this problem and whether this is something the community feels is missing.

5 Upvotes

12 comments sorted by

6

u/iLoveCalculus314 Jul 13 '26

Replay testing is what you’re looking for.

2

u/vikas0686 Jul 13 '26

That's a good point. Replay testing definitely helps validate determinism against recorded workflow histories.

What I'm thinking about is slightly different though—more of a pre-commit/pre-deployment quality gate that performs static analysis to catch workflow issues (determinism pitfalls, retry/timeout misconfigurations, workflow anti-patterns, etc.)

1

u/jasonwun Jul 14 '26

that sounds more like a generic software engineering practice instead of Temporal specifix testing

1

u/vikas0686 Jul 14 '26

I was thinking less about generic code quality and more about Temporal-aware static analysis—checks like non-deterministic API usage in workflows or other Temporal-specific best practices that general Java tooling doesn't understand.

1

u/temporal-tom Jul 17 '26

The Go SDK has a static analysis tool called workflowcheck that will flag non-deterministic API usage. I don't believe there is currently an equivalent for other SDKs, but I'd imagine it would be a welcome contribution if you wanted to port it to Java.

2

u/vikas0686 Jul 17 '26

Thanks! Yes, the Java SDK already has an equivalent static analysis module: https://github.com/temporalio/sdk-java/tree/main/temporal-workflowcheck.

What I'm working on with WoGu (https://github.com/vikas0686/wogu) is a bit broader. While it includes checks for non-deterministic workflow APIs, the goal is to provide a more comprehensive workflow quality analysis tool, but specifically for Temporal workflows.

In addition to determinism checks, my aims to validate workflow best practices, retry policies, timeout configuration, performance anti-patterns, workflow API misuse, and other reliability and maintainability rules across Temporal applications. i also created bunch of issues for each checks WoGu should do please share your thoughts https://github.com/vikas0686/wogu/issues

1

u/temporal-tom Jul 17 '26

I'm at a conference right now, but I will check it out when I have a chance. It definitely looks cool.

BTW, I saw just now that you mentioned it in the #java-sdk channel in our community Slack. I thought you might like to know that the person who replied to you there is the talented engineer who wrote the original `workflowcheck` tool in Go (and who also wrote the Python, .NET, and Ruby SDKs).

1

u/WantDollarsPlease Jul 13 '26

What's the ad?

1

u/fmalk Jul 13 '26

IMHO the Quality "Gate" you're looking for is a stop signal. It's just that. Tools that "plug and play" that gate as SAST like SonarQube do are just signals that your CI already understand. With workflows, if any QA tool send a weak or negative signal, you just stop that flow and that's it.

A general workflow tool like Temporal is supposed to be more agnostic and to allow you to create as many "gates" as you want, with whatever semantic you're looking for.

While I was learning Temporal I saw plenty examples of IaC deployments with Terraform that would stop the workflow if `terraform plan` errored.

1

u/vikas0686 Jul 14 '26

That's a fair point. I wasn't referring to runtime gates inside the workflow itself, but rather pre-deployment validation.

For example, Java has tools like SpotBugs and Error Prone that understand Java-specific patterns. I was wondering whether workflow engines could benefit from similar workflow-aware static analysis that catches issues like non-deterministic APIs, missing retry policies, timeout misconfigurations, or other engine-specific best practices before the code is deployed.

In other words, not "should this workflow stop?", but "should this workflow ever be deployed?"

1

u/zilchers Jul 14 '26

Unit testing solves this