Master

Shipping an engine that is bounded

The end state is an engine where every limit is written and every claim has a run that produced it. The shape is the same shape as every other shippable system in this site.

What you will see

One line with both numbers and a date. That line is the record of the decision.

About 1 min of reading

Try It

Write the limits and prove a refusal

1

Write the limits file

printf 'doc_bytes 200000\npage_size 20\nparts_max 4\nchunk_bytes 8000000\nquery_words 8\n' > /tmp/lim.txt; wc -l < /tmp/lim.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
5. Five lines is the whole contract of the engine.
2

Attempt a run that breaches one

printf 'query_words 14\n' | awk '{print ($1>8) ? "refuse" : "run"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse. The refusal came from the file, not from a person reading it.
3

Name the breached limit

printf 'refuse limit=query_words used=14 max=8 date=2026-10-10\n' >> /tmp/stops.txt; tail -1 /tmp/stops.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with both numbers and a date. That line is the record of the decision.

Data Flow

An engine to a shippable claim
1 The limits file is written
↓
2 The suite gates every change
↓
3 A breach refuses and names the limit
↓
4 The record is written with a date
Why this works
Why the limits live in the engine

The engine is the component that acts. A limit in a note is a limit that will be exceeded, and exceeded means unbounded.

The end state of this subject

An engine that refuses with a number. That is the state where every claim is written, and written is the word that ends the subject.

Examples

The limits are one file

Document size, page size, parts, chunk bytes, query length. One file, and the file is the contract of the engine.

The artefacts are the same four

Input contract, suite, last scores, open cases. The shape of a shippable system does not change with the language.

The refusal names the limit

A long query refuses with the length and the number. The name and the number are the record, and the record is the claim.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Debugging an engine that answers wrong
Previous Lesson
Debugging an engine that answers wrong