Skip to content

The tool prints instructions that do not work: spawn instances list on a cost-leak path, spawn fsx create exiting 0, and five doc paths that never existed #806

Closed

Description

@scttfrdmn

#790 fixed this for one command's recommendations. The same defect is live in
seven more places, and the gate I added then only covers
pkg/infrastructure's — which is the #799 lesson again: a gate scoped to where
the author happened to be looking.

All verified against a freshly built binary.

Commands that do not exist

printed at names reality
cmd/launch_jobarray.go:347, :395 `spawn instances list` unknown command "instances" for "spawn" — the real one is spawn list
pkg/launcher/provision.go:201 (and :193) `spawn fsx create` exits 0, prints group help, creates nothing
cmd/fsx.go:20 Long fsx … export exits 0, does nothing; export is a flag on delete (--export-first)
pkg/compliance/validator.go:66, :76, pkg/compliance/report.go:145 spawn config init --self-hosted unknown flag: --self-hosted; config is an alias for instance-config, which has no init

The first is the worst. It fires in drainJobArray (cmd/launch_jobarray.go:344),
the path that runs when a cohort launch fails and instances may still be billing:

⚠️ drain: list instances failed: %v — RUN \spawn instances list` AND TERMINATE BY HAND; a failed cohort's instances are still billing`

The one instruction given at the moment money is leaking does not work.

The second is the most insidious. An unknown command at least errors;
spawn fsx create exits 0, so a script following the recommendation reports
success while creating nothing:

$ spawn fsx create; echo $?
0

Doc paths and a URL printed to users, none of which ever existed

Each verified absent on disk and absent from git log:

printed at names when the user sees it
cmd/zombie_guard.go:33 …/blob/main/docs/lifecycle.md every spawn launch/service without --ttl/--idle-timeout
pkg/doctor/doctor.go:246 (see docs/safety) the TTL-reaper warning in spawn doctor
pkg/aws/reapercoverage.go:155 See docs/safety. the "no out-of-band reaper covers this account" warning
pkg/compliance/report.go:153, :236 docs/compliance/<framework>.md, -quickstart.md the compliance report's own recommendations
cmd/app.go:168 infra/amis/containers/<app> spawn app list, for every "recipe available" app

infra/ contains only amis/windows/README.md. docs/compliance/ and
docs/safety do not exist. The first row is on the most common launch path there
is.

Suggested

Fix the eight strings, and then generalise the gate rather than adding
another narrow one. TestValidateRecommendationsNameOnlyRealCommandsAndPaths
(added in #791) already resolves commands against the real cobra tree and checks
that referenced paths exist — but only for
pkg/infrastructure.GetRecommendations. Widen it to every user-facing string in
cmd/ and pkg/:

  • resolve any spawn <words> against rootCmd.Find, requiring all non-flag
    words to be consumed — checking only the first word is not enough, which is how
    spawn config deploy-infrastructure passed before (config is real);
  • check that any flag named on a resolved command exists on it;
  • os.Stat every repo-relative path mentioned, and verify any
    github.com/spore-host/... URL resolves.

One wrinkle worth designing for: fsx create and fsx export exit 0 because
cobra prints group help for an unknown subcommand of a group with no RunE. A
gate that only checks exit codes would miss them; it needs to resolve against the
command tree.

Related: #790 (same class, one command), #799 (a gate scoped to one directory
missed six scripts).

Activity

  1. added
    bug
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions