richardcase / richardcase/clowder
Clean up companion panes when split insertion races with close
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 16
Description
Problem
split_pane spawns a companion, ignores a failed split_leaf insertion, then registers and returns the companion anyway. If the target closes concurrently, the shell is absent from the tree but remains alive.
Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/server.rs#L1063-L1104
Acceptance criteria
- Check the insertion result.
- Kill/unregister the companion and return an error when insertion fails.
- Add a concurrent split/close regression test.
Contributor 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.
Research direction
Start in crates/clowder-daemon/src/server.rs around lines 1063-1104 and trace split_pane, split_leaf, and companion registration. Reproduce the concurrent split/close case, then add a regression test showing that failed insertion kills and unregisters the companion and returns an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100