You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--cartesian is parsed and never read: sweeps silently produce the wrong run count #674
Found by TestLaunchFlagsAreWired, the class gate added with #667.
--cartesian ("Generate cartesian product of parameter lists") is bound to the cartesian global in cmd/launch_flags.go:333 and nothing reads it.
The underlying capability exists — pkg/params/expandGrid (parser.go:147) returns the cartesian product of named value lists — but it is only reachable through the grid: key in a params file. The flag that advertises it on the command line does nothing.
Why it matters more than the other two unwired flags
--vpc (#673) and --use-reservation (#675) silently do nothing. This one silently produces the wrong number of runs. A user who writes
expects 6 instances and gets whatever the non-cartesian path produces (zip/paired or an error), with no warning. For a sweep that is a wrong-results bug, and it bills real money either way — a wrongly-expanded sweep is wasted spend plus a hole in the result set that is easy to miss.
Fix
Wire cartesian into sweep parameter expansion so --param lists are crossed via the existing expandGrid, and reject --cartesian with a single --param list (nothing to cross) rather than silently no-op'ing. Worth a test asserting the run COUNT for a 3x2 case, since that is the observable.
Listed in knownUnwiredFlags so the gate stays green until this is fixed.
I wrote that --cartesian"silently produces the wrong run count". That is wrong. With a param file the run count comes from params:/grid:, and the flag is simply inert — there is no alternate interpretation for it to produce. I over-stated the consequence, and the "costliest of the three" ranking I gave it in the triage order was wrong for the same reason.
What is actually true is narrower and still worth fixing: the flag advertises a capability, does nothing, and says nothing.
And it should not be implemented
Looking at what it would cross:
The cartesian product already exists as the param file's grid: key (pkg/params.expandGrid), which takes named value lists and yields one param set per combination.
The input the flag implies — a repeatable --param lr=0.1,0.2 — does not exist. There is no such flag.
--params is inline JSON and currently returns inline --params not yet implemented, use --param-file for now — which fails closed with a clear message, so that one is honest.
params: in a file is already a list of complete sets, so there are no lists to cross.
So implementing --cartesian would mean adding a second way to do something grid: already does, for an input format that doesn't exist. Deprecated toward grid: instead:
$ spawn launch x --cartesian ...
Flag --cartesian has been deprecated, it never did anything; use the param file's grid: key for a cartesian product
Same treatment for #675 (--use-reservation → --reservation-id), which is the same shape: inert, superseded, and now warning rather than silent.
Activity
fix(launch): stop dropping --security-group-ids and --subnet-id (#676)
test(sweep): classify every launch flag for the sweep path (#698)
scttfrdmn commentedon Oct 5, 2026
Correcting my own framing before closing this.
I wrote that
--cartesian"silently produces the wrong run count". That is wrong. With a param file the run count comes fromparams:/grid:, and the flag is simply inert — there is no alternate interpretation for it to produce. I over-stated the consequence, and the "costliest of the three" ranking I gave it in the triage order was wrong for the same reason.What is actually true is narrower and still worth fixing: the flag advertises a capability, does nothing, and says nothing.
And it should not be implemented
Looking at what it would cross:
grid:key (pkg/params.expandGrid), which takes named value lists and yields one param set per combination.--param lr=0.1,0.2— does not exist. There is no such flag.--paramsis inline JSON and currently returnsinline --params not yet implemented, use --param-file for now— which fails closed with a clear message, so that one is honest.params:in a file is already a list of complete sets, so there are no lists to cross.So implementing
--cartesianwould mean adding a second way to do somethinggrid:already does, for an input format that doesn't exist. Deprecated towardgrid:instead:Same treatment for #675 (
--use-reservation→--reservation-id), which is the same shape: inert, superseded, and now warning rather than silent.deprecate: --cartesian and --use-reservation warn instead of doing no…
fix(sweep): honour CLI flags instead of dropping 83 of 127 (#697) (#724)
fix(launch): accept the deprecated, inert --cartesian on sweeps (#1366)
fix(launch): accept the deprecated, inert --cartesian on sweeps (#1366)
fix(launch): parameter sweeps carry or refuse every launch flag (#1366)…