<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/configuration/review-test-budget/">
  <id>https://docs.spec-kitty.ai/configuration/review-test-budget/</id>
  <title>Review test execution budget</title>
  <updated>2026-10-28T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/configuration/review-test-budget/"/>
  <summary>Configure a bounded per-run budget for complete baseline and candidate review tests.</summary>
  <content type="html">&lt;span id=&quot;review-test-execution-budget&quot;&gt;&lt;/span&gt;
&lt;p&gt;A project whose complete declared review command needs more than five minutes can
set its per-run budget in &lt;code dir=&quot;auto&quot;&gt;.kittify/config.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;review&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;test_command&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;zig build test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;test_output_format&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;text&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;test_timeout_seconds&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#F78C6C;--1:#AA0982&quot;&gt;1200&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;test_timeout_seconds&lt;/code&gt; accepts an integer from 1 through 86400 seconds. The
defaults depend on the &lt;strong&gt;scope shape&lt;/strong&gt; the pre-review gate chose:&lt;/p&gt;

















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Scope shape&lt;/th&gt;&lt;th&gt;Default budget&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;whole declared command&lt;/td&gt;&lt;td&gt;1,200 s (&lt;code dir=&quot;auto&quot;&gt;WHOLE_COMMAND_TEST_TIMEOUT_SECONDS&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bounded target list&lt;/td&gt;&lt;td&gt;300 s (&lt;code dir=&quot;auto&quot;&gt;DEFAULT_TEST_TIMEOUT_SECONDS&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;A repository whose declared command runs in full is not running a scoped check,
so the scoped default under-bounds it; the whole-command default is sized for a
whole-suite run (this repository’s &lt;code dir=&quot;auto&quot;&gt;make test-fast&lt;/code&gt; was measured at 215 s of
pytest, and its CI bounds a whole per-PR lane at 20 minutes). A pinned per-WP
&lt;code dir=&quot;auto&quot;&gt;pre_review_test_scope&lt;/code&gt; narrows &lt;em&gt;what&lt;/em&gt; runs, not the bound. A declared
&lt;code dir=&quot;auto&quot;&gt;test_timeout_seconds&lt;/code&gt; always wins, whatever the shape.&lt;/p&gt;
&lt;p&gt;Booleans, fractions, strings, null, zero, negative values and larger values
are errors; an invalid declaration refuses the transition before a test runs,
and the shape default never masks it. The ceiling is one day per run, bounding
oversized declarations and platform waits. The setting changes execution time,
leaving the command, selected scope, failure comparison, oversized-scope policy
and timeout refusal policy intact.&lt;/p&gt;
&lt;p&gt;The baseline and candidate use the same configuration authority as the declared
command. A lane’s execution checkout and its detached baseline do not substitute
their own settings for the planning root’s configuration. A validated owned
checkout supplies its own command, budget and receipt write authority; the
repository primary remains its Git identity. Explicit Python API
budget arguments take precedence for callers that already supply them.&lt;/p&gt;
&lt;p&gt;Baseline receipts record &lt;code dir=&quot;auto&quot;&gt;test_timeout_seconds&lt;/code&gt;. Older receipts were captured with
the release’s hardcoded 300-second budget and are interpreted as 300. A changed
budget triggers recapture on the next applicable review transition. If recapture
fails, a stale receipt remains historical evidence and cannot qualify the new
budget. A valid cached receipt at the same budget remains reusable under the
existing baseline policy.&lt;/p&gt;
&lt;p&gt;Budget the outer invocation for &lt;strong&gt;both&lt;/strong&gt; test runs, process cleanup and other gate
work. For example, two 1200-second legs can require more than 2400 seconds overall.
The candidate’s machine lock still has its independent short acquisition budget;
baseline capture still bypasses that lock. On timeout, a
declared command (&lt;code dir=&quot;auto&quot;&gt;review.test_command&lt;/code&gt; resolved through the scope source, the
normal path) terminates and joins its whole process group before the temporary
workspace is released. The legacy config-driven capture path, used only when no
scope source is supplied, bounds the run with the same budget but stops only the
direct shell child.&lt;/p&gt;
&lt;p&gt;This source change requires a release containing it. Installing an older published
CLI does not adopt this setting. A passing local fixture does not establish a
passing project aggregate, fleet deployment or production adoption.&lt;/p&gt;</content>
</entry>
