Windows file helper truncates a file before writing it, so a crash can leave it short
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- desktop, documentation, tooling
Research direction
This bundles six separate fixes, so pick one and ignore the rest. The smallest candidates are the __proto__ key in files at code_index.ts:364 (use a Map or Object.create(null)) and the doc contradiction at ARCHITECTURE.md:258 versus line 235. Done means the chosen fix is in place and its test or doc check passes. Ask the maintainer before touching the Windows helper at windows.rs:192-194, since that change needs a durability design.
Written by the indexing model from the issue text.
Description
Found in the 2026-10-09 codebase audit.
Small issues, each low impact:
- MCP stop during connect leaves a server running. If
stop()runs whileconnectOneawaitsstdioTransport,closeClientclearsstate.connectingbefore the process exists;connectOnethen spawns it andif (this.stopped) await closeClient(state)closes nothing. Fix: close the localclientin that branch. - Terminal output after a project switch.
pty.onData(panels/terminal.ts:38) is not guarded bythis.pty === pty, unlikeonExit, so output from the killed old shell can reach the new terminal. Needs verification. - Git panel diff fails on an untracked symlink.
GitService.diff()(git.ts:329) callsresolveoutside a try, so one link pointing outside the project fails the whole diff instead of skipping that file. - Prototype-named files in the code index. A file named
__proto__sets the prototype offiles(code_index.ts:364) and is re-embedded on every update. UseObject.create(null)or aMap. - Durability.
writeJson(storage/json_file.ts) never fsyncs before rename, and the Windows helper truncates a file before writing it (windows.rs:192-194); a crash or power loss can leave an empty file. - Doc inconsistency. ARCHITECTURE.md:258 says the Git panel's Commit and Push run the repository's hooks; line 235, the README and the code (
core.hooksPathdisabled) say they don't.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 2
- Avg merge
- 5h 28m
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the 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 PierrunoYT/patch
-
enhancement priority: low security severity: low
Difficulty 4/5 3-5 days Newbie friendliness 30/100
PierrunoYT/patch#263 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium security severity: low
Difficulty 5/5 Over a week Newbie friendliness 12/100
PierrunoYT/patch#262 ·
Maintainers usually reply within 1 day
-
platform: macos priority: medium security severity: low tests
Difficulty 4/5 3-5 days Newbie friendliness 15/100
PierrunoYT/patch#257 ·
Maintainers usually reply within 1 day
-
bug platform: macos priority: medium security severity: high
Difficulty 3/5 1-2 days Newbie friendliness 35/100
PierrunoYT/patch#232 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement platform: windows priority: low severity: low
Difficulty 5/5 Over a week Newbie friendliness 18/100
PierrunoYT/patch#228 ·
Maintainers usually reply within 1 day
All issues in PierrunoYT/patch
Similar issues
-
effort:S priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cameri/nostream#811 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
dam-agents/dam#4562 ·
Maintainers usually reply within 1 day
-
bug p3 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug javascript P2-medium python release:v3.1
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
adrirubio/claude-deck#546 ·
Maintainers usually reply within 1 day