🤖 fix: keep SSH access to a Daytona sandbox when its delete fails
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with src/node/services/daytona/daytonaSandboxes.ts near line 258 and trace deleteSandbox, ensureSshAccess, and the removal path's SSH checks. Add the described test for a first delete failing with a 5xx followed by a successful retry. Done means SSH checks work after the failed delete and the retried removal succeeds.
Written by the indexing model from the issue text.
Description
Follow-up from the Codex review of #7100 (thread: https://github.com/coder/xum/pull/7100#discussion_r4369224751, src/node/services/daytona/daytonaSandboxes.ts:258).
Problem
DaytonaSandboxes.deleteSandbox revokes Xum's SSH token and removes the sandbox's host block before it calls DELETE /sandbox/{id}, because Daytona refuses to revoke a token of a sandbox that no longer exists. When the delete fails with a transient error, the workspace is kept so the removal can be retried, but its alias no longer has a host block. The retry's SSH checks then fail with a hostname error until something mints access again.
Proposed fix
When client.deleteSandbox throws (other than 404), restore SSH access before rethrowing (ensureSshAccess), or have the removal path call ensureReady before its SSH checks. Add a test where the first delete fails with a 5xx and the retried removal succeeds.
Why it is deferred
#7100 runs its review loop under a P0/P1-only rule; P2 findings get a tracked follow-up. The revoke-first order predates this round.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 140
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 952
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/xum
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🤖 fix: refresh the runtime status chip after a turn, terminal or editor starts a stopped sandboxOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Merit-Systems/x402scan#1312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Native Web
Difficulty 1/5 Under an hour Newbie friendliness 80/100
digitalfabrik/integreat-app#4517 ·
Maintainers usually reply within 2 days
-
TLS guide repeats certs/ in the certificate directoryPossibly taken @maheshrijal claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
prometheus/docs#3156 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
medusajs/dtc-starter#90 ·
Maintainers usually reply within 1 day