Race Condition
A defect whose occurrence depends on the relative timing of concurrent operations.
A race condition occurs when the correctness of a result depends on the order in which concurrent operations happen to complete. Races are the archetypal intermittent bug: they reproduce on slow machines and vanish on fast ones, or the reverse.
The web platform generates a particular family of them. A build tool's dependency scan finishing mid-run triggers a page reload that aborts whatever was in flight — so a random file fails, never the same one twice, and never on a fast local machine that wins the race every time. A resize observer's first callback lands a frame or two after mount, too late to prevent a visible jump and early enough to fight a user who has already scrolled. A framework re-rendering a subtree that a browser mutated directly diffs against a stale model.
Concurrent processes race in the same way over shared resources: two test runs in one working copy destroying each other's temporary files, two workers deriving the same port, two agents editing one directory.
The general remedies are to remove the shared resource (separate working copies, unique filenames), to make the ordering explicit (wait on an observable condition, not a duration), or to make the operation idempotent so order stops mattering. See Idempotence.
See also7
Hand-picked in the note itself — the neighbours worth reading next.
Flaky Test
A test that passes and fails on identical input, and the most corrosive thing a suite can contain.
Testing & Verification12 connections
Multi-Agent Orchestration
Coordinating several model instances on one body of work, each with its own context.
Agents & Language Models10 connections
Git Worktree
An additional working directory attached to one repository, each on its own branch.
Version Control & Delivery10 connections
Determinism
The property that identical inputs produce identical outputs, and the foundation of caching and verification.
Systems & Tooling27 connections
Bundler
The tool that resolves an application's modules into the files a browser downloads.
Web Platform12 connections
Reproducible Case
The smallest set of steps that reliably produces a fault, and the unit of real debugging.
Method17 connections
Fan-Out and Fan-In
Splitting work across parallel workers and recombining their results.
Agents & Language Models9 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from9
Notes elsewhere in the wiki that reach for this one.
- BundlerWeb Platform
The tool that resolves an application's modules into the files a browser downloads.
- Fan-Out and Fan-InAgents & Language Models
Splitting work across parallel workers and recombining their results.
- Flaky TestTesting & Verification
A test that passes and fails on identical input, and the most corrosive thing a suite can contain.
- Git WorktreeVersion Control & Delivery
An additional working directory attached to one repository, each on its own branch.
- IdempotenceSystems & Tooling
The property that performing an operation twice has the same effect as performing it once.
- Multi-Agent OrchestrationAgents & Language Models
Coordinating several model instances on one body of work, each with its own context.
- Reproducible CaseMethod
The smallest set of steps that reliably produces a fault, and the unit of real debugging.
- SubagentAgents & Language Models
A model instance spawned by another to handle a scoped task with its own context.
- Token BudgetAgents & Language Models
The finite allowance of model usage a task may consume, and the design decisions it forces.