Skip to content

docs: Add notes about scalability and thread-safety - #80

Merged
yoomlam merged 4 commits into
mainfrom
yl/scalability-notes
Oct 31, 2025
Merged

docs: Add notes about scalability and thread-safety#80
yoomlam merged 4 commits into
mainfrom
yl/scalability-notes

Conversation

@yoomlam

@yoomlam yoomlam commented Oct 30, 2025

Copy link
Copy Markdown
Collaborator

Ticket

Investigate Hayhooks scalability

Slack thread

Changes

Add notes about scalability and thread-safety.
Remove state from components.

Preview environment for frontend

♻️ Environment destroyed ♻️

Preview environment for app

♻️ Environment destroyed ♻️

Copilot AI review requested due to automatic review settings October 30, 2025 23:54

Copilot AI left a comment

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.

Pull Request Overview

This PR addresses thread-safety issues in the pipeline components by removing stateful instance variables that could cause race conditions when the same component instance is shared across multiple threads handling concurrent API requests.

Key changes:

  • Removed stateful attempt_count tracking from LlmOutputValidator component to ensure thread-safety
  • Added documentation clarifying thread-safety requirements for pipeline components
  • Added comments explaining max_runs_per_component behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/src/common/components.py Removed attempt_count state variable from LlmOutputValidator to make it thread-safe; added module-level documentation about thread-safety requirements; updated error logging to remove attempt count reference
app/src/pipelines/generate_referrals/pipeline_wrapper.py Added comments clarifying max_runs_per_component behavior and counter reset behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/common/components.py Outdated
yoomlam and others added 3 commits October 30, 2025 18:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yoomlam
yoomlam merged commit bdbec67 into main Oct 31, 2025
12 of 13 checks passed
@yoomlam
yoomlam deleted the yl/scalability-notes branch October 31, 2025 00: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.

3 participants