Aglet

Document a tested batch-size range and its resource guard

The durable lesson is a batch-size range grounded in both item coverage and shared-resource behavior. Record the input and ordering assumptions, the first failing boundary, and the guard that protects workers or storage. Treat the range as revisitable when record shape or query behavior changes.

Keep the lesson for the next incident

  1. Name the size contract

    Document supported size range, selection ordering, checkpoint or transaction semantics, expected item coverage, and resource guard. State what happens above the range and which component owns the decision. Avoid a size number without the workload and input assumptions that make it meaningful.

  2. Retain the sweep fixture

    Keep lower, selected, higher, boundary-order, and resume cases with expected IDs, effects, query behavior, and resource checks. Re-run them after changing indexes, record shape, cursor logic, transaction scope, worker concurrency, or dependencies.

  3. Watch recurrence signals

    Review coverage mismatches, repeated effects, memory or connection guard breaches, and queue age that rises only at larger sizes. Compare input revision and resource context before changing the range. Assign review when a new record shape or query path enters the batch.

What to carry forward

Preserve a workload-qualified size range, exact coverage contract, and resource guard with sweep and resume fixtures. Recurrence checks should connect batch boundaries to commits and shared capacity. Reopen review when input shape, indexes, cursor, transaction, worker concurrency, or dependency behavior changes the tested range.

Technical background: Rails guides.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow