An automated self-review gate sits between the author's push and the human reviewer's inbox. Before you argue about whether it belongs there, put a number on it. The pass has exactly three cost buckets, and leaving any one out is how teams end up with a gate that looks free and is not.
The first bucket is model spend: input tokens (the diff, surrounding files, instructions) billed at the input rate, and output tokens (the findings, reasoning, suggested patches) billed at the output rate. Providers publish these separately per million tokens, and output is priced far above input. OpenAI's published rates show a wide spread, with output often several times the input rate OpenAI pricing.
The second bucket is command minutes: the lint, type-check and test runs the pass triggers. If those run on hosted CI or any metered runner, every minute has a price. Even on self-hosted runners, the machine, electricity and queue time are real costs, and the minutes are the part most cost estimates quietly omit.
The third bucket is human review minutes. A self-review pass can cut review time (the reviewer starts from a cleaner diff with mechanical issues already flagged) or add to it (the reviewer now reads a wall of automated comments before reading the code). This bucket can be positive or negative, and you must measure it rather than assume it.
The formula ties them together:
pass_cost = (input_tokens * input_rate)
+ (output_tokens * output_rate)
+ (command_minutes * loaded_minute_rate)
+ (net_human_minutes * loaded_reviewer_rate)
net_human_minutes = review_minutes_after - review_minutes_before
If pass_cost is negative, the gate is paying for itself before you even count quality gains. If it is positive, you need the saved minutes to clear it. Everything below is about filling those four terms with numbers you can defend.



