Skip to content
Astera Technology

Name every input that recalculates a derived field

Use dependency cases to avoid a result that refreshes for only one input.

Compare the rule with concrete cases

Fictional pages and minutes_per_page are nonnegative integers; estimate is their product. The record starts with four pages and five minutes each, total twenty. Changing pages to six gives thirty; changing rate to seven on the original gives twenty-eight. These are estimated minutes, not actual work logs.

Filled synthetic modelling cases
CasePagesMinutes per pageExpected estimate
Original4520
Page edit only6530
Rate edit only4728
Download editable CSV ↓

Work through the distinction

A page-only test cannot show whether the rate is a declared dependency. Retain a separate actual-minutes field so recalculating an estimate does not rewrite observations.

Both inputs become six pages at seven minutes. What estimate is required?

Show the worked answer

Forty-two minutes: 6×7. Any recorded actual minutes remain unchanged.

Acceptance wording to adapt

Recompute estimated_minutes=pages×minutes_per_page whenever either input changes. Do not accept a stale previous estimate, and preserve actual_minutes on estimate-input edits.

Related resources

Custom software development →