scheduler: decide whether an IDE file save releases a task's session

Open
#9,289 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
backend

Research direction

Start with handleWriteFile in packages/server/src/handlers/file-handlers.js, around line 106, and the releaseScheduledTaskLink entry point that #9242 added for chat, terminal, AskUserQuestion and Files-restore releases. Read #9242's review thread to see how those releases are decided. Done means a decision recorded on this issue; if it is release, a real-handler test shows that an IDE save into a task-owned session stops the next scheduled fire from driving it.

Written by the indexing model from the issue text.

Description

server

Follow-up from #9242's review.

Context

#9242 releases a scheduled task's ownership of its session when a person uses that session: chat input, a terminal newline, an AskUserQuestion answer, or a checkpoint Files restore. A released session is never again driven by the task, and is not destroyed when the task is deleted.

Gap

A person editing files in the session's working tree through the dashboard's IDE surface (handleWriteFile, packages/server/src/handlers/file-handlers.js, around line 106) does not release ownership. Deleting the task is still safe, because the dirty-worktree guard keeps the session. But the next scheduled fire can still drive a prompt into a session whose files the person is actively editing.

Wanted

Decide whether a file write through the IDE counts as "a person using the session". If it does, release ownership through the same entry point (releaseScheduledTaskLink), with a real-handler test.

Acceptance

  • A decision recorded on this issue. If the answer is release: a test where an IDE save into a task-owned session means the next fire does not drive it.

Related: #9242, #6469.

Dominant language
JavaScript
Stars
7
Forks
1
Avg merge
2h 3m
Merged PRs (30d)
333

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blamechris/chroxy

All issues in blamechris/chroxy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.