Skip to content

server: a crash's stale note and graph temporaries are cleared when the server opens their folders - #3132

Merged
ashhart merged 3 commits into
mainfrom
lead/stale-temps
Nov 16, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/stale-temps

Conversation

@ashhart

@ashhart ashhart commented Nov 13, 2026

Copy link
Copy Markdown
Owner

A crash can leave .tmp.<pid>.<n> temporaries beside notes and the --slide-graph file. The server now clears its own stale ones when it opens those folders: a temporary is removed only when its name matches exactly as {d} prints it (no +, _ or leading zeros), its pid is 1 to 2^31-1 and no longer running (or the file is a day old), and in the folder holding --slide-graph only that graph's own temporaries are touched. A bare file name is cleaned in the current folder. A name like x.tmp.4294967295.0 no longer crashes the open.

Tests: test-server-cpu 1331 pass, 7 skip; against the base the new test fails (the stale file stays). Cross-compiles for Windows and Linux; the test skips on Windows, where the day-old fallback would need Dir.setTimestamps, which panics there in Zig 0.17.

@ashhart
ashhart merged commit e7e2424 into main Nov 16, 2026
12 of 20 checks passed
@ashhart
ashhart deleted the lead/stale-temps branch November 16, 2026 02:41
ultradaoto added a commit to ultradaoto/TensorFold that referenced this pull request Nov 16, 2026
ultradaoto added a commit to ultradaoto/TensorFold that referenced this pull request Nov 17, 2026
ashhart pushed a commit to ultradaoto/TensorFold that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant