Engineering Initiative / rocky
Making Analytics Execution Fail Closed
Across 31 merged Rocky contributions, I found a recurring systems risk: control-plane claims could diverge from what the warehouse would execute or had already committed. This case study follows six changes that made those boundaries fail closed.
- My Role
- Upstream contributor
- System
- Rust analytics engine
- Contribution
- 31 merged PRs
- Evidence Window
- July 18 – September 1, 2026
Jump to Section
01 / Pattern
The Recurring Failure Class
Rocky is a SQL transformation engine that plans, compiles, executes, and recovers analytical pipelines across multiple warehouses. Correctness depends on agreement between user intent, generated plans, warehouse state, and the engine’s durable ledger.
- Intent
- Plan
Failure PointA preview could describe work apply would skip
- Compile
Failure PointCompiler gaps could also approve contracts the executed SQL could violate
- Execute
Failure PointA failed metadata probe could expose a live target to replacement
- Checkpoint
Failure PointCommitted rows could outpace their watermarks, and resume could silently start without authoritative state
02 / Contract
The Execution-Safety Contract
I used four connected invariants to reason from command intent through compilation, mutation, and recovery.
Plan Must Match Apply
The previewed scope, persisted plan, and executed work must identify the same models and layers.
Uncertainty Must Not Authorize Mutation
Missing metadata or recovery authority must fail before destructive replacement or an unintended fresh run.
State Must Follow Durable Writes
A checkpoint may advance for committed work, never for failed work, and recovery must not repeat an already durable delta.
Unsafe Contracts Must Fail Early
When semantics cannot be preserved or a schema promise is false, compilation should stop before warehouse execution.
03 / Changes
Merged Changes
Six representative pull requests connect the initiative from command intent to warehouse execution. The broader public record contains 31 merged Rocky contributions.
| Invariant | Decision | Pull Request | Merged |
|---|---|---|---|
| Plan Must Match Apply | Model-scoped preview, persisted plan metadata, and apply now describe the same execution scope. | #1166 Align model plan scope with apply | |
| Unsafe Contracts Must Fail Early | Raw dbt models with unsupported incremental semantics now fail conversion instead of emitting changed SQL. | #1184 Refuse unsafe raw dbt incrementals | |
| Uncertainty Must Not Authorize Mutation | An uncertain target-existence probe can no longer authorize replacing bootstrap DDL. | #1207 Make bootstrap table creation non-replacing | |
| State Must Follow Durable Writes | Successful table watermarks persist after sibling failure, keeping retries aligned with durable writes. | #1411 Persist successful watermarks on partial failure | |
| Uncertainty Must Not Authorize Mutation | Explicit resume now requires authoritative checkpoint state and exits before materialization otherwise. | #1544 Fail closed on invalid resume state | |
| Unsafe Contracts Must Fail Early | Outer-join nullability now reaches compiled schemas, rejecting false non-null contracts before execution. | #1579 Propagate outer-join nullability |
04 / Validation
Public Validation and Influence
Project review repeatedly tested the safety claims against executable behavior and used the findings to strengthen adjacent paths.
- Destructive Path Tested
Review of #1207 fault-injected target discovery and verified that uncertain bootstrap fails without replacing live data.
- Durability Checked
Review of #1411 traced every watermark enqueue to a successful durable write and checked recovery without duplication.
- Follow-On Fix Merged
Review of #1544 exposed the remaining DAG flag path; a project reviewer closed it in merged follow-up #1546.
Out of Scope
- Organization-wide adoption
- User-impact metrics
05 / Next