Skip to content

[audit] Bug+Dup: config.ParseDuration silently drops d (day) support — ttl: 2d parses to 0; delegate to the complete parser #298

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 0 — do now (own PR, latent bug)

Evidence

  • cmd/state.go:514-563 parseDuration — full s/m/h/d parser returning error (used for TTL by launch.go and state.go)
  • pkg/config/local.go:203-212 config.ParseDuration — divergent, does NOT handle d, so a config ttl: 2d silently becomes 0

Recommendation
Make config.ParseDuration delegate to the complete parser so config-file durations support d. The 3 lambda copies live in separate modules and can't share directly.

User-facing / SemVer: Behavior change on config parse — CHANGELOG Fixed + bump on release.

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

Activity

  1. added
    bug
    area:lifecycle
    audit:2026-07
    on Jul 11, 2026
  2. scttfrdmn commented on Jul 11, 2026

    @scttfrdmn
    ContributorAuthor

    Shipped in #331 (squash-merged to main). Closing manually (only #294 auto-closed from that PR).

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:lifecycleaudit:2026-07bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions