Skip to content

[audit] Refactor: launchWithProgress is a 749-line function (longest in the repo) — extract per-step helpers #319

Closed

Description

@scttfrdmn

Filed from the 2026-07-11 spawn audit. Full report: docs/spawn-audit-2026-07-11.md. Assessment-only — no code changed yet.

Phase: Phase 3 — structural

Evidence

  • cmd/launch.go:1233-1976 launchWithProgress — 749 lines, 11+ inline steps; longest non-test func in the repo

Recommendation
Extract ensureAMI/ensureSSHKey/ensureIAMProfile/ensureSecurityGroup/ensureFSx/buildAndLaunch/waitAndRegisterDNS. Mind the job-array early-return branch.

User-facing / SemVer: No — internal. No bump.

Adversarially verified during the audit (62/62 findings survived verification; severities/scope adjusted where the first pass was wrong).

Activity

  1. added
    area:launch
    audit:2026-07
    on Jul 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

    area:launchaudit:2026-07

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions