Skip to content

fix: bound POSIX installer download stalls - #361

Open
paulcakeface wants to merge 6 commits into
monk-io:mainfrom
paulcakeface:fix/bound-agent-download-stalls
Open

fix: bound POSIX installer download stalls#361
paulcakeface wants to merge 6 commits into
monk-io:mainfrom
paulcakeface:fix/bound-agent-download-stalls

Conversation

@paulcakeface

Copy link
Copy Markdown

Fixes #360.

What changed

  • add configurable MONK_AGENT_DOWNLOAD_CONNECT_TIMEOUT (default 10s)
  • add configurable MONK_AGENT_DOWNLOAD_STALL_TIMEOUT (default 30s)
  • apply curl connect + low-speed/no-progress deadlines to both checksum and archive downloads
  • bound wget fallback transfers to one timeout-limited attempt
  • reject invalid/non-positive timeout values early
  • keep all three shipped POSIX ensure-monk-agent.sh copies in sync
  • add a deterministic regression test covering both curl download calls and the wget single-attempt invariant

Why

The POSIX bootstrap previously delegated checksum/archive transfer duration entirely to curl/wget defaults. A server that accepts a connection but stops making progress can therefore hold plugin installation before the launcher reaches its separate readiness deadline.

This is distinct from #52 (post-launch readiness timeout) and #90 (offline fallback to a previously verified local agent).

Validation

  • sh -n on the patched installer and regression script
  • deterministic regression: ensure_monk_agent_download_timeout=pass calls=2
  • regression checks that the three shipped POSIX installer copies are byte-identical
  • base verified against current upstream main at 8d9a2c3e9b1fcf0ba185f010f9452b2162cd6b54

I also prepared Install E2E workflow wiring locally, but did not include it because the connected GitHub token does not have permission to modify .github/workflows/* on the fork. The regression itself is included and can be run directly with:

sh ./tests/ensure-monk-agent-download-timeout.sh

Prepared with ChatGPT/Codex assistance.

@paulcakeface

Copy link
Copy Markdown
Author

Bounty follow-up: the eligibility/product-use gap on linked issue #360 is now resolved and recorded there. This branch is still based on current upstream main (8d9a2c3, v0.1.58), has no review comments or CI check runs yet, and the deterministic regression remains included. With submissions closing on 31 Aug, a maintainer review/merge decision when practical would be appreciated.

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

Labels

None yet

1 participant