🤖 perf: Daytona keepalive refreshes a shared sandbox once per workspace instead of once per sandbox
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start with src/node/services/daytona/daytonaReconciler.ts around line 135 and read how the 60-second sweep resolves sandbox references and checks workspace activity. Add a reconciler test for an owner and two active forks sharing one sandbox. Done when a sweep makes one last-activity call for that sandbox, with the SSH token behavior also handled once per sandbox.
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_r4353806733, src/node/services/daytona/daytonaReconciler.ts:135).
Problem
Forks and sub-agents of a Daytona workspace run as worktrees in the owner's sandbox, so several workspaces reference one sandbox. The reconciler's 60 s sweep walks workspaces, not sandboxes: every active workspace on the same sandbox sends its own POST /sandbox/{id}/last-activity (and may check its token), one after another. A large sub-agent tree multiplies control-plane calls and sweep latency for no gain, since one refresh per sandbox is enough.
Proposed fix
Group the stored references by resolved sandbox id, ask whether any workspace in the group is active, and refresh activity (and the SSH token, keyed by the stored alias) once per sandbox per sweep. Add a reconciler test with an owner and two active forks on one sandbox that expects one last-activity call.
Why it is deferred
#7100 runs its review loop under a P0/P1-only rule; P2 findings get a tracked follow-up.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 139
- Avg merge
- 3h 24m
- Merged PRs (30d)
- 954
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 76/100
Maintainers usually reply within 1 day
-
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 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Add: MahdawiounTV HDOpencheck:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
iptv-org/iptv#56890 · 1 comment ·
Maintainers usually reply within 1 day
-
type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
franciscoBSalgueiro/en-croissant#1061 ·
Maintainers usually reply within 3 days
-
S: triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
comp/desktop desktop/shell os/windows P3 tool/file type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NousResearch/hermes-agent#145928 ·
Maintainers usually reply within 1 day