Skip to content

[audit] Spawn CLI/code audit 2026-07-11 — findings tracker (Phases 0–3) #328

Closed

Description

@scttfrdmn

Spawn CLI/code audit — 2026-07-11 (findings tracker)

Full report: docs/spawn-audit-2026-07-11.md. Assessment-only, adversarially verified (62/62 findings survived verification; severities/scope adjusted where the first pass was wrong). All child issues carry the audit:2026-07 label.

The spawn CLI surface is fundamentally healthy — core lifecycle verbs, the --json→-o/--output gate, and the --yes-on-destructive convention are consistent and test-enforced. Findings cluster into: CLI ergonomics drift, ~1000 lines of internal dead code, and a few oversized/coupled internals.

Phase 0 — do now (safety + isolated cleanup, non-user-facing) ✅ APPROVED

#293 (pkg/sms) is explicitly NOT in Phase 0 — it's a live cross-repo public API; coordinated removal only.

Phase 1 — additive / backward-compatible (one MINOR)

Phase 2 — user-facing renames (needs convention decision; ship with aliases + CHANGELOG, single MINOR)

Phase 3 — structural refactors (largest blast radius; after Phase 2 grouping decisions)

Doc-only (no bump; fold into whatever release notes) — no separate issues filed

  • image/ami Short-string overlap — clarify help text (ami = capture from running; image = build from ISO). CHANGELOG Documentation.
  • delete vs remove vs destroy — document the convention (remove = detach-from-parent, delete/destroy = teardown standalone). No churn to existing commands.

Investigated & ruled out (verified NOT actionable) — no issues filed

  • launcher.Provision / validateEphemeralFSx / createAndAttachEphemeralFSx — flagged dead by deadcode, but it's the exported headless launch entrypoint (spawn#210 partial regression on v0.62.0: capacity-failed polls still orphan FSx on launcher.Provision (likely 1 per AZ attempt) — 3 live orphans preserved as evidence #220 hotpath / Lambda no-SSH), reached by build-tagged test/e2e/tier2_launcher_test.go. KEEP.
  • pkg/testutil (~55 funcs) + test/e2e/helpers.go — test infrastructure, invisible to deadcode. KEEP.
  • dup-list-then-filter-by-name — refuted: the loops do NOT duplicate resolveInstance's i-prefix/case-insensitive/running-over-stopped logic.
  • --json gate — verified still holds (all 9 flags MarkDeprecated; TestFlagConventions passes). Used as the model to extend for --output/--tag.
  • lifecycle verbs (start/stop/hibernate/terminate + cancel) — verified a clean, consistent split. No change.
  • resume two senses — disambiguated by noun context; top-level resume already correctly deprecated toward sweep resume. Doc-only.
  • provider vs pkg/aws dual EC2-access layers — confirmed a defensible split; document the boundary rather than merge.

SemVer if all Group A+B shipped together: single MINOR (pre-1.0 breaking → MINOR; everything ships as deprecated aliases, nothing hard-removed).

Activity

  1. added
    audit:2026-07
    on Jul 11, 2026
  2. scttfrdmn commented on Jul 15, 2026

    @scttfrdmn
    ContributorAuthor

    Audit fully closed — all 43 findings resolved.

    Final wave (this session) cleared the last 12 open items:

    Already-complete (verified against current main, closed with evidence):

    Wave 1 — internal refactors (v0.76.0):

    Wave 2 — user-facing CLI consistency, all with deprecated aliases (v0.76.0, PR #361):

    Wave 3 — cross-repo (#293): removed dead pkg/sms from spawn (#363); rest-api now owns its local pending-reply types (#410).

    Shipped in spawn v0.76.0. Phases 0–3 complete.

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

    audit:2026-07

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions