Data contracts that warn or block
Declare the rules your data must meet and Stirrup checks them on schedule, holding bad rows back before they spread.
- acme
- Contracts
- orders-feed
| order_id | string, required, regex("^ORD-[0-9]{6}$") | pass |
|---|---|---|
| amount | number, required, min(0) | pass |
| currency | oneof(USD, EUR, GBP) | pass |
| status | oneof(active, paused, churned) | 38 rows |
| string, nullable, regex(".+@.+") | pass | |
| updated_at | date, required | pass |
| freshness | maxAgeHours: 6 | 1 h ago |
- Rule
- status oneof(active, paused, churned)
- Sample rows
- ORD-104233 "archived"ORD-104237 "archived"ORD-104241 "Archived"
- Block
- 38 rows quarantined, each with a reason
- Paused
- Dashboard Q3 revenue review, endpoint /api/run/acme/orders/summary
- Fixed by
- Not yet acknowledged
Write the rule once, then let it watch
Contracts are declarative, versioned and readable by anyone on the team.
Write the contract
Declare types, required and nullable fields, regex patterns, allowed values, ranges and a freshness window.
Attach it to data
Any sheet, connection import or script output can carry a contract. One format covers all three.
Check on a schedule
Checks run on demand, on a schedule, or from a trigger such as a finished sync.
Warn or block
Warn records the violation and notifies. Block also quarantines failing rows and pauses what depends on them.
Rules, enforcement and automation
The rules, what happens when they fail, the record they leave and the work they can start.
| Rule type | Example | What it catches |
|---|---|---|
| Type and required | amount: number, required | Missing columns, text in a number field |
| Nullable | email: string, nullable | Empty values where a value is mandatory |
| Regex | order_id: regex("^ORD-[0-9]{6}$") | Malformed IDs, codes and emails |
| Allowed values | status: oneof(active, paused, churned) | Values nobody agreed on |
| Range | discount: min(0), max(0.4) | Negative amounts, out-of-range rates |
| Freshness | maxAgeHours: 6 | A feed that stopped updating |
Warn while you tune, block when it matters
Warn logs the violation and tells someone. Nothing stops. Block goes further: failing rows are held back with a reason each, and the dashboards and endpoints that read the data pause until the check passes.
Most contracts start in warn and move to block once the rules are tuned.
| On a failed check | Warn | Block |
|---|---|---|
| Writes a violation record | ||
| Notifies the people you choose | ||
| Fires triggers | ||
| Quarantines failing rows with a reason per row | ||
| Pauses downstream dashboards and endpoints until the check clears | ||
| Available on | Team and up | Business and up |
Every violation is a record
Each violation keeps the failing rule, sample rows, the time and who fixed it, and moves from open to acknowledged to resolved. Export the log when an auditor asks.
Coverage-gap analysis lists the sheets, imports and script outputs that carry no contract. Rules are versioned, so you can diff what changed and when.
- acme
- Contracts
- Violations
| ID | Contract | Rule | Status | Fixed by | Opened |
|---|---|---|---|---|---|
| VIO-0412 | orders-feed | status oneof | Open | None yet | 29 Oct 14:00 |
| VIO-0409 | partner-feed | maxAgeHours: 6 | Acknowledged | Data lead | 29 Oct 08:00 |
| VIO-0401 | refunds | amount min(0) | Resolved | RO | 27 Oct 16:41 |
| VIO-0397 | orders-feed | order_id regex | Resolved | FL | 26 Oct 09:12 |
Triggers: when this happens, do that
Triggers run in real timezones and keep a full run history.
An unattended Juno run takes an instruction, a tool allowlist, an optional model override and a hard cap on tool calls. It spends the same budget as a person and posts a summary to the inbox.
Events
- Cron tick
- Interval
- Contract violation
- Freshness breach
- File uploaded
- Endpoint hit
- Inbound webhook
Actions
- Run a contract check
- Run Juno unattended
- Enqueue a job
- Fire an outbound hook
- acme
- Triggers
- Run history
- 14:00:12
Contract violation: orders-feed
Run Juno unattendedtools: sheets, contracts; cap 25 calls
- 14:00:00
Cron tick: */30 * * * *
Run a contract checkorders-feed, 1 rule failed
- 13:42:37
File uploaded: march-export.csv
Enqueue a jobnormalize-upload, done in 3 s
- 08:00:04
Freshness breach: partner-feed
Fire an outbound hookdelivered, 200
Timezone America/Chicago
Specs and limits
What a contract can check and which plan each part starts on.
| Rule types | Type and required, nullable, regex, allowed values (oneof, min, max), freshness (maxAgeHours) |
|---|---|
| Attach to | Sheets, connection imports, script outputs |
| Violation record | Rule, sample rows, time, who fixed it Status is open, acknowledged or resolved; the log exports for audits |
| Rule management | Versioned and diffable With coverage-gap analysis |
| Trigger events | Cron tick, Interval, Contract violation, Freshness breach, File uploaded, Endpoint hit, Inbound webhook |
| Trigger actions | Run a contract check, Run Juno unattended, Enqueue a job, Fire an outbound hook |
| Contracts in warn mode | Team and up |
| Freshness rules | Team and up |
| Block mode | Business and up |
| Event and cron triggers | Starter and up |
| Unattended Juno runs | Team and up |
Works with
- Connections & Files
Validate every import at the door, before it reaches a sheet or a dashboard.
- Scripts & APIs
Check script output before an endpoint serves it, and enqueue jobs from triggers.
- Investigate
Open an investigation from a violation and get a causal answer with evidence.
Questions
Warn logs the violation and notifies whoever you choose; nothing stops. Block also quarantines the failing rows, with a reason for each, and pauses downstream dashboards and endpoints until the check clears.
Types and required fields, nullable, regex patterns, allowed values with oneof, min and max ranges, and freshness with maxAgeHours.
Set maxAgeHours, for example 6. Stirrup tracks when the data last changed and opens a violation if it goes stale, before anyone notices a chart that stopped moving.
A trigger listens for an event (cron tick, interval, contract violation, freshness breach, file uploaded, endpoint hit, inbound webhook) and then does one of four things: run a contract check, run juno unattended, enqueue a job, fire an outbound hook. Every firing is kept in the trigger's run history.
Coverage-gap analysis lists the sheets, connection imports and script outputs that carry no contract, so you can start with the gaps rather than a blank page.
Catch bad data before it reaches a decision
Start a contract in warn mode on the import you trust least. Contracts are on Team and up.