Why
status and run read the same plan with different inputs.
| flag |
run |
status |
--vars |
yes |
no |
--set |
yes |
no |
-v |
yes |
no |
--agent-ttl |
yes |
no |
--inventory, --limit, --parallel, --json, --insecure, --known-hosts, --secret-file, --secret-env |
yes |
yes |
A plan whose values come from --set or a --vars file cannot be inspected with status:
the command that exists to answer "what would this plan see?" cannot be given what the
plan sees. It fails on an unbound variable, or silently uses different values.
--dry-run and --check are run-only by design — those are modes, not inputs. The four
above are inputs.
Build
Give status the same input flags as run. loadGlobals already builds the map from
--vars + --set for run; statusCmd calls the same loader without them.
-v and --agent-ttl are the same argument in a weaker form: one is output detail, the
other a transport knob, and neither has a reason to differ between the two commands.
Worth deciding while there: whether the two commands should share a single flag-set
definition rather than each declaring its own. They have drifted once; they will drift
again.
Validation
shellf status --set k=v … resolves a plan using ${k}, and produces the same resolved
values as run --dry-run on the same inputs — asserted by comparing the two reports, not
by reading the code.
- A plan needing no variables behaves exactly as before.
Why
statusandrunread the same plan with different inputs.runstatus--vars--set-v--agent-ttl--inventory,--limit,--parallel,--json,--insecure,--known-hosts,--secret-file,--secret-envA plan whose values come from
--setor a--varsfile cannot be inspected withstatus:the command that exists to answer "what would this plan see?" cannot be given what the
plan sees. It fails on an unbound variable, or silently uses different values.
--dry-runand--checkarerun-only by design — those are modes, not inputs. The fourabove are inputs.
Build
Give
statusthe same input flags asrun.loadGlobalsalready builds the map from--vars+--setforrun;statusCmdcalls the same loader without them.-vand--agent-ttlare the same argument in a weaker form: one is output detail, theother a transport knob, and neither has a reason to differ between the two commands.
Worth deciding while there: whether the two commands should share a single flag-set
definition rather than each declaring its own. They have drifted once; they will drift
again.
Validation
shellf status --set k=v …resolves a plan using${k}, and produces the same resolvedvalues as
run --dry-runon the same inputs — asserted by comparing the two reports, notby reading the code.