oliver-zehentleitner / maity

runner: a short per-placement TMPDIR instead of the /tmp fallback, and report the fallback (follow-up to #2014)

Sign in to report

tsk-ajf5k2gx7s90 Open

Follow-up from tvzv's review of #2014 (A1566, P3-2 and P3-3). #2014 sets TMPDIR to <scratch>/tmp only when Claude Code's 34-byte sandbox socket name still fits the Unix socket path limit (107 Linux / 103 elsewhere); otherwise the session gets no TMPDIR and tools use the shared /tmp. Under the default ~/maity-workspaces that is the usual case, so temporary files are again not removed with the placement, not counted in the scratch size, and reachable by other placements of the same OS user.

Done when: (1) the runner gives such a placement a short per-placement TMPDIR that fits, e.g. a leaf under the agy-style 0700 per-user parent (/tmp/maity-scratch-<uid>/<id>/tmp, about 95 bytes with the socket), created and removed with the same care as the agy scratch (no links, fresh per start, owner check), opened in the harness sandbox and removed when the placement closes; (2) maity runner check and the runner log say when a placement falls back; (3) the KtW entry 03fee927-492a-4983-a4cc-738d192e26f0 in cli/context/runner.md gets tsk-55fahmskhq9f as source and the choice made (or rejected) with its reason; tests and docs/runners.md updated.