Skip to content

Add JobSpecReporter service for OCR2 job spec telemetry via Beholder#22123

Draft
thomjg wants to merge 14 commits intodevelopfrom
feat/add-jobspecreporter-20260420
Draft

Add JobSpecReporter service for OCR2 job spec telemetry via Beholder#22123
thomjg wants to merge 14 commits intodevelopfrom
feat/add-jobspecreporter-20260420

Conversation

@thomjg
Copy link
Copy Markdown

@thomjg thomjg commented Apr 21, 2026

Relevant ticket: DF-24042

Summary

Adds a new JobSpecReporter service that emits full job-spec telemetry via Beholder for active OCR2 jobs. This gives internal teams visibility into running job configurations.

What's added

Proto schema (core/services/nodestatusreporter/jobspec/events/)

  • job_spec.proto with JobSpecEvent, OCR2OracleSpecInfo, OCR2EVMRelayConfig, and OCR2MedianPluginConfig messages. All 21 fields of OCR2OracleSpec are covered. Raw JSON passthroughs (relay_config_json, plugin_config_json, onchain_signing_strategy_json) are included alongside typed sub-messages to ensure forward compatibility.
  • Mirrors the existing bridgestatus/events/ layout (emit.go, generate.go, types.go).

JobSpecReporter service (core/services/nodestatusreporter/jobspec/)

  • Mirrors BridgeStatusReporter exactly: same services.Engine pattern, HealthReport(), disabled-early-return in start()`.
  • Hourly heartbeat via services.NewTicker emitting a JobSpecEvent for each active job that passes the shouldEmit gate.
  • Immediate create / delete events via a new job.Listener registered with job.Spawner — covers both FMS-driven approvals and manually created jobs.
  • Proposal lifecycle fields (proposed_at, approved_at, accept_latency_seconds) populated from feeds.ORM; silently omitted for manually created jobs.
  • Bridge names extracted from the top-level observationSource DOT DAG only (not sub-pipelines).

job.Spawner listener hook (core/services/job/spawner.go)

  • New Listener interface with OnJobStarted / OnJobStopped.
  • RegisterListener(Listener) added to the Spawner interface.
  • Listeners are called in a panic-safe, non-blocking goroutine after successful CreateJob and after DeleteJob.

feeds.ORM (core/services/feeds/orm.go)

  • Adds GetJobProposalByExternalJobID — a read-only SELECT mirroring GetJobProposalByRemoteUUID.

Config ([JobSpecReporter] TOML section)

  • Enabled — defaults false.
  • PollingInterval — defaults 1h, minimum 1m.
  • EnabledOCR2PluginTypes — allowlist of OCR2 plugin types to emit for; defaults ["median"]. Set to [] to emit for all OCR2 plugin types.
  • EmitNonOCR2Jobs — emit the generic envelope for non-OCR2 jobs; defaults false.

Initial rollout: only ocr2median jobs emit by default. Widening to other job types is a config change, no code change required.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

✅ No conflicts with other open PRs targeting develop

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 21, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_CCIP_EVM2Sui_ZeroReceiver Logs ↗︎
Test_CCIP_EVM2Sui_ZeroReceiver/Message_to_Sui_with_zero_receiver Logs ↗︎

View Full Report ↗︎Docs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to put these in chainlink-protos so they're easily reusable for consumers

@cl-sonarqube-production
Copy link
Copy Markdown

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.

2 participants