feat: reintroduce the mock streams trigger on develop#21828
Merged
feat: reintroduce the mock streams trigger on develop#21828
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
e6d895c to
3ae8a65
Compare
3ae8a65 to
89ac6bd
Compare
465d17c to
22994a0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM
This PR forward-ports a test-only “mock streams trigger” into develop, gating it behind an explicit [Capabilities.Local] config entry so it’s opt-in, and adjusts the local CRE test metadata registry to preserve a legacy F=1 compatibility path when the mock trigger is enabled.
Changes:
- Add optional registration of the mock streams trigger based on local capability config.
- Introduce a mock streams trigger implementation that emits signed mock reports and supports trigger lifecycle (register/emit/unregister).
- Add/adjust local CRE test metadata registry behavior to advertise
WorkflowDON.F=1only when the mock trigger is opted in, with focused tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| core/services/standardcapabilities/local_capabilities.go | Adds gating + optional mock trigger registration helper. |
| core/services/standardcapabilities/local_capabilities_test.go | Unit tests for the gating logic. |
| core/services/standardcapabilities/delegate.go | Calls optional registration during delegate construction and propagates init errors. |
| core/services/cre/cre.go | Uses a helper to build a local TestMetadataRegistry with conditional WorkflowDONF. |
| core/services/cre/cre_test.go | Tests that the conditional WorkflowDONF override is applied. |
| core/capabilities/streams/mock_trigger.go | Implements the mock trigger service and report/signature generation loop. |
| core/capabilities/streams/mock_trigger_test.go | Tests mock trigger lifecycle and event emission path. |
| core/capabilities/registry.go | Adds configurable WorkflowDONF in TestMetadataRegistry and uses it in LocalNode(). |
| core/capabilities/registry_test.go | Tests that WorkflowDONF is respected. |
Targeted areas for scrupulous human review:
core/capabilities/streams/mock_trigger.go: trigger lifecycle and internal state management (RegisterTrigger/UnregisterTrigger, background loop + Close semantics).core/services/standardcapabilities/delegate.go: impact ofinitErrgating on job startup behavior when optional registration fails.
|
archseer
approved these changes
Apr 22, 2026
archseer
approved these changes
Apr 22, 2026
ilija42
approved these changes
Apr 22, 2026
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
developF=1behavior needed by the legacy workflow smoke pathTesting
GOWORK=off go test ./core/capabilities/streams -run 'TestMockTriggerService|TestStreamsTrigger' -count=1GOWORK=off go test ./core/services/chainlink -run TestShouldRegisterMockStreamsTrigger -count=1