- Category: B. Software Architecture
- English term: Bulkhead Pattern / Isolation
- Related: Work Queue (Producer-Consumer Pattern) · Self-hosted Runner · Fallback Chain (Cascading Fallback) · Mutual Exclusion (Mutex) Lock · Single Point of Failure (SPOF) and Failover
General Meaning
In naval engineering, a ship's hull is divided by watertight bulkheads so that a breach in one compartment does not flood and sink the entire vessel. The software Bulkhead pattern applies the same philosophy.
By partitioning system resources—CPU, memory, worker queues, environment variables, and working directories—into independent pools, a runaway task, resource spike, or corrupted workspace in one compartment is contained and cannot bring down critical services in other compartments.
Why It Matters
- Preventing cascading resource exhaustion: Even if a heavy queue is backed up for hours, lightweight periodic patrols and health checks continue running unaffected.
- Preventing workspace contamination: Stops concurrent workers from touching the same git working tree or config files and corrupting each other's uncommitted changes.
- Localizing faults: Ensures a crashing test or broken repository build cannot halt the entire automation platform.
How the Site Factory Uses It
The Site Factory enforces bulkhead isolation across four layers: (1) AI runner working trees, where honbu/runner_workspaces.py provisions an independent git clone at ~/Projects/honbu-agent-work/cloud-runners/<runner>/HONBU for each runner (claude, codex, cursor, antigravity, studio2) so leftover files never collide; and (2) GitHub self-hosted runners, where all 13 repo runners on Mac mini isolate their HOME environment variable to ~/actions-runners/_home/<repo> so CI tests cannot overwrite host configs or live mini-queue state.
In addition, (3) mini-queue lanes separate launchd worker.heavy (LLM inference) from worker.light (fetching/extraction) so long island inference never blocks daily data fetches; and (4) Benchmark locks acquire mac.lock on Mac Studio during performance benchmarks while routing normal jobs elsewhere.
Caveats & Operational Rules
- Watch out for implicit shared resources: Even with separate folders and processes, sharing the same local database, API rate limit, or network port underneath can still cause a common-mode failure.
- Avoid rigid over-partitioning waste: Strict static partitioning can leave idle resources stranded; the Site Factory balances isolation by allowing concurrency on
worker.lightand offloading heavy inference to idle Mac Studios. - Isolation does not replace output verification: Running safely in a separate compartment does not guarantee the output is correct; always pair bulkheads with independent verification and receipts.
Related Terms
- Work Queue (Producer-Consumer Pattern)
- Self-hosted Runner
- Fallback Chain (Cascading Fallback)
- Mutual Exclusion (Mutex) Lock
- Single Point of Failure (SPOF) and Failover
References
- Book: Michael T. Nygard, *Release It!*, Chapter 5 (Stability Patterns: Bulkheads); Mark Richards & Neal Ford, *Fundamentals of Software Architecture*
Verified: 2026-11-08