From a1c0a98c0feebd82aa8606cb9ebcaf480f7d73b6 Mon Sep 17 00:00:00 2001 From: foxnne Date: Thu, 8 Oct 2026 08:47:55 -0500 Subject: [PATCH] contributing: a workspace lives beside the checkout, never under /tmp The workspace rule said where to work but not where to put the workspace. A session's scratchpad is under /private/tmp on macOS, where the OS clears files left untouched for a few days; on 2026-10-08 that took `build.zig` and most of `src/` out of a workspace mid-task, and jj's next snapshot recorded the deletions into the working-copy change. The rule moved from one agent's memory into the file the policy says it belongs in. Co-Authored-By: Claude Opus 5.5 --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e2ca23e..0dad60cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,8 +49,12 @@ The open PR list is the board of who is working on what. `jj op restore` bring it back. - **Work in a workspace of your own.** The default checkout is shared: the desktop app moves it between sessions' branches, and other sessions edit in it. For anything longer than a quick - look, `jj workspace add --name -r main@origin ` and build, test and describe - there. A cloud session or a git worktree is already isolated. + look, `jj workspace add --name -r main@origin ../fizzy-` and build, test and + describe there. A cloud session or a git worktree is already isolated. +- **Never put a workspace under `/tmp`** or a session scratchpad (`/private/tmp/…` on macOS). + The OS clears files there that go untouched for a few days, and jj's next snapshot records + the deletions into your change. It happened on 2026-10-08: `build.zig` and most of `src/` + vanished from a workspace mid-task. Put it beside the main checkout instead. - **`jj new` before the work, not after.** Start each change with `jj new -m ""` and refine it with `jj describe` when done. Describing twice without a `jj new` between folds two changes into one and overwrites the first message.