Skip to content

feat(autoresearch): 30s default timeout + yellow banner + standard time notation (closes #3309) - #3316

Merged
zackees merged 1 commit into
masterfrom
feat/3309-autoresearch-timeout-defaults
Jun 20, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/3309-autoresearch-timeout-defaults

Conversation

@zackees

@zackees zackees commented Jun 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Three UX improvements to the autoresearch timeout surface so silent waits stop reading as hung shells (FastLED #3309):

  1. Default --timeout changed from 60 s → 30 s. Real-world bring-up RPC round-trips are well under 100 ms; 30 s catches genuine hangs sooner without false-tripping legit work.

  2. Yellow advisory banner is printed when --timeout is not explicitly passed:

    [default 30s timeout in effect — pass --timeout <duration> (e.g. 30s / 2m / 1h) or --no-timeout to override]
    

    Suppressed under `--quiet`.

  3. --no-timeout flag lets debugger sessions run unbounded.

  4. parse_timeout gains an h (hours) suffix.

Closes #3309.

Test plan

  • 9 new unit tests in `ci/tests/test_parse_timeout.py` covering plain seconds, ms/s/m/h suffixes, decimals, whitespace, error paths.
  • `uv run python -m ci.autoresearch --help` shows both flags with correct descriptions.
  • `bash lint` clean.

Files

  • `ci/autoresearch/args.py` — `--timeout` default + help, new `--no-timeout` flag, updated examples block.
  • `ci/autoresearch/phases.py` — wire default + banner + no-timeout into the timeout-parse block.
  • `ci/util/sketch_resolver.py` — `parse_timeout` adds the `h` suffix.
  • `ci/tests/test_parse_timeout.py` — new tests.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Extended timeout argument to support hour-based formats (e.g., 1h), minutes, seconds, and milliseconds.
    • Added --no-timeout flag to disable monitor-phase timeout.
  • Improvements

    • Applied 30-second default timeout with advisory banner when not explicitly specified.
    • Enhanced CLI help text with supported timeout format examples.

…me notation (closes #3309)

Three UX improvements to the autoresearch timeout surface so future agents
(and humans) don't read the silent wait as a hung shell:

1. Default --timeout changed from 60 to 30 seconds. Real-world bring-up
   RPC round-trips are well under 100 ms; 30 s catches genuine hangs
   sooner without false-tripping legit work. The 60 s number predated the
   on-device watchdog wiring + the LPC HardFault override (zackees/
   ArduinoCore-LPC8xx#31) -- both shorten the window where a real hang
   stays silent.

2. Yellow advisory banner is printed when --timeout is not explicitly
   passed:

       [default 30s timeout in effect -- pass --timeout <duration>
        (e.g. 30s / 2m / 1h) or --no-timeout to override]

   Suppressed under --quiet to keep AI-agent runs at ~15 lines.

3. --no-timeout flag lets debugger sessions and interactive bring-ups run
   unbounded. Implementation: timeout_seconds = 1 year-of-seconds.

4. parse_timeout (already accepts plain seconds + ms/s/m suffixes) gains
   an `h` (hours) suffix so `--timeout 1h` works without typing 3600.

Verification
- 9/9 new unit tests in ci/tests/test_parse_timeout.py pass.
- `uv run python -m ci.autoresearch --help` shows both --timeout (with
  updated examples block: `30s/2m/1h/5000ms`) and --no-timeout entries.
- bash lint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9afbdaa3-e6f7-47d3-ac3b-258ff8e61845

📥 Commits

Reviewing files that changed from the base of the PR and between 943ad5c and 5c802e4.

📒 Files selected for processing (4)
  • ci/autoresearch/args.py
  • ci/autoresearch/phases.py
  • ci/tests/test_parse_timeout.py
  • ci/util/sketch_resolver.py

📝 Walkthrough

Walkthrough

Adds hour-scale timeout notation (1h) to parse_timeout in sketch_resolver.py. Updates the --timeout CLI argument to default to None and adds a --no-timeout flag in args.py. Changes the phase timeout logic to apply a 30-second default with an advisory banner (suppressed by --quiet) and treat --no-timeout as unbounded. Adds a new test_parse_timeout.py test suite.

Changes

Autoresearch Timeout Improvements

Layer / File(s) Summary
parse_timeout hours suffix and tests
ci/util/sketch_resolver.py, ci/tests/test_parse_timeout.py
Regex in parse_timeout extended with optional h suffix; 3600-multiplication branch added; docstring and error message updated to list 1h. New TestParseTimeout suite validates plain seconds, s/m/ms/h suffixes, case-insensitivity, whitespace, decimals, and error paths for invalid formats and non-positive values.
CLI --timeout and --no-timeout arg changes
ci/autoresearch/args.py
--timeout default changed from a numeric value to None; help text rewritten to document accepted duration formats (30s, 2m, 1h, 5000ms, bare number). New --no-timeout boolean flag added. Epilog example updated to 2m. Note: --no-timeout is not yet wired into the returned Args dataclass.
Phase default-timeout, banner, and --no-timeout handling
ci/autoresearch/phases.py
AUTORESEARCH_DEFAULT_TIMEOUT_S = 30 introduced. When args.timeout is None, the 30s default applies and an advisory banner is printed (suppressed by --quiet). --no-timeout sets an effectively unbounded timeout. Explicit values are still routed through parse_timeout with parse-error exit.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 Hoppity-hop, no more silent wait,
A banner in yellow announces your fate!
Thirty seconds by default, or an hour with 1h,
--no-timeout for sessions that go on and on and on—
The rabbit checked the regex, expanded the h,
Now timeouts are friendly from sunup to nightfall! 🕐

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3309-autoresearch-timeout-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees
zackees merged commit 8f8779c into master Jun 20, 2026
10 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 20, 2026
@zackees
zackees deleted the feat/3309-autoresearch-timeout-defaults branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[autoresearch] 30s default timeout + yellow banner + standard time notation parsing

1 participant