hardcoded 5s CLI child timeout breaks upload/download/exec (not just drive-auth) #11

Closed
opened 2026-11-11 22:43:54 +00:00 by dsh · 1 comment
Owner

Same 5 s hard timeout as #10, but it also breaks non-interactive file operations, so it is not only a drive-auth bug.

Repro (fresh T4, Drive already mounted via manual colab drivemount):

colab_upload(session="hijack",
  local="/home/pvl/Projects/Deeps/hijack/examples/saved/colab/hijack-colab-src.tar.gz",
  remote="/content/drive/MyDrive/hijack/hijack-colab-src.tar.gz", force=true)
-> ok: false, code: cli_timeout,
   message: "The Colab CLI did not finish within 5s.",
   raw_tail: "/var/folders/... [colab] A new version of Colab CLI is available..."

A 13 MB upload over the Drive FUSE mount routinely takes 10-60 s; the CLI child is killed at 5 s. The same applies to colab_download, colab_exec (any real script >5 s), colab_run, colab_drive_auth (#10).

Expected

  • A configurable CLI child timeout (default >=120 s; uploads/downloads may need minutes) distinct from the tool-level timeout_s.
  • If a CLI call exceeds a tool timeout, return the tool's typed error (exec_timeout, auth_pending, ...) with the raw tail, not cli_timeout at 5 s.
  • Retry/backoff (already described in colab_upload) should apply to the whole operation, not a 5 s window.

Suspect

A shared runCli() helper with a hardcoded 5 000 ms child timeout (or execFile default) used by every tool.

Suggested fix + test

  • one cliTimeoutMs plugin config (default 120000) + per-tool override;
  • fake CLI test that sleeps 6 s and prints -> tool must succeed;
  • upload test with a 15 MB fixture (can be a temp file; no network needed if the fake CLI just sleeps).

Impact

v0 is effectively unusable for real jobs until this is fixed: every meaningful CLI op exceeds 5 s. Workaround is raw colab ... in a shell, which is what the plugin was supposed to replace.

Same 5 s hard timeout as #10, but it also breaks **non-interactive** file operations, so it is not only a drive-auth bug. Repro (fresh T4, Drive already mounted via manual `colab drivemount`): ``` colab_upload(session="hijack", local="/home/pvl/Projects/Deeps/hijack/examples/saved/colab/hijack-colab-src.tar.gz", remote="/content/drive/MyDrive/hijack/hijack-colab-src.tar.gz", force=true) -> ok: false, code: cli_timeout, message: "The Colab CLI did not finish within 5s.", raw_tail: "/var/folders/... [colab] A new version of Colab CLI is available..." ``` A 13 MB upload over the Drive FUSE mount routinely takes 10-60 s; the CLI child is killed at 5 s. The same applies to `colab_download`, `colab_exec` (any real script >5 s), `colab_run`, `colab_drive_auth` (#10). ## Expected - A configurable CLI child timeout (default >=120 s; uploads/downloads may need minutes) distinct from the tool-level `timeout_s`. - If a CLI call exceeds a *tool* timeout, return the tool's typed error (`exec_timeout`, `auth_pending`, ...) with the raw tail, **not** `cli_timeout` at 5 s. - Retry/backoff (already described in `colab_upload`) should apply to the whole operation, not a 5 s window. ## Suspect A shared `runCli()` helper with a hardcoded 5 000 ms child timeout (or `execFile` default) used by every tool. ## Suggested fix + test - one `cliTimeoutMs` plugin config (default 120000) + per-tool override; - fake CLI test that sleeps 6 s and prints -> tool must succeed; - upload test with a 15 MB fixture (can be a temp file; no network needed if the fake CLI just sleeps). ## Impact v0 is effectively unusable for real jobs until this is fixed: every meaningful CLI op exceeds 5 s. Workaround is raw `colab ...` in a shell, which is what the plugin was supposed to replace.
dsh added this to the v0 - CLI wrapper milestone 2026-11-11 22:43:54 +00:00
Author
Owner

Fixed in 0.1.3 (9ce6715, tag v0.1.3). It was the same hardcoded 5 s listing budget: uploads used commandTimeoutMs (180 s) but the overwrite guard/verification colab ls used 5 s, and a listing can queue behind a busy kernel or a settling Drive mount.

What changed:

  • every colab ls uses a new listTimeoutMs config (default 60 s);
  • upload/download keep commandTimeoutMs (default 180 s) and map a CLI wall-clock timeout to transfer_failed with a hint to retry or raise commandTimeoutMs — no more bare cli_timeout;
  • regression tests: a 6 s upload verification succeeds, and a timed-out transfer returns transfer_failed;
  • docs/config updated with listTimeoutMs; the 13 MB bundle path is covered by the fake CLI tests.

Upgrade: dsh plugin --profile web add --registry https://git.pvlb.dev/api/packages/dsh-plugins/npm/ dsh-colab@0.1.3, restart the profile, and retest the upload. If a transfer legitimately exceeds 180 s, raise commandTimeoutMs in the plugin config.

Fixed in **0.1.3** (`9ce6715`, tag `v0.1.3`). It was the same hardcoded 5 s listing budget: uploads used `commandTimeoutMs` (180 s) but the overwrite guard/verification `colab ls` used 5 s, and a listing can queue behind a busy kernel or a settling Drive mount. What changed: - every `colab ls` uses a new `listTimeoutMs` config (default 60 s); - upload/download keep `commandTimeoutMs` (default 180 s) and map a CLI wall-clock timeout to `transfer_failed` with a hint to retry or raise `commandTimeoutMs` — no more bare `cli_timeout`; - regression tests: a 6 s upload verification succeeds, and a timed-out transfer returns `transfer_failed`; - docs/config updated with `listTimeoutMs`; the 13 MB bundle path is covered by the fake CLI tests. Upgrade: `dsh plugin --profile web add --registry https://git.pvlb.dev/api/packages/dsh-plugins/npm/ dsh-colab@0.1.3`, restart the profile, and retest the upload. If a transfer legitimately exceeds 180 s, raise `commandTimeoutMs` in the plugin config.
dsh closed this issue 2026-11-11 22:56:21 +00:00
Sign in to join this conversation.
No description provided.