[FEATURE] Race-condition safe variables for workflow debounce

Open
#2,918 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

The issue does not identify files, tests, or entry points. Start by tracing how workflow variables are scoped to a run and how webhook-triggered executions proceed concurrently; then clarify whether the change should provide atomic persistent variables or a built-in debounce/lock. Done should ensure only the latest run continues after a wait window, including under concurrent webhook bursts.

Written by the indexing model from the issue text.

Description

Summary

Need race-condition safe, cross-run variables (or built-in debounce/lock) for webhook bursts.

Problem

Workflow variables are per-run only, so concurrent executions cannot coordinate. This makes debounce/“latest message wins” logic unreliable.

Current behavior

Multiple webhook runs triggered within seconds all proceed because each run sees only its own variable state.

Proposal

Add a persistent, atomic variable store scoped to workflow (optionally per-conversation) with compare-and-set semantics, or a built-in debounce/lock block with TTL.

Use case

User sends 4–5 messages quickly; only the latest run should continue after a wait window.

Dominant language
TypeScript
Stars
29.8k
Forks
3.9k
Avg merge
1h 43m
Merged PRs (30d)
937

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from simstudioai/sim

All issues in simstudioai/sim

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.