Skip to content

enclave/server: make response emitter safe for concurrent use - #33

Merged
cfal merged 2 commits into
mainfrom
response-emitter-race
Aug 4, 2026
Merged

enclave/server: make response emitter safe for concurrent use#33
cfal merged 2 commits into
mainfrom
response-emitter-race

Conversation

@cfal

@cfal cfal commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

chainlink-common executes capability calls in asynchronous goroutines, and a workflow can have multiple calls in flight within the same execution. These calls share a per-execution ResponseEmitter, which currently appends events without synchronization. This change protects event collection with a mutex and builds both response representations from a consistent snapshot, preventing data races and lost observability events during parallel host calls.

@cfal
cfal requested a review from a team as a code owner August 1, 2026 09:46
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

👋 cfal, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@cfal
cfal force-pushed the response-emitter-race branch from 3cf101d to d9d34aa Compare August 1, 2026 09:46
@cfal
cfal merged commit 2036f9a into main Aug 4, 2026
39 checks passed
@cfal
cfal deleted the response-emitter-race branch August 4, 2026 13:29
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