VFX-D-1204¶
Title¶
UnusedCapture
Explanation¶
A step's capture block declares a variable name that no {placeholder} anywhere in the suite ever
interpolates. The capture still runs and still costs an extraction against the step's response; it
simply feeds nothing.
This is about existence, not ordering: a name used before it is captured is VFX-D-1203, and a
suite with both problems gets both findings rather than one hybrid.
Reported as a warning, per the spec's own rule table — an unused capture never makes a suite fail.
A script.csharp step consumes captures without a placeholder, by reading Vars["name"]
directly, so this rule accounts for scripts before reporting anything. A capture whose name appears
anywhere in an inline script code block is treated as used. And when any script step names a
file instead, the rule is suppressed for the whole suite: this server never reads a suite's
neighbouring files, so the evidence that would answer "is this capture used?" is unreachable by
construction, and reporting anyway would be a guess.
Where the capture's own name contains a ${...} reference, the finding's path stops at the
capture map ($.steps[N].capture) and the message withholds the name. That is deliberate: this
server never echoes a secret reference, and a path segment naming the entry would publish the
caller's secret store layout on an otherwise clean result.
Common causes¶
- A capture kept after the step that consumed it was deleted or rewritten.
- A spelling mismatch between the capture key and the placeholder that was meant to read it (matching is case-sensitive and exact).
- A capture added speculatively while drafting, then never wired up.
Fixes¶
- Delete the capture entry if nothing needs the value.
- Or interpolate it in a later step as
{name}— check the exact key spelling againstvalidate_suite'ssummary.captures. - If the value is only needed for debugging, prefer reading it from the run's event stream via
explain_runrather than capturing it into a variable nothing uses.