Skip to content

Add a first-class duration input (instead of only args: --duration) #250

@dbrumley

Description

@dbrumley

Summary

Run duration can currently only be set by threading --duration <seconds> through the free-form args input. A dedicated, typed duration input would be cleaner and less error-prone.

Motivation / what bit us

  • We pin Mayhem runs to 20 minutes via args: --duration 1200. That works on @v1/@main because src/main.ts only injects a fallback --duration 60 when --duration isn't already present.
  • But the long-runs branch does args.push("--duration", "14400") unconditionally, which silently overrode the --duration 1200 we passed via args — a 20‑minute config quietly became 4 hours, with no error or warning. Because duration lives inside a free‑form string, there's no clear precedence and it's easy for a ref to clobber it.

Request

  • Add an optional duration input (seconds) that maps to --duration.
  • Define explicit precedence: the duration input wins; else honor --duration in args; else the documented default.
  • Nice-to-haves: validate it's a positive integer, and echo the effective duration in the run log so overrides are visible.

Workaround (works today)

Pass args: --duration <seconds> and use a stable ref (@v1), not @long-runs.

Filed from the rlenv-heroes fork-integration effort, where every repo's worker passes --duration 1200.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions