Skip to content

Conversation

@jmank88
Copy link
Contributor

@jmank88 jmank88 commented Jan 26, 2026

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset 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.

@jmank88 jmank88 force-pushed the CRE-1707-limits-org-id branch from 438196d to 5747b31 Compare January 26, 2026 23:26
@cl-sonarqube-production
Copy link

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Missing OrgResolver Setup

Affected tests:

  1. Test_workflowRegisteredHandler/success_with_active_workflow_registered (Workflow Run: Core Tests (go_core_tests))
  2. Test_workflowRegisteredHandler (Workflow Run: Core Tests (go_core_tests))

What Broke

These tests fail because the orgResolver field of eventHandler is not properly initialized in the Test_workflowRegisteredHandler setup. This omission leads to nil pointer dereferences when createWorkflowSpec or h.orgResolver.Get attempts to access the uninitialized orgResolver.

Proposed Fixes

Add a mock OrgResolver to the test setup in Test_workflowRegisteredHandler to ensure the eventHandler is fully initialized and prevent nil pointer dereferences.

In handler_test.go:85

 func newMockFetcher(m map[string]mockFetchResp) *mockFetcher {
 	return &mockFetcher{responseMap: m, calledMap: map[string]int{}}
 }
+ 
+ type mockOrgResolver struct {
+ 	orgID string
+ }
+ 
+ func (m *mockOrgResolver) Get(ctx context.Context, owner string) (string, error) {
+ 	return m.orgID, nil
+ }
+ 
+ func (m *mockOrgResolver) Close() error {
+ 	return nil
+ }
+ 
+ func (m *mockOrgResolver) Start(ctx context.Context) error {
+ 	return nil
+ }
+ 
+ func (m *mockOrgResolver) Ready() error {
+ 	return nil
+ }
+ 
+ func (m *mockOrgResolver) HealthReport() map[string]error {
+ 	return nil
+ }
+ 
+ func (m *mockOrgResolver) Name() string {
+ 	return "mockOrgResolver"
+ }

 type mockEngine struct {
 	CloseErr error

In handler_test.go:659

 		if tc.engineFactoryFn != nil {
 			opts = append(opts, WithEngineFactoryFn(tc.engineFactoryFn))
 		}
+ 		mockOrgResolver := &mockOrgResolver{orgID: "test-org-id"}
+ 		opts = append(opts, WithOrgResolver(mockOrgResolver))

 		store := store.NewInMemoryStore(lggr, clockwork.NewFakeClock())
 		registry := capabilities.NewRegistry(lggr)
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix FrKH5NFM to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from FrKH5NFM to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: OCR2 Test Setup

Affected tests:

  1. TestIntegration_OCR2_plugins (Workflow Run: Core Tests (go_core_tests_integration))

What Broke

The OCR2 integration test environment is not providing the orgID that the updated secretsFetcher now expects during application initialization.

Proposed Fixes

Update the OCR2 integration test environment to provide a dummy orgID to the secretsFetcher during application initialization by setting the ResolveOrg function in the chainlink.Config.

In features_ocr2_helper.go:158

 		c.EVM[0].Transactions.ForwardersEnabled = &useForwarder
+ 		c.ResolveOrg = func(ctx context.Context) (string, error) { return "testOrgID", nil }
 	})
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix 8PIWUPNG to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from 8PIWUPNG to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: OCR2 Integration Failure

Affected tests:

  1. TestIntegration_OCR2_plugins/legacy (Workflow Run: Core Tests (go_core_tests_integration))

What Broke

The integration test failed due to the new orgresolver caching and the explicit orgID resolution and propagation within the CRE context in core workflow services.

Proposed Fixes

Configure a dummy CRE linking service URL in the OCR2 integration test setup to ensure the OrgResolver is properly initialized and prevent a nil pointer dereference.

In features_ocr2_helper.go:159

 \t\tc.EVM[0].Transactions.ForwardersEnabled = &useForwarder
+ \t\tc.CRE.Linking.URL = ptr(commonconfig.URL{Scheme: "http", Host: "localhost:8080"})
 \t})
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix RNfZFU8U to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from RNfZFU8U to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Unrelated Failure

Affected failures:

  1. TestIntegration_MercuryV2_Plugin/receives_at_least_one_report_per_feed_from_each_oracle_when_EAs_are_at_100%_reliability (Workflow Run: Core Tests (go_core_tests_integration))
  2. TestIntegration_MercuryV2_Plugin (Workflow Run: Core Tests (go_core_tests_integration))
  3. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_ton_messaging_test.go:Test_CCIPMessaging_TON2EVM
  4. Workflow Run: Integration Tests

What Broke

These failures are primarily caused by incompatibilities or unexpected behaviors introduced by the updated github.com/smartcontractkit/chainlink-common dependency. This update has led to unhandled errors during organization ID resolution, prevented event filter registration causing test timeouts, and introduced incompatibilities with the libocr/ragep2p library, resulting in peer discovery failures and issues with Mercury V2 plugin report generation and processing.

Proposed Fixes

Correct the TestEngine_OrganizationIdLogger test by setting the OrgResolver field directly in EngineConfig instead of ResolveOrg to ensure proper organization ID resolution and prevent test timeouts.

In engine_test.go:299

- 	cfg.ResolveOrg = func(ctx context.Context) (
- 		return mockOrgResolver.Get(ctx, cfg.WorkflowOwner)
- 	}
+ 	cfg.OrgResolver = mockOrgResolver
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix epTkzaco to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from epTkzaco to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Org ID Resolution Failure

Affected failures:

  1. TestScripts/health/multi-chain-loopp (Workflow Run: Core Tests (go_core_tests_integration))
  2. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_token_transfer_test.go:*_LOOPP

What Broke

These failures stem from issues with organization ID resolution within the workflow engine, primarily due to an updated 'chainlink-common' dependency. This can lead to an incorrectly generated OCR3 candidate configuration or the OrgResolver failing to correctly resolve organization IDs during service initialization.

Proposed Fixes

Modify the workflow engine to explicitly fail if an organization ID cannot be resolved during initialization or execution. Additionally, update the TestEngine_OrganizationIdLogger test to correctly assign the mockOrgResolver to the EngineConfig's OrgResolver field.

In engine.go:198

 		orgID, gerr := e.cfg.OrgResolver.Get(ctx, e.cfg.WorkflowOwner)
- 		if gerr != nil {
- 			e.logger().Warnw("Failed to resolve organization ID, continuing without it", "workflowOwner", e.cfg.WorkflowOwner, "err", gerr)
- 		} else {
+ 		if gerr != nil {
+ 			return fmt.Errorf("failed to resolve organization ID for workflow owner %s: %w", e.cfg.WorkflowOwner, gerr)
+ 		}
 		organizationID = orgID

In engine.go:573

+ 	var executionStatus string // Moved from line 646
 	triggerEvent := wrappedTriggerEvent.event.Event
 	executionID, err := events.GenerateExecutionID(e.cfg.WorkflowID, triggerEvent.ID)
 	if err != nil {
 		e.logger().Errorw("Failed to generate execution ID", "err", err, "triggerID", wrappedTriggerEvent.triggerCapID)
+ 		executionStatus = store.StatusErrored
+ 		e.cfg.Hooks.OnExecutionError(err.Error())
 		return
 	}
 
 	// Fetch organization ID for this execution
 	creCtx := contexts.CREValue(ctx)
 	if e.cfg.OrgResolver != nil {
 		orgID, gerr := e.cfg.OrgResolver.Get(ctx, e.cfg.WorkflowOwner)
- 		if gerr != nil {
- 			e.logger().Warnw("Failed to resolve organization ID, continuing without it", "workflowOwner", e.cfg.WorkflowOwner, "err", gerr)
- 		} else {
+ 		if gerr != nil {
+ 			e.logger().Errorw("Failed to resolve organization ID, stopping execution", "workflowOwner", e.cfg.WorkflowOwner, "err", gerr)
+ 			executionStatus = store.StatusErrored
+ 			e.cfg.Hooks.OnExecutionError(gerr.Error())
+ 			return
+ 		}
 		creCtx.Org = orgID
 		ctx = contexts.WithCRE(ctx, creCtx)

In engine_test.go:300

- 	cfg.ResolveOrg = func(ctx context.Context) (string, error) {
- 		return mockOrgResolver.Get(ctx, cfg.WorkflowOwner)
- 	}
+ 	cfg.OrgResolver = mockOrgResolver
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix UUc3NfQT to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from UUc3NfQT to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Chainlink-common Dependency Panic

Affected failures:

  1. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_Solana2EVM_LOOPP
  2. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_messaging_test.go:Test_CCIPMessaging_EVM2Solana_LOOPP

What Broke

These failures stem from issues introduced by an updated github.com/smartcontractkit/chainlink-common dependency. The problems manifest as a panic or nil pointer dereference during service shutdown, specifically within the StopRChan.CtxCancel.func1 function.

Proposed Fixes

Revert the chainlink-common dependency to a previous stable version and ensure the httpOrgResolver is correctly registered as a service, initializing orgResolver to a NullOrgResolver when not configured to prevent nil pointer dereferences.

In go.mod:49

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1630

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:46

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1367

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:89

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1181

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:54

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1611

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:35

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1589

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:35

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1596

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In go.mod:55

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8

In go.sum:1793

- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121 h1:cnbetn74KzCqf2kEQKd+pZ+ezsd7EUnNVebIwU+Rqss=
- github.com/smartcontractkit/chainlink-common v0.9.6-0.20260126232212-92ec485fe121/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8 h1:kDHw2ta45azZGdfLldVloLAbo+JS3zIXXRlAIO8f1js=
+ github.com/smartcontractkit/chainlink-common v0.9.6-0.20260122165924-94e0fad14fe8/go.mod h1:Eg5rz/fQINjR9H0TxHw7j+zGZeYxprUpEQZzC5JGHG4=

In application.go:1041

- 		orgResolver, err := orgresolver.NewHTTPClient(globalLogger, *cfg.CRE.LinkingServiceURL, *cfg.CRE.OrgResolverCacheTTL)
+ 		httpOrgResolver, err := orgresolver.NewHTTPClient(globalLogger, *cfg.CRE.LinkingServiceURL, *cfg.CRE.OrgResolverCacheTTL)
 		if err != nil {
 			return nil, fmt.Errorf("failed to create org resolver: %w", err)
 		}
- 		orgResolver = orgresolver.NewCache(orgResolver)
- 		srvcs = append(srvcs, orgResolver)
+ 		srvcs = append(srvcs, httpOrgResolver)
+ 		orgResolver = orgresolver.NewCache(httpOrgResolver)
 	} else {
 		globalLogger.Warn("OrgResolver not created - no linking service URL configured")
+ 		orgResolver = &orgresolver.NullOrgResolver{}
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix SGVWqFF1 to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from SGVWqFF1 to get started.

View all test uploads

Copy link

@trunk-io trunk-io bot left a comment

Choose a reason for hiding this comment

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

🔴 Test Results: Blocking OrgResolver Call

Affected failures:

  1. Workflow Run: Run CCIP integration In Memory Tests For PR / smoke/ccip/ccip_ton_messaging_test.go:Test_CCIPMessaging_EVM2TON

What Broke

The root cause is a blocking call to the orgresolver.Get method during workflow registration within the Test_CCIPMessaging_EVM2TON integration test.

Proposed Fixes

Modify createWorkflowSpec in core/services/workflows/syncer/v2/handler.go to handle orgResolver.Get errors gracefully by logging a warning and proceeding with an empty organization ID, preventing workflow registration from blocking.

In handler.go:420

- 	orgID, err := h.orgResolver.Get(ctx, owner)
+ 	orgID, err := h.orgResolver.Get(ctx, owner)
 	if err != nil {
- 		//TODO fail open
- 		return nil, fmt.Errorf("failed to get organization ID from org resolver: %w", err)
+ 		h.lggr.Warnw("Failed to get organization ID from org resolver during workflow spec creation, proceeding without it", "workflowOwner", owner, "error", err)
+ 		orgID = "" // Proceed with empty orgID
 	}
 	ctx = contexts.WithCRE(ctx, contexts.CRE{Org: orgID, Owner: owner, Workflow: wfID})
Autofix Options

You can apply the proposed fixes directly to your branch. Try the following:

  • Comment /trunk stack-fix CgUujrfV to generate a stacked PR with the proposed fixes.
  • Use MCP in your IDE to fix the issue. Try Help me fix CI failures from CgUujrfV to get started.

Tip

Get Better Results: This CI job is not uploading test reports. Adding structured test reports enables more precise, test-level analysis with better root cause identification and more targeted fix recommendations.
👉🏻 Learn how to upload test results.

@trunk-io
Copy link

trunk-io bot commented Jan 27, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_workflowRegisteredHandler The test failed due to a nil pointer dereference causing a runtime segmentation fault in the workflow handler code. Logs ↗︎
TestIntegration_OCR2_plugins/legacy The test failed without a specific error message, likely due to an incomplete or missing failure indication in the logs. Logs ↗︎
TestShell_IndexStarkNetNodes The test failed without a specific error message, indicating an unspecified failure during the StarkNet nodes indexing process. Logs ↗︎
TestIntegration_MercuryV2_Plugin/receives_at_least_one_report_per_feed_from_each_oracle_when_EAs_are_at_100%_reliability The test failed without providing specific error details, indicating an issue with receiving reports from oracles at full reliability. Logs ↗︎

... and 5 more

View Full Report ↗︎Docs

@jmank88 jmank88 requested review from bolekk and jinhoonbang January 27, 2026 14:10
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