Repository navigation
Description
Both are the #775 shape — a flag accepted and discarded. Each variable has
exactly two references in the tree: its declaration and its registration.
1. spawn pipeline launch <file> --wait returns immediately
$ grep -rn -w flagWait --include='*.go' . | grep -v _test
cmd/pipeline.go:127: flagWait bool
cmd/pipeline.go:158: launchPipelineCmd.Flags().BoolVar(&flagWait, "wait", false, "Wait for pipeline to complete")
runLaunchPipeline invokes the orchestrator asynchronously and returns —
cmd/pipeline.go:384-388:
_, err = lambdaClient.Invoke(ctx, &lambdasvc.InvokeInput{
FunctionName: aws.String(functionName),
InvocationType: lambdatypes.InvocationTypeEvent, // Asynchronous
...There is no poll loop anywhere in the function.
User-visible effect: a CI step written as
spawn pipeline launch p.json --wait && ./collect-results.shexits 0 immediately and runs the next step against a pipeline that has not
started. The flag's entire purpose is to prevent that.
Compounding: the --detached deprecation message (cmd/pipeline.go:157)
reads "pipeline launch is always async; this flag has no effect (use --wait to
block)" — it redirects the user to the inert flag. --detached itself is a
deliberate documented no-op and is fine; the redirect is not.
2. spawn logs --region is dropped, and there is no working --region
$ grep -rn -w logsRegion --include='*.go' . | grep -v _test
cmd/logs.go:22: logsRegion string
cmd/logs.go:255: logsCmd.Flags().StringVar(&logsRegion, "region", "", "AWS region (default: resolved as for other commands)")
cmd/logs.go:68 builds the client as aws.NewClient(ctx) with no region, and
resolveInstance calls ListInstances(ctx, "", "") — and "" means every
region (pkg/aws/client.go:1168-1186).
So spawn logs always does an all-region scan, and --region can neither narrow
it nor disambiguate an instance name that exists in two regions.
The second-order effect is worse than the first. Declaring a local
--region suppresses root's persistent one, which is the only thing feeding
spawnconfig.SetSharedFlags (cmd/root.go:121). Confirmed from the help output:
$ spawn logs --help
Global Flags:
--accessibility ...
--account string ...
--lang string ... <- no --region here
Flags:
--region string AWS region (default: resolved as for other commands)
Every other command lists --region under Global Flags. On logs it is local
and inert, so the command has no functioning region selector — and the help
text's "(default: resolved as for other commands)" is false, because the shared
resolution path is exactly what the shadow disconnects.
Context worth keeping
A sweep of all 508 flag registrations found only 7 variables with zero reads.
Four are deliberate, documented, MarkDeprecated no-ops and correctly so
(cleanupForce, useReservation per #675, flagDetached, and
validateComplianceMode which is read via Changed()). These two are the real
ones — so the flag surface is in good shape overall and this is a short list, not
a systemic problem.
Also found: 38 commands declare a local flag that shadows a root persistent one.
31 shadow --region and all 31 read their own variable — logs is the sole
exception. Of the 7 shadowing -o/--output, 5 are deliberate deprecated aliases
that say so in a comment. Two real side effects of that, already understood but
worth noting here: spawn queue results <id> -o json fails with
unknown shorthand flag: 'o', and spawn pipeline collect <id> --output json
writes into a directory literally named json.
Related: #775 (autoscale --region ignored), #806 (instructions that don't work).
Activity
Fix the compliance flags' arity, and gate the class
Fix the compliance flags' arity, and gate the class (#842)