drive_auth: propagation fails with HTTP 400 after consent; tool reports cli_parse instead of auth_failed #13
Labels
No labels
area/backup
area/cli
area/docs
area/dsh
area/forgejo
area/host
area/mcp
area/plugin
area/security
area/ux
needs-operator
priority/later
priority/next
priority/now
type/bug
type/research
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-colab#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Updated plugin (after #10/#11 fix) now waits for consent and surfaces the URL - good - but the credential propagation fails with an HTTP 400 and the tool reports the wrong error class.
Repro
Fresh T4 (
gpu-t4-s-usw4b0-11e6sbxidtjpv),colab_drive_auth(session="hijack", project="hijack", timeout_s=300):REQUIRED: Google Drive Authorization needed. Please visit: https://accounts.google.com/...(state token included) and waited for Enter - correct.[colab] Authorizing VM...and got[colab] Error propagating: 400 <html>Error 400 (Bad Request)</html>.ValueError: mount failed; the tool returnedcode: cli_parse, message "colab drivemountexited successfully but the Drive mount is not visible inside the VM".So: the tool's error mapping is wrong (this is an auth/propagation failure, not a parse failure), and more importantly the handoff itself fails.
Hypotheses
statetoken in the URL is short-lived / single-use; a failed propagation invalidates it and the tool does not start a freshdrivemount(new token) before retrying.Authorizing VMstep talks to Colab with the ephemeral gsession; a stale/duplicate automation (from an earlier attempt in the same VM) may confuse it.Suggested fixes
Error propagating: 400: restart the wholedrivemount(fresh URL + token, possiblyforce_remount/kernel restart) and retry up to N times; only then returnauth_failed.auth_failedwith the propagation status; keep the last URL indata.urlso the operator can retry immediately.drive_auth_success(it appeared incolab login earlier manual attempts) before/after propagation and use it as the success signal instead of justls.Impact
Drive mount is still the one manual fallback (
colab drivemount -s <session>in a terminal), so the v0 goal (one tool call, one browser click) is not met yet.Retried on the updated plugin (2026-11-12 14:40 CET), fresh T4
gpu-t4-s-use1c0-11rxf7qiq7lo3. Same failure:[colab] Authorizing VM...->[colab] Error propagating: 400; the operator was not given a chance to approve (the call returned in one block, no waiting window).code: cli_parse, "colab drivemountexited successfully but the Drive mount is not visible inside the VM".So the 5 s timeout is gone (good), but the timing problem remains: Enter/authorize is sent without waiting for actual consent. This strengthens hypothesis #1 in the ticket: on 400, restart
drivemountwith a fresh URL and wait for an explicit operator-confirmation signal (or poll fordrive_auth_successincolab log) before propagating.Workaround still manual:
colab drivemount -s <session>in a real terminal works every time.Verified fixed on the 2026-11-12 build. Fresh T4
gpu-t4-s-usw4b1-je4yptohph4i:The ask-user handoff works: URL surfaced, consent completed, no premature propagation / 400, Enter handled by the tool.
colab_uploadalso succeeded with a 13.6 MB bundle (verified: true, retries: 0) andcolab_download/ls/stop/usageall worked in the same session. Closing from my side; the manual-terminal fallback is no longer needed.