Skip to content

Require type label on custmsg BaseMessage emissions#2222

Draft
pkcll wants to merge 1 commit into
mainfrom
custmsg-type-label-for-basemessage-emissions
Draft

Require type label on custmsg BaseMessage emissions#2222
pkcll wants to merge 1 commit into
mainfrom
custmsg-type-label-for-basemessage-emissions

Conversation

@pkcll

@pkcll pkcll commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add LabelKeyType ("type") and WithType / WithLabelsAndType helpers on the custmsg labeler API
  • Emit now returns an error when the type label is missing from BaseMessage labels
  • Update WASM host emit path and test mocks to set a type label

Downstream consumers can distinguish NodeConfig, Heartbeat, workflow logs, and other BaseMessage emissions without parsing payload content.

Test plan

  • go test ./pkg/custmsg/...
  • go test ./pkg/workflows/wasm/host/...

Made with Cursor

Add WithType and WithLabelsAndType to MessageEmitter, validate LabelKeyType
at emit time, and update wasm host mocks for the new interface methods.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (2)

pkg/custmsg.MessageEmitter (2)
  • WithLabelsAndType — ➕ Added

  • WithType — ➕ Added

✅ Compatible Changes (3)

pkg/custmsg (1)
  • LabelKeyType — ➕ Added
pkg/custmsg.Labeler (2)
  • WithLabelsAndType — ➕ Added

  • WithType — ➕ Added


📄 View full apidiff report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant