temporalio/temporal · error

registrable component validation error: CHASM search attribu

Error message

registrable component validation error: CHASM search attribute alias %q is a reserved search attribute

What it means

This panic comes from the CHASM component registration option WithSearchAttributes: the alias given to a custom search attribute collides with a name that Temporal reserves for platform-defined search attributes. Reserved names are rejected because they would be ambiguous or would shadow built-in columns used by visibility queries. It fires at registration time (process startup) as an intentional fail-fast panic, not a runtime error.

Source

Thrown at chasm/registrable_component.go:140

				if !sadefs.IsChasmOverridableSystem(field) {
					//nolint:forbidigo
					panic(fmt.Sprintf("registrable component validation error: system search attribute %q cannot be overridden by a CHASM component", field))
				}
				if _, ok := rc.searchAttributesMapper.overriddenSystemFields[field]; ok {
					//nolint:forbidigo
					panic(fmt.Sprintf("registrable component validation error: system search attribute override %q is already defined", field))
				}
				rc.searchAttributesMapper.overriddenSystemFields[field] = valueType
				continue
			}

			if sadefs.IsChasmSystem(alias) {
				//nolint:forbidigo
				panic(fmt.Sprintf("registrable component validation error: CHASM search attribute alias %q is a CHASM system search attribute", alias))
			}
			if !sadefs.IsSystem(alias) && sadefs.IsReserved(alias) {
				//nolint:forbidigo
				panic(fmt.Sprintf("registrable component validation error: CHASM search attribute alias %q is a reserved search attribute", alias))
			}

			if _, ok := rc.searchAttributesMapper.systemAliasToField[alias]; ok {
				//nolint:forbidigo
				panic(fmt.Sprintf("registrable component validation error: CHASM search attribute alias %q is already defined as a system search attribute alias", alias))
			}
			if _, ok := rc.searchAttributesMapper.aliasToField[alias]; ok {
				//nolint:forbidigo
				panic(fmt.Sprintf("registrable component validation error: search attribute alias %q is already defined", alias))
			}
			if _, ok := rc.searchAttributesMapper.fieldToAlias[field]; ok {
				//nolint:forbidigo
				panic(fmt.Sprintf("registrable component validation error: search attribute field %q is already defined", field))
			}

			rc.searchAttributesMapper.aliasToField[alias] = field
			rc.searchAttributesMapper.fieldToAlias[field] = alias
			rc.searchAttributesMapper.saTypeMap[field] = valueType

View on GitHub (pinned to bde624efd1)

Solutions

  1. Rename the component search attribute alias to a non-reserved, namespaced name (e.g. prefix with your component name)
  2. Check sadefs.IsReserved / the Temporal search attribute docs for the reserved list before choosing aliases
  3. If you truly need the reserved name semantics, use the built-in system attribute directly instead of redefining it in CHASM
  4. If the panic appeared after a Temporal upgrade, find which alias newly became reserved and rename it

Example fix

// before
chasm.WithSearchAttributes(chasm.NewSearchAttribute("StartTime", "start_time", enumspb.INDEXED_VALUE_TYPE_DATETIME))
// after
chasm.WithSearchAttributes(chasm.NewSearchAttribute("MyComponentStartTime", "my_component_start_time", enumspb.INDEXED_VALUE_TYPE_DATETIME))
Defensive patterns

Strategy: validation

Validate before calling

// at package init, before registering
if !sadefs.IsSystem(alias) && sadefs.IsReserved(alias) {
    return fmt.Errorf("alias %q is reserved; choose another", alias)
}

Prevention

When it happens

Trigger: Calling chasm.WithSearchAttributes on a RegistrableComponent with a SearchAttribute whose alias passes !sadefs.IsSystem(alias) && sadefs.IsReserved(alias) — i.e. a user-defined alias equal to a reserved (but not core-system) search attribute name such as 'StartTime' or another reserved keyword.

Common situations: A developer names a custom attribute something like 'ExecutionStatus' or a formerly-custom alias that a newer Temporal SDK promoted to reserved status; copy-pasting attribute definitions from non-CHASM workflow code that used reserved names; upgrading Temporal where the reserved list grew and a previously accepted alias now panics at startup.

Related errors


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/502075daffa4657b. Report an issue: GitHub.