Skip to content

fix(runtime): wait for Caido readiness by deadline - #1053

Draft
maxi-maxima wants to merge 2 commits into
usestrix:mainfrom
maxi-maxima:agent/caido-boot-deadline
Draft

fix(runtime): wait for Caido readiness by deadline#1053
maxi-maxima wants to merge 2 commits into
usestrix:mainfrom
maxi-maxima:agent/caido-boot-deadline

Conversation

@maxi-maxima

Copy link
Copy Markdown

Summary

  • replace the fixed 10-attempt Caido login loop with a monotonic wall-clock deadline
  • add STRIX_CAIDO_BOOT_WAIT_S with a 300-second default for slower container hosts
  • cap each curl attempt and retry delay to the remaining budget
  • document the setting and cover retry success, deadline exhaustion, and env loading

Root cause

Caido readiness was bounded by an attempt count rather than elapsed time. The existing backoff exhausted its ten attempts after roughly 68–73 seconds, so a healthy but slow cold start on a loaded or hosted runner could be reported as a permanent bootstrap failure.

Impact

Slow runners now get a bounded, configurable readiness window while fast failures still stop at the deadline with the elapsed budget and attempt count in the error.

Validation

  • uv run pytest tests/test_caido_bootstrap.py tests/test_config_loader.py -q -k "not test_persist_current_sets_0600_mode" — 20 passed, 1 Windows-only mode assertion deselected
  • uv run ruff format --check . — passed
  • uv run ruff check . — passed
  • targeted mypy, pyright, and bandit checks for the changed runtime/configuration paths — passed

Fixes #1036.
Related to #1037.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loginAsGuest gives up after ~68s: fixed 10-attempt retry too short for slow sandbox boot (chown -R before caido-cli)

1 participant