Resource Locking
Prevents multiple workflows from running simultaneously on the same issue, or PR.
Priority Queuing
Controls execution order when multiple workflows are queued for the same resource.
Event Deduplication
Merges rapid-fire events into single workflow executions with the latest state.
Queue Processing
Queued workflows run by priority level, and workflows with the same priority run first-come, first-served.
How Workflow Execution Works
When an event occurs (like opening an issue or creating a PR), Overcut follows this execution pipeline:1
Event Received
A webhook from GitHub, GitLab, Jira, or manual trigger is received.
2
Trigger Matching
Overcut finds all workflows with matching triggers and conditions.
3
Resource Locking
Each matching workflow is queued for the specific resource (issue or PR) using a lock key.
4
Event Deduplication
If a workflow is already queued for the same resource, events are merged with the latest state.
5
Priority Ordering
Queued workflows are ordered by priority (1-100 scale), then by queue time (FIFO).
6
Sequential Execution
Only one workflow runs per resource at a time, preventing conflicts and race conditions.
Resource Locking
Lock Key Structure
Overcut uses lock keys to ensure only one workflow runs per resource at a time:- Issues:
owner/repo:issue:123 - Pull Requests:
owner/repo:pr:456
Scheduled Workflow
When using “Per-Repository” execution mode, Overcut starts an execution for each repository selected. For Scheduled Workflows, Overcut automatically skips a new run if the previous one is still in progress for the same lock key (issue, PR, or repository). This guarantees that long-running maintenance jobs don’t pile up and overload your workers.Why Locking Matters
Without resource locking, multiple workflows could:- Make conflicting changes to the same issue
- Create duplicate comments or labels
- Waste resources on redundant operations
- Cause race conditions and unpredictable behavior
Example: Issue Workflow Locking
Priority Queuing
Priority Scale (1-100)
Control workflow execution order using numeric priority:- 1 = Highest Priority (executes first)
- 5 = Default Priority (normal workflows)
- 100 = Lowest Priority (executes last)
Lower numbers execute first. Think of priority as “position in line” - priority 1 is first in line.
Priority Guidelines
- Use the full 1-100 range for fine-grained control
- Create your own prioritization scheme, for example:
- 1-20: Critical security scans, system failures
- 21-40: Code reviews, bug fixes, urgent issues
- 41-60: Normal automation, standard workflows
- 61-80: Documentation updates, metrics collection
- 81-100: Background analytics, cleanup tasks
Setting Priority in UI
1
Open Workflow Builder
Navigate to your workflow and click the settings/metadata section.
2
Set Execution Priority
Enter a number between 1-100 in the Priority field. Lower numbers execute first.
Priority in Action
Event Deduplication
How Deduplication Works
When multiple events occur rapidly for the same resource and workflow:- First Event: Creates queue entry
- Subsequent Events: Merge with existing queue entry
- Final State: Workflow executes with the latest merged state
Benefits
- Efficiency: Reduces redundant executions by 60-80%
- Accuracy: Workflows see the final state, not intermediate changes
- Resource Savings: Less compute, storage, and API usage
- Better UX: Fewer duplicate comments or actions
Trigger Delays and Execution Control
How Delays Interact with Queuing
Trigger delays work with the execution control system:- Delay Applied: When trigger first fires, workflow queues with future
readyAttime - Event Merging: Additional events during delay window merge with queued workflow
- Priority Respected: When delay expires, workflow processes according to priority
- Lock Acquired: Workflow executes when it reaches front of priority queue
Related Documentation
- Triggers: Understanding when workflows start
- Building Blocks: Core workflow components
- Import & Export: Managing workflow definitions
- Code Review Guide: Priority in practice