Skip to content

headless: aforge do --timeout 5s is a parse error because the flag is an integer of seconds #376

Closed

Description

@santoshkumarradha

Problem (measured 2026-09-02, dev @ bcd098e + #369)

$ aforge do "x" --timeout 5s
invalid value "5s" for flag -timeout: parse error

cmd/aforge/do.go declares the flag as flags.Int("timeout", defaultDoSeconds, "hard wall in seconds"), while every other duration in the product — AFORGE_PRACTICE_IDLE 20m, AFORGE_BRIEF_AFTER 4h, --max-hours — takes a unit. A person who has typed 20m anywhere else in aforge types 5m here and is refused.

General fix

The flag is a duration like the rest (5s, 15m, 2h). A bare integer is still accepted as seconds for one release, and the manual and the -h line say so, so no script that passes -timeout 900 breaks.

Acceptance

  • aforge do … --timeout 5m and --timeout 300 both set a five-minute wall; a unit test on the flag's parser pins both spellings and refuses 5x.
  • The do -h line and the manual name the duration form and the one-release grace for bare seconds.

Filed from the #335 lane on santosh-3c's assignment.

🤖 Generated with Claude Code

https://claude.ai/code/session_017i4DrtGaeSX34XMThY4Msd


Drafted with CodeAF · reviewed and owned by the author

Activity

  1. santoshkumarradha commented on Sep 2, 2026

    @santoshkumarradha
    MemberAuthor

    Re-landed as #495 → eb645b3 (tag checkpoint/2026-09-02/pr495-do-wall-duration) after the #494 revert. The internal/exec leaf-room law now reads the act (a write to a deadline/watchdog target sized from a unit without asking the subharness table) instead of the spelling, so the run's wall keeps 15 * time.Minute. Binary: ~/af-376/bin/aforge.

  2. added
    bug
    area:headless
    on Oct 3, 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:headlessbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions