Temporal Consolidates CHASM Test Wiring and Go Lint Cleanup
Temporal shipped four commits on June 22 across 141 files, mostly housekeeping on the open source server. The standout change is how CHASM runtime objects reach functional tests. The rest is automated Go lint cleanup across history, matching, metrics, and Nexus code paths.
Temporal is the durable workflow engine behind long running batch jobs and microservice sagas. This week’s commits matter if you run the OSS server from source or watch CHASM based features like Nexus operations and worker deployment versioning. The diff is net negative: 474 insertions and 640 deletions. No new user facing APIs landed.
The most intentional change is removing special CHASM fx graph handling. CHASM is Temporal’s component framework for stateful server features. It owns visibility search attributes, side effect tasks, and registrable components used by Nexus operations, schedulers, and workflow state machines.
Before this commit, functional tests pulled CHASM engine and visibility manager instances out of a parallel Uber fx wiring path in tests/testcore/onebox.go. The onebox test cluster used fx.Populate calls that duplicated production wiring. CHASM test modules were bolted onto every service startup.
The new approach registers a HistoryChasmRuntimeProvider test hook when history starts. The production service/history/fx.go module invokes that hook and passes the live chasm.Engine, chasm.VisibilityManager, and chasm.Registry. Tests consume the runtime through ChasmContext(ctx). The duplicate chasmtests.Module injections were removed from frontend, matching, and worker onebox startups.
tests/chasm_test.go shows the payoff. A CHASM functional test calls ChasmContext once instead of building engine context from three separate host accessors. Cross datacenter CHASM tests received the same simplification.
The stated goal is to delete the separate onebox fx graph and reuse the production graph. That reduces drift between what tests exercise and what clusters run. Fewer test only code paths means CHASM backed delete execution and Nexus dispatch behaviors are more likely to match production wiring.
service/history/workflow/mutable_state_impl.go appeared in two commits and reflects the week’s mix of mechanical and behavioral edits.
The gofix pass replaced a manual deduplication loop over deployment version strings with slices.Contains. Same semantics, less loop noise. Worker deployment versioning stores used build IDs in workflow search attributes. The dedup check runs when mutable state loads or updates deployment metadata.
The staticcheck pass inverted a deployment search attribute guard. The old form used negated equality across three fields. The new form uses direct inequality checks:
if existingDeployment != modifiedDeployment ||
existingVersion != modifiedVersion ||
existingBehavior != modifiedBehavior {
err = ms.saveDeploymentSearchAttributes(...)
}
The clearer intent: save only when deployment, version, or behavior actually changed. No operator action is required.
The staticcheck and gofix batches touched shared infrastructure that every Temporal service depends on.
In common/metrics/config.go, MetricsHandlerFromConfig now passes c.RecordTimerInSeconds instead of the nested c.ClientConfig.RecordTimerInSeconds field. Timer recording config should come from the top level metrics config. Clusters exporting OpenTelemetry or Prometheus histograms should verify timer units after upgrading.
common/metrics/opentelemetry_provider.go switched from direct err == http.ErrServerClosed comparisons to errors.Is, so wrapped shutdown errors classify correctly during graceful stop.
common/namespace/nsregistry/registry.go dropped a blank identifier read when updating the ID to namespace map. service/frontend/nexus_handler.go and service/history/events/cache.go received embed shadowing cleanups. None of these change Nexus RPC contracts or history read paths.
The oss matching lint commit ran golangci lint with testifylint and staticcheck autofix across the open source matching subsystem. Eighteen files changed, including matchers under service/history/workflow/matcher/. tests/workflow_test.go shows testify assertion tightening in core workflow coverage. Some autofixes were reverted when they introduced new lint violations.
Three observations for teams tracking Temporal server source.
First, watch the onebox fx graph consolidation. CHASM test hooks are in place, but the broader goal of a single production aligned dependency graph is not finished.
Second, if you build from main, skim OpenTelemetry metrics config after pulling these changes. The timer seconds field fix affects observability dashboards rather than workflow results.
Third, expect more bulk lint commits across history, matching, Nexus, and worker deployment. Pin to a release tag for a stable server binary; track main if you contribute or test bleeding edge CHASM behavior.