The flag has one reachable value
crates/launchbound-cli/src/main.rs:
/// Re-verify the emitted specialization with cargo reconverge.
#[arg(long, default_value_t = true)]
verify: bool,
A bool argument defaults to a SetTrue action, so --verify sets what is
already the default and nothing sets it back:
$ launchbound apply … --no-verify error: unexpected argument '--no-verify'
$ launchbound apply … --verify=false error: unexpected value 'false' for '--verify'
$ launchbound apply … --verify false error: unexpected argument 'false'
And the help does not say it is on:
--verify
Re-verify the emitted specialization with cargo reconverge
Read plainly, that is an opt-in. It is not: verification runs whether or not
it is passed, and cannot be turned off.
Why it matters beyond tidiness
Verification shells out to cargo reconverge, so apply needs the analyzer
installed and the pinned toolchain present. There is no way to emit a
params.rs without them — not on a machine that has no reconverge, not in a
container that has the run directory and nothing else, and not on a Metal run
where the verification cannot succeed at all
(#34).
The mandatory-verification stance is defensible for a safety tool — this
project argues that case well elsewhere. What is not defensible is arguing it
through a flag that pretends to be a choice.
Fix — one of
- Keep it mandatory and drop the flag. Say so in the command's help:
"the emitted specialization is always re-verified through the gate; there
is no way to skip it." Honest, and one fewer thing to explain.
- Make it a real switch —
#[arg(long, action = ArgAction::Set, default_value_t = true)]
or a --no-verify counterpart — and let the help show [default: true].
Then a machine without reconverge can still emit, with the notice that
nothing was verified carried into the output the way the Metal notice is.
(1) is the smaller change and matches the project's stated posture. (2) is the
one that makes apply usable where the analyzer is not installed. Either
settles it; the present state claims (2) and does (1).
Done when
--verify either does something or does not exist, and the help describes
whichever is true.
The flag has one reachable value
crates/launchbound-cli/src/main.rs:A
boolargument defaults to aSetTrueaction, so--verifysets what isalready the default and nothing sets it back:
And the help does not say it is on:
Read plainly, that is an opt-in. It is not: verification runs whether or not
it is passed, and cannot be turned off.
Why it matters beyond tidiness
Verification shells out to
cargo reconverge, soapplyneeds the analyzerinstalled and the pinned toolchain present. There is no way to emit a
params.rswithout them — not on a machine that has no reconverge, not in acontainer that has the run directory and nothing else, and not on a Metal run
where the verification cannot succeed at all
(#34).
The mandatory-verification stance is defensible for a safety tool — this
project argues that case well elsewhere. What is not defensible is arguing it
through a flag that pretends to be a choice.
Fix — one of
"the emitted specialization is always re-verified through the gate; there
is no way to skip it." Honest, and one fewer thing to explain.
#[arg(long, action = ArgAction::Set, default_value_t = true)]or a
--no-verifycounterpart — and let the help show[default: true].Then a machine without reconverge can still emit, with the notice that
nothing was verified carried into the output the way the Metal notice is.
(1) is the smaller change and matches the project's stated posture. (2) is the
one that makes
applyusable where the analyzer is not installed. Eithersettles it; the present state claims (2) and does (1).
Done when
--verifyeither does something or does not exist, and the help describeswhichever is true.